Re: Insert aborted, but Sequence increased

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Hugo Jonker <hugo(at)gewis(dot)win(dot)tue(dot)nl>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Insert aborted, but Sequence increased
Date: 2002-07-09 15:21:34
Message-ID: 4590.1026228094@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hugo Jonker <hugo(at)gewis(dot)win(dot)tue(dot)nl> 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 used.

> I certainly didn't expect this.

Then you didn't read the documentation. Sorry, this is not a bug.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Stephan Szabo 2002-07-09 15:24:45 Re: Insert aborted, but Sequence increased
Previous Message Tom Lane 2002-07-09 14:46:16 Re: SERIAL type, NOT NULL constraint and rule