Re: Rule/currval() issue

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Rule/currval() issue
Дата
Msg-id 28311.984593358@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Rule/currval() issue  (Tim Perdue <tim@perdue.net>)
Ответы Re: Rule/currval() issue  (Tim Perdue <tim@perdue.net>)
Список pgsql-sql
Tim Perdue <tim@perdue.net> writes:
> This is related to the plpgsql project I was working on this morning. I'm
> trying to create a rule, so that when a row is inserted into a certain table,
> we also create a row over in a "counter table". The problem lies in getting
> the primary key value (from the sequence) so it can be inserted in that
> related table.

You probably should be using a trigger, not a rule at all.
        regards, tom lane


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

Предыдущее
От: Andrew Perrin
Дата:
Сообщение: Re: Rule/currval() issue
Следующее
От: Tim Perdue
Дата:
Сообщение: Re: Rule/currval() issue