-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Hi,

I updated the CVS a few minutes before, applied Gavin Sherry's latest 
xact patch. It worked. 

Anyway...here is what I did:
==================Case 1=================================
test=# BEGIN ;
BEGIN
test=# SAVEPOINT devrim;
SAVEPOINT
test=# SAVEPOINT devrim;
SAVEPOINT
test=# SAVEPOINT devrim;
SAVEPOINT
test=# ROLLBACK to devrim;
ROLLBACK
test=# ROLLBACK to devrim;
ROLLBACK
test=# ROLLBACK to devrim;
ROLLBACK
test=# ROLLBACK to devrim;
ROLLBACK
test=# ROLLBACK to devrim;
ROLLBACK
test=# ROLLBACK to devrim;
ROLLBACK
test=# ROLLBACK to devrim;
ROLLBACK

...and it goes on forever. Is it a feature or a bug?

Now case 2:
==================Case 2=================================
test=# BEGIN ;
BEGIN
test=# INSERT INTO a VALUES ('123');
INSERT 17231 1
test=# INSERT INTO a VALUES ('1dfsd');
INSERT 17232 1
test=# SAVEPOINT devrim;
SAVEPOINT
test=# DELETE from a WHERE x ='123';
DELETE 1
test=# SAVEPOINT devrim;
SAVEPOINT
test=# DELETE from a WHERE x ='123';
DELETE 0
test=# SAVEPOINT devrim;
SAVEPOINT
test=# DELETE from a WHERE x ='1dfsd';
DELETE 1
test=# SELECT * from a ;
 x
- ---
(0 rows)
                                                                                
test=# ROLLBACK to devrim;
ROLLBACK
test=# SELECT * from a ;
   x
- -------
 1dfsd
(1 row)
 
test=# ROLLBACK to devrim;
ROLLBACK
test=# SELECT * from a ;
   x
- -------
 1dfsd
(1 row)

test=# COMMIT ;
COMMIT

test=# SELECT * from a ;
   x
- -------
 1dfsd

========================================

Are these all intended behaviors? I thought we wouldn't be able to give 
more than 1 same name to savepoints in a transaction, am I right?

Regards,

- -- 
Devrim GUNDUZ	       
devrim~gunduz.org				devrim.gunduz~linux.org.tr 
			http://www.tdmsoft.com
			http://www.gunduz.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFBD5fitl86P3SPfQ4RAuErAKDYC33X4CjYmv6TuoddJaBkl7TKYgCeN6ZF
/0Ky5+BWo1wFFNBdMpQ6txw=
=XV4n
-----END PGP SIGNATURE-----


Tue, 3 Aug 2004 16:49:21 +0300 (EEST)
Devrim GUNDUZ <devrim@gunduz.org>
Two questions about savepoints: Bug or feature?
Devrim GUNDUZ <devrim@gunduz.org> writes:
> Are these all intended behaviors?

Yes.  Rolling back to a savepoint doesn't release the savepoint.  See
http://developer.postgresql.org/docs/postgres/sql-savepoint.html
http://developer.postgresql.org/docs/postgres/sql-rollback-to.html
http://developer.postgresql.org/docs/postgres/sql-release.html

			regards, tom lane

Tue, 03 Aug 2004 11:22:11 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: Two questions about savepoints: Bug or feature? 