In testing the TRIGGER WHEN patch, I notice that pg_dump is relying on
pg_get_triggerdef(triggeroid, true) (ie, "pretty" mode) to dump
triggers.  This means that trigger WHEN conditions will be dumped
without adequate parenthesization to ensure they are interpreted the
same way when loaded into future PG versions.  That's not acceptable.

The easy ways out of this are
(1) change pg_dump to not prettify trigger definitions at all, or
(2) change pg_get_triggerdef from the submitted patch so that it
doesn't reduce parenthesization even in "pretty" mode.

Or somebody could bite the bullet and decouple formatting from
parenthesization decisions in ruleutils.c.  That's not going to be
me, though.

Comments, preferences?

                        regards, tom lane

-- 
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