Re: dynmic column names inside trigger?
| От | Louis-David Mitterrand |
|---|---|
| Тема | Re: dynmic column names inside trigger? |
| Дата | |
| Msg-id | 20071122135403.GA10426@apartia.fr обсуждение исходный текст |
| Ответ на | Re: dynmic column names inside trigger? ("Bart Degryse" <Bart.Degryse@indicator.be>) |
| Ответы |
Re: dynmic column names inside trigger?
|
| Список | pgsql-sql |
On Wed, Nov 21, 2007 at 09:14:14AM +0100, Bart Degryse wrote: > I would do something like this (not tested, but conceptually working): Hello, > BEGIN > if old.story is not null and new.story != old.story then > new.story = sanitize_text(new.story); > end if; > --checks on other field can be included here, eg > if old.otherfield is not null and new.otherfield != old.otherfield then > new.otherfield = sanitize_text(new.otherfield); > end if; But if I test a non-existent column for not being null I will have an exception, no? Otherwise this is a nice way of doing it. Thanks,
В списке pgsql-sql по дате отправления: