Re: Automatically updating a new information column in PostgreSQL
В списке pgsql-admin по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: Automatically updating a new information column in PostgreSQL |
| Дата | |
| Msg-id | 5216.1570197015@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Automatically updating a new information column in PostgreSQL (Pepe TD Vo <pepevo@yahoo.com>) |
| Список | pgsql-admin |
Pepe TD Vo <pepevo@yahoo.com> writes:
> good morning experts,I have a trigger before insert (even with or update) and seem it doesnt' work. The function
simplysets both columns named mig_filename to "unknown if its null, and mig_insert_dt to current timestample for each
rowpassed to the trigger.
> here is my script even I take all the rest out and just simple function with new.mig_insert_dt := localtimestamp;
It looks like the RETURN NEW is inside the exception handler recovery
block, which is not where you want it. When I run this example I get
ERROR: control reached end of trigger procedure without RETURN
CONTEXT: PL/pgSQL function "ECISDRDM"."TRIGGER_FCT_TR_STG_APPLICATION_CDIM_INS"()
So there is something seriously wrong with however you are testing
this, if you failed to notice that.
regards, tom lane
В списке pgsql-admin по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера