Hi

Is there a way to test for a variable being unassigned in pl/pgsql ?

I'm writing an audit trigger where I'd like to save full before and
after images into audit log and I really do not like to do

IF TG_OP IN ('INSERT', 'UPDATE') ...

I'd like rather better if i could just write

IF NEW IS ASSIGNED THEN ...

or even use it straight

null_if_unnasigned(NEW)

overriding

coalesce(NEW, NULL)

for the same purpose would also be ok

---------------------
Hannu



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

Reply via email to