I have observed that the following pattern is repeating in our data
management programs:
UPDATE
event
SET
fuid = ${fuid},
venue_id = ${venueId},
url = ${url}
WHERE
id = ${id} AND
fuid IS != ${fuid} AND
venue_id IS != ${venueId} AND
url IS DISTINCT FROM ${url};
Note: "url" can be n
I have defined a function "is_not_distinct" for the purpose of creating a
custom operator "===".
CREATE FUNCTION is_not_distinct(a anyelement, b anyelement)
returns boolean
language sql as $$
select a is not distinct from b;
$$
IMMUTABLE;
CREATE OPERATOR === (
LEFTARG = anyelement,
RIGHTARG