Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iCtky-0007x0-MO for pgsql-hackers@arkaria.postgresql.org; Tue, 24 Sep 2019 22:58:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iCtkx-0007xs-Bk for pgsql-hackers@arkaria.postgresql.org; Tue, 24 Sep 2019 22:58:03 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iCtkx-0007xk-0W for pgsql-hackers@lists.postgresql.org; Tue, 24 Sep 2019 22:58:03 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iCtku-0002qV-Sa for pgsql-hackers@postgresql.org; Tue, 24 Sep 2019 22:58:01 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x8OMvre4009216; Tue, 24 Sep 2019 18:57:53 -0400 From: Tom Lane To: Alvaro Herrera cc: Surafel Temesgen , Erik Rijkers , Thomas Munro , Tomas Vondra , David Steele , Michael Paquier , Robert Haas , Andrew Gierth , PostgreSQL Hackers Subject: Re: FETCH FIRST clause WITH TIES option In-reply-to: <20190924154827.GA26751@alvherre.pgsql> References: <20190924154827.GA26751@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Tue, 24 Sep 2019 12:48:27 -0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <9214.1569365873.1@sss.pgh.pa.us> Date: Tue, 24 Sep 2019 18:57:53 -0400 Message-ID: <9215.1569365873@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alvaro Herrera 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