Re: AW: Optimizer Hint, to ignore limit and offset in optimizer plan

Bruce Momjian <bruce@momjian.us>

From: Bruce Momjian <bruce@momjian.us>
To: Erik Brandsberg <erik@heimdalldata.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Martin Handsteiner <martin.handsteiner@sibvisions.com>, Simon Riggs <simon@2ndquadrant.com>, "pgsql-sql@lists.postgresql.org" <pgsql-sql@lists.postgresql.org>
Date: 2020-06-29T15:48:01Z
Lists: pgsql-sql
On Mon, Jun 29, 2020 at 10:33:43AM -0400, Erik Brandsberg wrote:
> New request:  If order by is not specified with an order by clause, allow an
> option to be set that explicitly randomizes the results to break everything
> that relies on the order.  :)  This would primarily be used for QA work to find
> code that depends on an undefined order.

You mean LIMIT/OFFSET without ORDER BY?  I think issuing a warning,
perhaps when some "novice" mode is enabled, would work well.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EnterpriseDB                             https://enterprisedb.com

  The usefulness of a cup is in its emptiness, Bruce Lee