Re: Prettification versus dump safety
От | Andreas Pflug |
---|---|
Тема | Re: Prettification versus dump safety |
Дата | |
Msg-id | 4B06E239.7040808@pse-consulting.de обсуждение исходный текст |
Ответ на | Prettification versus dump safety (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Prettification versus dump safety
|
Список | pgsql-hackers |
Tom Lane wrote: > 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. > The pretty option was explicitely never intended for pg_dump use. When pg_dump is used to create a future version proof dump, it shouldn't use the pretty option, when used to create some schema scripts for exernal editing it may be enabled. I propose to invent a cmd line option for that (maybe as "prettified plain text" output format). Regards, Andreas
В списке pgsql-hackers по дате отправления: