Re: pg_dump --pretty-print-views
| От | Tom Lane |
|---|---|
| Тема | Re: pg_dump --pretty-print-views |
| Дата | |
| Msg-id | 7076.1357834873@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | pg_dump --pretty-print-views (Marko Tiikkaja <pgmail@joh.to>) |
| Ответы |
Re: pg_dump --pretty-print-views
|
| Список | pgsql-hackers |
Marko Tiikkaja <pgmail@joh.to> writes:
> While we can do the actual splitting of objects from a -Fc dump
> relatively easily, we can't fix the view definitions after they've been
> dumped. So I'm proposing a --pretty-print-views setting to pg_dump
> (patch attached).
-1. The reason that pg_dump does not pretty-print things is that
it's unsafe; there is no real guarantee that the view will reload as
intended, because it's under-parenthesized. (Even if we were sure
it would reload safely into current code, which I'm not, what of
future versions that could have different operator precedences?)
I don't think we should offer a foot-gun option like this at all,
and as for making it the default, not bloody likely.
I think your schema-diffing needs would be better served by a tool
specifically directed at that problem; which pg_dump is not, but
I believe there are some out there.
regards, tom lane
В списке pgsql-hackers по дате отправления: