Re: idea: storing view source in system catalogs - Mailing list pgsql-hackers

From Florian Pflug
Subject Re: idea: storing view source in system catalogs
Date
Msg-id 483A0218.7070709@gmail.com
Whole thread Raw
In response to Re: idea: storing view source in system catalogs  ("Merlin Moncure" <mmoncure@gmail.com>)
List pgsql-hackers
Merlin Moncure wrote:
> On Wed, May 21, 2008 at 4:39 AM, Andreas Pflug
> <pgadmin@pse-consulting.de> wrote:
>> Not the whole reason. To get a view definition that is more readable, the
>> pretty_bool option of pg_get_viewdef already does some newline and indent
>> formatting. Not the initial formatting, but Good Enough (TM), I believe.
> 
> This is where I disagree.  It really can make your sql quite
> unreadable, adding all kinds of extra casts and parenthesis and such.
> I am very particular about how my sql is formatted.

I agree to the disagreement ;-).
Reading and editing views is not the most pleasing thing to do 
currently. Still, storing the original SQL is not the right thing to do 
IMHO - the only viable option I can see is trying to store plain-text 
nodes with the parse tree which get reinserted when the parse tree is 
converted back into a query.

regards,
Florian Pflug



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Read Uncommitted
Next
From: Simon Riggs
Date:
Subject: Re: Read Uncommitted