Search Postgresql Archives

pl/pgsql trigger function - compare *most* columns in NEW vs. OLD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Is there a simple notation for comparing most columns in the new and old records in a pl/pgsql trigger function?  Something like

(new.b, new.c, new.d) = (old.b, old.c, old.d)

works to compare all the columns except 'a', but is fragile in that it needs to be updated any time a column is added to the table, and is rather messy looking when the actual table has many columns.

Is there a better approach to detecting a change in any column except a few specific ones?



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux