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