auto-increment integer field for each row

Поиск
Список
Период
Сортировка
От Lonni J Friedman
Тема auto-increment integer field for each row
Дата
Msg-id 7c1574a90912031439qff04a38j447f75e7ff6628cf@mail.gmail.com
обсуждение исходный текст
Ответы Re: auto-increment integer field for each row  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
Greetings,
I'm trying to create a trigger which will auto-increment the integer
stored in one of the 'not null' table rows each time that row is
updated.

I tried to use the trigger example here, but it silently fails to work:
http://archives.postgresql.org/pgsql-sql/2000-02/msg00147.php

I can repeatedly update column 'b' in the table of that example, and
'a' will remain '1'.

I'm guessing that maybe plpgsql has changed sufficiently since that
example was written (almost 10! years ago), that its no longer
compatible with the version (8.1.10) that I'm using.

many thanks for any advice/pointers.

-Lonni

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

Предыдущее
От: Kris Kewley
Дата:
Сообщение: Re: initdb fails in win xp
Следующее
От: Tom Lane
Дата:
Сообщение: Re: auto-increment integer field for each row