Sunday, May 25, 2008

Re: [HACKERS] idea: storing view source in system catalogs

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


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

No comments: