| От | Pat Marchant |
|---|---|
| Тема | Trigger question |
| Дата | |
| Msg-id | 20011220214817.GA17920@lvcablemodem.com обсуждение исходный текст |
| Ответы |
Re: Trigger question
|
| Список | pgsql-novice |
I want to create a generic update trigger for all
tables in a DB using plpgsql. I'm thinking that having
one big trigger is more efficient than having a table
fire many triggers for each update.
To do this I need to know if an attribute exists in
the current table. For example, most of my tables
have an updated (datetime) field. I'd like to do
something like:
if (AttributeExists(new.updated))
{ new.updated = 'now'::datetime;}
I'd like to be able to use this trigger on
all tables - even if they don't have an
'updated' attribute.
Is there a way to do this?
-Pat Marchant
В списке pgsql-novice по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера