pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Cyril Champier <cyril.champier@doctolib.com>
Cc: pgsql-general@postgresql.org
Subject: Re: Default ordering option
Date: Thu, 25 Jul 2019 12:21:54 +0200
Message-ID: <bfefa5ba-ca12-6d94-647d-37d4cb22f99b@2ndquadrant.com> (raw)
In-Reply-To: <CAJaA8VfVBQ1X+ggm5zO7BUFcvXvY0t+8_M+Ei94t=xKFCLHwow@mail.gmail.com>
References: <CAJaA8VcZCkBZeEMt45g-YR7c6ScHbB3PNURt6Z7AWZuuvX5umA@mail.gmail.com>
	<98233546-f5a4-1786-4641-1d7be8d88bc2@2ndquadrant.com>
	<CAJaA8VfVBQ1X+ggm5zO7BUFcvXvY0t+8_M+Ei94t=xKFCLHwow@mail.gmail.com>

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





view thread (16+ messages)  latest in thread

Message-ID: <bfefa5ba-ca12-6d94-647d-37d4cb22f99b@2ndquadrant.com>
Permalink:  ../bfefa5ba-ca12-6d94-647d-37d4cb22f99b@2ndquadrant.com/
Also on:    postgresql.org/message-id/bfefa5ba-ca12-6d94-647d-37d4cb22f99b@2ndquadrant.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: peter.eisentraut@2ndquadrant.com, cyril.champier@doctolib.com
  Subject: Re: Default ordering option
  In-Reply-To: <bfefa5ba-ca12-6d94-647d-37d4cb22f99b@2ndquadrant.com>
  References: <CAJaA8VcZCkBZeEMt45g-YR7c6ScHbB3PNURt6Z7AWZuuvX5umA@mail.gmail.com> <98233546-f5a4-1786-4641-1d7be8d88bc2@2ndquadrant.com> <CAJaA8VfVBQ1X+ggm5zO7BUFcvXvY0t+8_M+Ei94t=xKFCLHwow@mail.gmail.com> <bfefa5ba-ca12-6d94-647d-37d4cb22f99b@2ndquadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox