pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Surafel Temesgen <surafel3000@gmail.com>
Cc: Erik Rijkers <er@xs4all.nl>
Cc: Thomas Munro <thomas.munro@gmail.com>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>
Cc: David Steele <david@pgmasters.net>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Andrew Gierth <andrew@tao11.riddles.org.uk>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: FETCH FIRST clause WITH TIES option
Date: Tue, 24 Sep 2019 18:57:53 -0400
Message-ID: <9215.1569365873@sss.pgh.pa.us> (raw)
In-Reply-To: <20190924154827.GA26751@alvherre.pgsql>
References: <20190924154827.GA26751@alvherre.pgsql>

Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> create table w (a point);

> # select * from w order by a fetch first 2 rows with ties;
> ERROR:  could not identify an ordering operator for type point
> LINE 1: select * from w order by a fetch first 2 rows with ties;
>                                   ^
> HINT:  Use an explicit ordering operator or modify the query.

> I'm not sure that the HINT is useful here.

That's not new to this patch, HEAD does the same:

regression=# create table w (a point);
CREATE TABLE
regression=# select * from w order by a ;
ERROR:  could not identify an ordering operator for type point
LINE 1: select * from w order by a ;
                                 ^
HINT:  Use an explicit ordering operator or modify the query.

It is a meaningful hint IMO, since (in theory) you could add
something like "USING <<" to the ORDER BY to specify a
particular ordering operator.  The fact that no suitable
operator is actually available in core doesn't seem like
a reason not to give the hint.

			regards, tom lane





view thread (61+ messages)  latest in thread

Message-ID: <9215.1569365873@sss.pgh.pa.us>
Permalink:  ../9215.1569365873@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/9215.1569365873@sss.pgh.pa.us

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, alvherre@2ndquadrant.com, surafel3000@gmail.com, er@xs4all.nl, thomas.munro@gmail.com, tomas.vondra@2ndquadrant.com, david@pgmasters.net, michael@paquier.xyz, robertmhaas@gmail.com, andrew@tao11.riddles.org.uk
  Subject: Re: FETCH FIRST clause WITH TIES option
  In-Reply-To: <9215.1569365873@sss.pgh.pa.us>

* 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