Re: pg_dump --pretty-print-views - Mailing list pgsql-hackers

From David Fetter
Subject Re: pg_dump --pretty-print-views
Date
Msg-id 20130110165144.GA10242@fetter.org
Whole thread Raw
In response to Re: pg_dump --pretty-print-views  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pg_dump --pretty-print-views
List pgsql-hackers
On Thu, Jan 10, 2013 at 11:21:13AM -0500, Tom Lane wrote:
> 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?)

Under what circumstances do pretty-printed views not reload?  It seems
to me that such circumstances would be pretty_print() bugs by
definition.

Cheers,
David.
-- 
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: PL/perl should fail on configure, not make
Next
From: Tom Lane
Date:
Subject: Re: pg_dump --pretty-print-views