Re: Modifying SQL parser with extensions?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Modifying SQL parser with extensions?
Дата
Msg-id 28814.1162144196@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Modifying SQL parser with extensions?  (Matthias Lüdtke <matthias-luedtke@gmx.de>)
Ответы Re: Modifying SQL parser with extensions?  (Matthias Luedtke <matthias-luedtke@gmx.de>)
Список pgsql-general
=?ISO-8859-1?Q?Matthias_L=FCdtke?= <matthias-luedtke@gmx.de> writes:
> 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.

Seems like you could save a large amount of work if you can express what
you want to do as ORDER BY a user-defined operator.

If you insist on bolting it on as new SQL syntax, changing the parser
will be only the tip of the iceberg --- you'll likely need planner and
executor changes as well.  You could get a rough idea of what's involved
in adding a new kind of query clause by looking at the last patch that
did so:
http://archives.postgresql.org/pgsql-committers/2006-08/msg00251.php

            regards, tom lane

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Modifying SQL parser with extensions?
Следующее
От: Matthias Luedtke
Дата:
Сообщение: Re: Modifying SQL parser with extensions?