Re: View definition formatting - Mailing list pgsql-hackers

From Tom Lane
Subject Re: View definition formatting
Date
Msg-id 2723.1049227132@sss.pgh.pa.us
Whole thread Raw
In response to Re: View definition formatting  (Robert Treat <xzilla@users.sourceforge.net>)
List pgsql-hackers
Robert Treat <xzilla@users.sourceforge.net> writes:
> On Tue, 2003-04-01 at 14:18, Tom Lane wrote:
>> Perhaps we could make pg_get_ruledef and friends try to prettyprint
>> their output a little better, instead of duplicating such logic in
>> various clients (which couldn't do nearly as well at it anyway without
>> re-parsing the string :-().

> Could we turn the prettyprint incantation into a user callable function?

I don't think it's reasonable to implement the prettyprint as a separate
function, if that's what you mean.  It would have to re-parse the string
which is exactly what I wanted to avoid.  pg_get_ruledef itself already
knows what the statement structure is, and would need very little more
logic to do fairly reasonable pretty-printing.

We could make variants of pg_get_ruledef etc. that pretty-print,
while leaving the existing behavior alone, I suppose.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Treat
Date:
Subject: Re: View definition formatting
Next
From: Rod Taylor
Date:
Subject: Re: View definition formatting