| От | Grant Kaufmann |
|---|---|
| Тема | Re: [SQL] Adding a rule to update a last_changed field |
| Дата | |
| Msg-id | 19991022120954.B5228@intekom.com обсуждение исходный текст |
| Ответы |
Re: [SQL] Adding a rule to update a last_changed field
|
| Список | pgsql-sql |
> > I'm trying to use a rule to maintain a last_changed field. > > Use a trigger, not a rule. You can adjust the last_changed > field before the tuple is stored that way. There's an example > in the manual's discussion of triggers. My original choice was to use a trigger, but I don't want to introduce C code when I don't have to. I don't believe that making external calls should be necessary for a query that can be so simply expressed in SQL. And from the manual: "The procedure name is the C function called" If triggers can use SQL, I'd be happy to use them, but I can't find a single example or description on how to do this.
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера