Re: [GENERAL] Sequences change in a rolled-back transactions

2009-03-09 Thread Craig Ringer
Alvaro Herrera wrote: > Erwin Moller wrote: > >> I thought a transaction that is rolled back, rolls back *everything* >> done in that transaction. >> Appearantly sequences are not included. > > Yes. This is actually a desirable property, because it allows sequences > to work fine in concurrent

Re: [GENERAL] Sequences change in a rolled-back transactions

2009-03-09 Thread Erwin Moller
Alvaro Herrera schreef: Erwin Moller wrote: I thought a transaction that is rolled back, rolls back *everything* done in that transaction. Appearantly sequences are not included. Hi Alvaro, Thanks for your reply. Yes. This is actually a desirable property, because it allows

Re: [GENERAL] Sequences change in a rolled-back transactions

2009-03-09 Thread Alvaro Herrera
Erwin Moller wrote: > I thought a transaction that is rolled back, rolls back *everything* > done in that transaction. > Appearantly sequences are not included. Yes. This is actually a desirable property, because it allows sequences to work fine in concurrent scenarios (which are, after all, t

[GENERAL] Sequences change in a rolled-back transactions

2009-03-09 Thread Erwin Moller
Hi group, I just noticed getting the next number of a sequence doesn't respect a transaction. Here is an example: === erwin=# SELECT nextval('tblofferlabel_offerlabelid_seq'::regclass) as nextofferlabelid; nextofferlabelid --