Re: [SQL] begin/end/abort work for sequences?
| От | Bruce Momjian |
|---|---|
| Тема | Re: [SQL] begin/end/abort work for sequences? |
| Дата | |
| Msg-id | 199907010326.XAA05930@candle.pha.pa.us обсуждение исходный текст |
| Ответ на | Re: [SQL] begin/end/abort work for sequences? (José Soares <jose@sferacarta.com>) |
| Список | pgsql-sql |
> > The sequence po_seq is advancing to the next value even though the > > transaction was aborted. If I put other things like updates, inserts, etc. > > inside the transaction, they seem to be rolled back OK, but not the > > update of the sequence. > > > > Am I doing something wrong? > > No. I can't explain you why but AFAIK sequences don't rollback. If we rolled back sequence numbers, we would have to lock the table until the transaction commited or was rolled back. That is too much locking so was not worth it. -- Bruce Momjian | http://www.op.net/~candle maillist@candle.pha.pa.us | (610) 853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania19026
В списке pgsql-sql по дате отправления: