Re: WIP: pg_pretty_query

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: WIP: pg_pretty_query
Дата
Msg-id 4762.1344373877@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: WIP: pg_pretty_query  (Peter Geoghegan <peter@2ndquadrant.com>)
Список pgsql-hackers
Peter Geoghegan <peter@2ndquadrant.com> writes:
> On 7 August 2012 20:01, Andrew Dunstan <andrew@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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: Inserting heap tuples in bulk in COPY
Следующее
От: Tom Lane
Дата:
Сообщение: Re: WIP patch for LATERAL subqueries