Re: question on parsing postgres sql queries

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: question on parsing postgres sql queries
Дата
Msg-id 8392.1469562618@sss.pgh.pa.us
обсуждение исходный текст
Ответ на question on parsing postgres sql queries  (Jerome Wagner <jerome.wagner@laposte.net>)
Список pgsql-general
Jerome Wagner <jerome.wagner@laposte.net> writes:
> Would it make sense to use these sgml synopsis as some kind of source of
> truth, parse them, and automatically generate a parser for a specifc
> language ?

Probably not.  First, it is not uncommon for corner cases (such as
legacy syntaxes) to go unmentioned in the documentation.  Second, the
implementation is often encrusted with details we'd just as soon not
expose to users.  An example here is the need to be very specific in
the Bison grammar about whether extra parens in a "foo IN ((SELECT ...))"
construct belong to the SELECT or the IN.

It might be nice to have some sort of tool that could check compatibility
of the doc synopses with the actual grammar.  But I doubt that trying to
auto-generate either one from the other would be a win.

            regards, tom lane


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

Предыдущее
От: Matthew Musgrove
Дата:
Сообщение: Re: Weirdness with the stats collector process
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: question on parsing postgres sql queries