| От | Eric E |
|---|---|
| Тема | Retrieving a field from the NEW record |
| Дата | |
| Msg-id | 41ED7DEF.5070800@bonbon.net обсуждение |
| Ответы |
Re: Retrieving a field from the NEW record
|
| Список | pgsql-general |
Hi all,
I'm tearing my hair out trying to solve the following problem. I
want to be able to retrieve the value of the primary key in a trigger
function. I have tried using PL/PGSQL and PL/PERL, but a PL/PERL
trigger function
crashes the postgress process.
I am able to use TG_RELNAME and dblink_get_pkey to retrieve the name of
the primary key, but I cannot for the life of me figure out how to
reference the primary key name I retrieved in the NEW rowtype variable.
In other words, I want:
NEW.pkName, where pkName is a variable holding the name of my primary key.
Is there any way to do this using PL/PGSQL?
Thanks,
Eric
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера