Re: Altering field passed as parameter to plpgsql trigger
В списке pgsql-general по дате отправления:
| От | Richard Huxton |
|---|---|
| Тема | Re: Altering field passed as parameter to plpgsql trigger |
| Дата | |
| Msg-id | 47604436.1080509@archonet.com обсуждение исходный текст |
| Ответ на | Altering field passed as parameter to plpgsql trigger (Steve Crawford <scrawford@pinpointresearch.com>) |
| Ответы |
Re: Altering field passed as parameter to plpgsql trigger
|
| Список | pgsql-general |
Steve Crawford wrote: > What is the correct syntax for the line: > new.field_to_alter = some_computed_value; Can't be done in plpgsql - it's too static a language. On first call, that assignments basically gets compiled into a planned query and from then on you're stuck. You can use pl/tcl or pl/perl etc. since they're more dynamic. > Also, does plpgsql have a preferred way to identify the table that fired > the trigger. I see the syntax for C but not for plpgsql. TG_RELNAME / TG_TABLE_NAME - it's in the plpgsql/triggers section of the manual. -- Richard Huxton Archonet Ltd
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера