Re: Bug #485: strange behavior when creting rules with

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Bug #485: strange behavior when creting rules with
Дата
Msg-id Pine.BSF.4.21.0110170458300.21535-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Bug #485: strange behavior when creting rules with serial id  (pgsql-bugs@postgresql.org)
Список pgsql-bugs
On Wed, 17 Oct 2001 pgsql-bugs@postgresql.org wrote:

> Tony Tomov (ttomov@abs.bg) reports a bug with a severity of 2
> The lower the number the more severe it is.
>
> Short Description
> strange behavior when creting rules  with serial id
>
> Long Description
> I do not know if this is a bug, but for me this is a strange behavior.
> I will describe the following process.

Yep. Both the rule's new.id and the actual id are going to increment the
counter, since they'll both see the nextval for the serial sequence, the
new.id is going to shove in whatever is specified for the value exactly
as it was specified, so new.id is nextval(...) not the numeric result
of nextval(...).  You're probably going to want to use a trigger instead.

В списке pgsql-bugs по дате отправления:

Предыдущее
От: pgsql-bugs@postgresql.org
Дата:
Сообщение: Bug #485: strange behavior when creting rules with serial id
Следующее
От: Tony Tomov
Дата:
Сообщение: strange behavior when creting rules