| От | Joe Conway |
|---|---|
| Тема | C function for use from PLpgSQL trigger |
| Дата | |
| Msg-id | 00f501c08d52$6dd1baf0$82d410ac@jecw2k1 обсуждение исходный текст |
| Список | pgsql-interfaces |
Hi, I'm trying to create a C function that I can call from within a PLpgSQL trigger function which will return a list of all the values in the NEW record formatted suitably for an insert statement. I can't come up with a way to do this directly from within PLpgSQL (i.e. iterate through an arbitrary number of NEW.attribute). Can anyone tell me how I can either pass the NEW record to the C function (this produces an error message 'NEW used in a non-rule query') or gain access to the trigger tuple from within my C function? It seems that although PLpgSQL is called as a trigger, the C function is called as a regular function (makes sense) and thus has no access to the trigger tuple (my problem). Any help or guidance is greatly appreciated! Thanks, Joe Conway
В списке pgsql-interfaces по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера