Prettification versus dump safety

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Prettification versus dump safety
Дата
Msg-id 27259.1258736049@sss.pgh.pa.us
обсуждение исходный текст
Ответы Re: Prettification versus dump safety
Re: Prettification versus dump safety
Список pgsql-hackers
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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: DEFAULT of domain ignored in plpgsql (8.4.1)
Следующее
От: "Ross J. Reedstrom"
Дата:
Сообщение: Re: plruby code and postgres ?