Re: Default ordering option

Поиск
Список
Период
Сортировка
От Cyril Champier
Тема Re: Default ordering option
Дата
Msg-id CAJaA8Vf1t5b7RCf5y=cNQa-otundkXfsiXaN8vpZeVT-A+eRZw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Default ordering option  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список pgsql-general
Peter:
So I would need to create a pg extension encapsulating this hook callback?
If this is the case, it seems it will be much more complicated than expected, and I wont be able to do it :(
But thanks for the suggestion anyway.

On Thu, Jul 25, 2019 at 12:21 PM Peter Eisentraut <peter.eisentraut@2ndquadrant.com> wrote:
On 2019-07-25 09:43, Cyril Champier wrote:
>     It might be an interesting exercise to implement this as a post-parsing
>     hook.
>
>  
> I known nothing about that, but that sounds interesting, do you have any
> documentation pointer to help me implement that?

Look for post_parse_analyze_hook.  Walk the parsed query tree, look for
queries without ordering clause and manufacture one.

--
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Default ordering option
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Default ordering option