Skip site navigation (1) Skip section navigation (2)

Re: Sequence bug in insert trigger

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: rob(at)cabrion(dot)com, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Sequence bug in insert trigger
Date: 2000-11-07 07:33:58
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
pgsql-bugs(at)postgresql(dot)org writes:
> insert into test_table values('jim');
> --Doh! ____rowver____ = 1 (should be 2)

1 is correct for the first nextval() from a sequence.

> insert into test_table values('joe');
> --Doh! ____rowver____ = 1 (should be 3)

I can't duplicate this under either 7.0.2 or current sources.
I get this final state from your example:

play=> select * from test_table;
 name | ____rowver____
 jim  |              2
 joe  |              3
(2 rows)

which looks fine to me...

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: Roger WernerssonDate: 2000-11-07 15:10:13
Subject: Postgres 7 on Alpha
Previous:From: Tom LaneDate: 2000-11-07 01:59:14
Subject: Re: Sending result sets from backend to frontend is _slow_

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group