Re: [BUGS] Insert aborted, but Sequence increased

2002-07-09 Thread Bruce Momjian
Well, nextval() doesn't hold a lock for the duration of the transaction, so it still increments. It is a performance optimization. --- Hugo Jonker wrote: > Hi, > > While using Postgres, I encountered some unexpected behav

Re: [BUGS] Insert aborted, but Sequence increased

2002-07-09 Thread Stephan Szabo
On Mon, 8 Jul 2002, Hugo Jonker wrote: > Hi, > > While using Postgres, I encountered some unexpected behaviour. > > In short: > - > Upon doing a faulty INSERT which left a column with default value > nextval('sequence') unspecified, the INSERT aborted due to an error. > However, a call ha

Re: [BUGS] Insert aborted, but Sequence increased

2002-07-09 Thread Tom Lane
Hugo Jonker <[EMAIL PROTECTED]> writes: > Upon doing a faulty INSERT which left a column with default value > nextval('sequence') unspecified, the INSERT aborted due to an error. > However, a call had been placed to nextval('sequence'), thus > increasing the sequence, while this value never got us

[BUGS] Insert aborted, but Sequence increased

2002-07-09 Thread Hugo Jonker
Hi, While using Postgres, I encountered some unexpected behaviour. In short: - Upon doing a faulty INSERT which left a column with default value nextval('sequence') unspecified, the INSERT aborted due to an error. However, a call had been placed to nextval('sequence'), thus increasing th