Re: Sequence bug in insert trigger - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Sequence bug in insert trigger
Date
Msg-id 5365.973582438@sss.pgh.pa.us
Whole thread Raw
In response to Sequence bug in insert trigger  (pgsql-bugs@postgresql.org)
List pgsql-bugs
pgsql-bugs@postgresql.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

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Sending result sets from backend to frontend is _slow_
Next
From: Roger Wernersson
Date:
Subject: Postgres 7 on Alpha