Hi piglet,
I do not think it's possible to list save points directly in vsql.
The only thing I can think that may help is to list your command history in vsql using the \s meta-command. Perhaps you can peruse the output from the command to decipher which save points are available...
For example, if I run this SQL:
Code: Select all
dbadmin=> CREATE TABLE t1 (c1 varchar(1));
CREATE TABLE
dbadmin=> INSERT INTO t1 VALUES ('A');
OUTPUT
--------
1
(1 row)
dbadmin=> SAVEPOINT t1;
SAVEPOINT
dbadmin=> INSERT INTO t1 VALUES ('B');
OUTPUT
--------
1
(1 row)
dbadmin=> SAVEPOINT t2;
SAVEPOINT
dbadmin=> INSERT INTO t1 VALUES ('C');
OUTPUT
--------
1
(1 row)
dbadmin=> ROLLBACK TO SAVEPOINT t2;
ROLLBACK
dbadmin=> SELECT * FROM t1;
c1
----
A
B
(2 rows)
Now I can review my command history with the \s meta-command:
Code: Select all
dbadmin=> \s
CREATE TABLE t1 (c1 varchar(1));
INSERT INTO t1 VALUES ('A');
SAVEPOINT t1;
INSERT INTO t1 VALUES ('B');
SAVEPOINT t2;
INSERT INTO t1 VALUES ('C');
ROLLBACK TO SAVEPOINT t2;
SELECT * FROM t1;
\s
By reviewing the output of the \s meta-command I can see that my t1 save point is still available...
Hope this helps a little!