Search Postgresql Archives

Re: IF ROW( NEW ) <> ROW( OLD )

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

 



"Richard Broersma" <richard.broersma@xxxxxxxxx> writes:
> I could manually expand the composite type OLD and NEW to enumerate
> each field and make a row wise comparison.  However, I was hoping to
> avoid that.

I think IF ROW(NEW.*) <> ROW(OLD.*) will work in recent releases.

Actually you'd better use IF ROW(NEW.*) IS DISTINCT FROM ROW(OLD.*) ...
you really don't want to rely on <> as it will not give the behavior
you want in the presence of null columns.

			regards, tom lane


[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