Re: [HACKERS] Unsupported feature F867: WITH TIES

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Jürgen Purtz <juergen(at)purtz(dot)de>, pgsql-hackers(at)postgresql(dot)org, pgsql-sql(at)postgresql(dot)org
Subject: Re: [HACKERS] Unsupported feature F867: WITH TIES
Date: 2016-08-26 15:58:52
Message-ID: 6a6214a6-68dc-e828-527c-c0509d9aee92@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-sql

On 8/26/16 9:06 AM, Jürgen Purtz wrote:
> Actually we don't support the SQL feature F867 "FETCH FIRST clause: WITH
> TIES option". On the other side we support the window function "rank()"
> which acts like the "WITH TIES option". My questions are: Is it hard to
> implement the "WITH TIES option"? Are there plans for a realization /
> how do we decide in general what to do next? Differs the semantic of the
> "WITH TIES option" significantly from the "rank()" window function or
> can we treat it as some kind of 'syntactical sugar'?

LIMIT/FETCH FIRST works at a level that is quite far removed from data
type semantics, which is what you'd need to have handy to compute ties.
LIMIT basically just tells the executor to stop after getting a certain
number of rows.

So implementing WITH TIES would be very difficult in the current setup.

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Euler Taveira 2016-08-26 16:26:39 Renaming some binaries
Previous Message Magnus Hagander 2016-08-26 15:58:45 Re: Renaming of pg_xlog and pg_clog

Browse pgsql-sql by date

  From Date Subject
Next Message Kavi 2016-08-27 07:44:24 error-org.postgresql.Driver for 9.5.3 postgres version
Previous Message Jürgen Purtz 2016-08-26 13:06:42 Unsupported feature F867: WITH TIES