UPDATE keyword
От | Ian Harding |
---|---|
Тема | UPDATE keyword |
Дата | |
Msg-id | sb0e855f.087@mail.tpchd.org обсуждение исходный текст |
Ответы |
Re: UPDATE keyword
|
Список | pgsql-general |
Well, I am making progress in rewriting my MSSQL Server T-SQL triggers and stored procedures in Pl/Tcl. However, I haverun into a bit of an issue and I wonder if anyone knows the best way to address it... In T-SQL triggers, you can use the UPDATE keyword in conditional expressions as in IF UPDATE(myfield) BEGIN do something END It detects the update of the field. I have been comparing $NEW(myfield) and $OLD(myfield) which works ok, except where Iused the UPDATE() test as a crutch. I sometimes do an update like UPDATE mytable SET myfield = myfield WHERE... to fire an update trigger, and executing only the code in that trigger surrounded by UPDATE(myfield). Is there an easy way to duplicate this, or should I work around it? Ian A. Harding Programmer/Analyst II Tacoma-Pierce County Health Department (253) 798-3549 mailto: ianh@tpchd.org
В списке pgsql-general по дате отправления: