Two questions about savepoints: Bug or feature?
От | Devrim GUNDUZ |
---|---|
Тема | Two questions about savepoints: Bug or feature? |
Дата | |
Msg-id | Pine.LNX.4.44.0408031642360.24680-100000@emo.org.tr обсуждение исходный текст |
Ответы |
Re: Two questions about savepoints: Bug or feature?
|
Список | pgsql-hackers |
-----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-----
В списке pgsql-hackers по дате отправления: