> pg core has 2/3 components for this task - parser and serialisation.
> It missing only some rules for pretty printing. It cold be a good
> contrib module (with a few hooks).
>
Yeah, just for the love of mike don't start a discussion of *how* you
should indent stuff on a public list. You'll never get anything done. ;-)
(serious suggestion: use the indenting rules outlined in Celko's book)
--Josh Berkus