Re: Modifying SQL parser with extensions?

Поиск
Список
Период
Сортировка
От Matthias Lüdtke
Тема Re: Modifying SQL parser with extensions?
Дата
Msg-id 4544E215.9090309@gmx.de
обсуждение исходный текст
Ответ на Re: Modifying SQL parser with extensions?  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: Modifying SQL parser with extensions?  (Alvaro Herrera <alvherre@commandprompt.com>)
Re: Modifying SQL parser with extensions?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Alvaro Herrera wrote:
>> I am searching for the easiest way to let PostgreSQL parse a special
>> dialect of SQL. The dialect I want to parse augments common SQL in a way
>> that enables expressions within a WHERE clause to be annotated and is
>> thus not compatible with the standard SQL syntax anymore.
>
> No, there's no mechanism for that.  You'd have to preprocess the query
> before passing it to PostgreSQL.

Actually I didn't describe my whole story:

In fact, parsing this SQL dialect would just be the first step, as the
annotations within the query induce an ordering of the result set.

So I need this extra information in the query to accomplish the
subsequent task of sorting the result set in a certain way before the
result is returned to the client. I'll have to use some hand crafted
internal data structures to do this sorting.

It seems to me that at least part of the code that needs to be written
might be implemented with the existing extension mechanism, though the
parser does not belong to that category.

Regards,
Matthias

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

Предыдущее
От: Richard Troy
Дата:
Сообщение: Re: Modifying SQL parser with extensions?
Следующее
От: Bob Pawley
Дата:
Сообщение: Adding a column