Search Postgresql Archives

Re: Shouldn't "WHEN (OLD.* IS DISTINCT FROM NEW.*)" clause be independent from data type?

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

 



pinker wrote:
> I've tried to write audit trigger which fires only when data changed, so I used "WHEN (OLD.* IS
> DISTINCT FROM NEW.*)" clause as described in documentation
> <http://www.postgresql.org/docs/9.4/static/sql-createtrigger.html> . Should this clause be independent
> from data type? because an error occurs when I'm trying to modify row with point data type: ERROR:
> could not identify an equality operator for type point

I guess it is dependent on data type as it requires an equality operator,
and type "point" doesn't have one.

You'd have to hand-roll a comparison in this case, probably using the
"same as" operator "~=".

Yours,
Laurenz Albe

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[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