Re: NEW + tableOID

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: NEW + tableOID
Дата
Msg-id 22559.1281735905@sss.pgh.pa.us
обсуждение исходный текст
Ответ на NEW + tableOID  (Ricardo Bayley <ricardo.bayley@gmail.com>)
Ответы Re: NEW + tableOID  (Ricardo Bayley <ricardo.bayley@gmail.com>)
Список pgsql-admin
Ricardo Bayley <ricardo.bayley@gmail.com> writes:
> I do this with triggers. This issue I have is that the tableoid data cannot
> be used with the NEW keyword. I always get value 0 instead of the actual
> tableoid.

That might work in an AFTER trigger, but it definitely won't work in a
BEFORE trigger, because the NEW row isn't actually part of the table at
that point.  You'd probably be better off to rely on the trigger
function TG_RELID parameter instead, anyway.

            regards, tom lane

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

Предыдущее
От: Ricardo Bayley
Дата:
Сообщение: Re: NEW + tableOID
Следующее
От: Ricardo Bayley
Дата:
Сообщение: Re: NEW + tableOID