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: 5365.973582438@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

Browse pgsql-bugs by date

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