Albert <oo_O2_oo@xxxxxxxxxxx> writes: > *i get:* > Syntax error at or near 'WHEN' > LINE 1: ... check_update AFTER UPDATE ON accounts FOR EACH ROW WHEN > (OLD.balance IS DISTINCT FROM NEW.balance) .... Does the BEFORE case work for you either? I'm suspicious that you are using a PG version that predates WHEN-clause support in triggers. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general