Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] pg_dump pretty_print

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] pg_dump pretty_print
Date: 2007-01-26 16:23:31
Message-ID: 24789.1169828611@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
"Greg Sabino Mullane" <greg(at)turnstep(dot)com> writes:
> Peter Eisentraut replied:
>> The harm here is that under undefined circumstances a dump file
>> will not be a proper and robust representation of the original
>> database, which would add significant confusion and potential for error.

> What "undefined circumstances" are we talking here? If there is a chance
> that pg_get_viewdef and company do not output a version that can be
> read again by the database because we simply changed the whitespace, that
> sounds like a serious bug to be fixed, not a reason to reject this
> optional flag.

The original definition of the prettyprint flag was that it'd produce a
version that was nice to look at but not guaranteed to parse back
exactly the same; in particular it might omit parentheses that perhaps
were really needed to ensure the same parsing.  (I think there might be
some other issues too ... but whitespace is NOT one of them.)  It's
possible that the current prettyprint code is smart enough to never make
such an error --- and then again it's possible that it isn't.  Like
Peter, I've not got much confidence in that code, and don't want to
trust pg_dump's correctness to it.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Pavan DeolaseeDate: 2007-01-26 16:27:05
Subject: Re: Piggybacking vacuum I/O
Previous:From: Simon RiggsDate: 2007-01-26 16:21:04
Subject: Re: HAVING push-down

pgsql-patches by date

Next:From: Neil ConwayDate: 2007-01-26 17:46:01
Subject: Re: Getting rid of warnings
Previous:From: Alvaro HerreraDate: 2007-01-26 15:17:16
Subject: Re: Docs improvements

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group