From: | Oliver Jowett <oliver(at)opencloud(dot)com> |
---|---|
To: | Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | SAVEPOINT syntax again |
Date: | 2004-08-11 14:17:18 |
Message-ID: | 411A2A6E.7000201@opencloud.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Against CVS HEAD:
> test=# select version();
> version
> -----------------------------------------------------------------------------------------------
> PostgreSQL 8.0.0beta1 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.3.3 (Debian 20040401)
> (1 row)
>
> test=# begin;
> BEGIN
> test=# savepoint foo;
> SAVEPOINT
> test=# rollback to foo;
> ROLLBACK
> test=# rollback to savepoint foo;
> ERROR: syntax error at or near "foo" at character 23
> LINE 1: rollback to savepoint foo;
> ^
> test=# rollback;
> ROLLBACK
> test=# begin;
> BEGIN
> test=# savepoint foo;
> SAVEPOINT
> test=# release foo;
> RELEASE
> test=# savepoint foo;
> SAVEPOINT
> test=# release savepoint foo;
> ERROR: syntax error at or near "foo" at character 19
> LINE 1: release savepoint foo;
> ^
Comments:
1) We have a different syntax to the SQL200n draft (and Oracle by the
looks of it) for ROLLBACK. The draft says:
> <rollback statement> ::= ROLLBACK [ WORK ] [ AND [ NO ] CHAIN ] [ <savepoint clause> ]
> <savepoint clause> ::= TO SAVEPOINT <savepoint specifier>
2) We have a different syntax for RELEASE too. The SQL200n draft says:
> <release savepoint statement> ::= RELEASE SAVEPOINT <savepoint specifier>
3) Can the command tag for a ROLLBACK TO SAVEPOINT be different to the
command tag for a global rollback, so clients can distinguish the two
cases? ("ROLLBACK <savepoint specifier>" might be nice)
-O
From | Date | Subject | |
---|---|---|---|
Next Message | Philip Warner | 2004-08-11 14:19:57 | Does psql use nested transactions? |
Previous Message | pgsql | 2004-08-11 13:53:22 | fsync, fdatasync, open_sync, and open_datasync, -- Linux insanity |
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Sabino Mullane | 2004-08-11 14:23:31 | Re: PQserverVersion |
Previous Message | Andreas Pflug | 2004-08-11 13:07:09 | libpq problem |