From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Peter Geoghegan <peter(at)2ndquadrant(dot)com> |
Cc: | Andrew Dunstan <andrew(at)dunslane(dot)net>, Bruce Momjian <bruce(at)momjian(dot)us>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: WIP: pg_pretty_query |
Date: | 2012-08-07 21:11:17 |
Message-ID: | 4762.1344373877@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Peter Geoghegan <peter(at)2ndquadrant(dot)com> writes:
> On 7 August 2012 20:01, Andrew Dunstan <andrew(at)dunslane(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Ross | 2012-08-07 22:45:38 | Possible bug in PostgreSQL 9.2 stable: TwoPhaseGetDummyBackendId() |
Previous Message | Simon Riggs | 2012-08-07 20:52:25 | Re: Inserting heap tuples in bulk in COPY |