Re: pg_dump --pretty-print-views

From: David Fetter <david(at)fetter(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Marko Tiikkaja <pgmail(at)joh(dot)to>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_dump --pretty-print-views
Date: 2013-01-10 16:51:44
Message-ID: 20130110165144.GA10242@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jan 10, 2013 at 11:21:13AM -0500, Tom Lane wrote:
> Marko Tiikkaja <pgmail(at)joh(dot)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(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Rod Taylor 2013-01-10 17:08:45 GIN over array of ENUMs
Previous Message Andrew Dunstan 2013-01-10 16:38:07 Re: PL/perl should fail on configure, not make