Re: Double sequence increase on single insert with RULE on targeted table
| От | tomas@tuxteam.de (Tomas Zerolo) |
|---|---|
| Тема | Re: Double sequence increase on single insert with RULE on targeted table |
| Дата | |
| Msg-id | 20051116052940.GA6265@www.trapp.net обсуждение исходный текст |
| Ответ на | Double sequence increase on single insert with RULE on targeted table (Sarunas Krisciukaitis <sarunask@lonus-tech.com>) |
| Ответы |
Re: Double sequence increase on single insert with RULE on targeted table
|
| Список | pgsql-bugs |
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
В списке pgsql-bugs по дате отправления: