Peter Geoghegan <pe...@2ndquadrant.com> writes:
> On 7 August 2012 20:01, Andrew Dunstan <and...@dunslane.net> wrote:
>> One of the challenges is to have a pretty printer that is kept in sync with
>> the dialect that's supported. Anything that doesn't use the backend's parser
>> seems to me to be guaranteed to get out of sync very quickly.

> I'm not convinced of that. Consider the example of cscope, a popular
> tool for browsing C code. Its parser was written to be "fuzzy", so
> it's actually perfectly usable for C++ and Java, even though that
> isn't actually supported, IIRC. Now, I'll grant you that that isn't a
> perfectly analogous situation, but it is similar in some ways.

Yeah.  A related question here is whether you want a pretty printer that
is entirely unforgiving of (what it thinks are) syntax errors in the
input.  It might be a lot more useful if it didn't spit up on that, but
just did the best it could.

                        regards, tom lane

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

Reply via email to