On Tue, Nov 15, 2005 at 11:39:37AM +0200, Sarunas Krisciukaitis wrote:
> Dear All,
>=20
> A program produces the wrong output for any given input.
> Here comes bug report:
> 1. Database dump is attached.
> 2. Input: "BEGIN; INSERT INTO test1(some_text) VALUES ('test1'); SELECT=
=20
> lastval() as id; END;"
> 3. Output:
> INSERT 0 1
> id
> ----
> 3
> (1 row)
> 4. Exspected Output:
> id
> ----
> 2
> (1 row)
[snip]
AFAIK, serials are not guaranteed to produce sequential values; tehy
will produce unique values. That means that they can (and sometimes
will) jump.
Think about it: how could a database achieve that when the rollback of
an ongoing transaction is always possible?
Regards
-- tomas