Re: [HACKERS] Unsupported feature F867: WITH TIES - Mailing list pgsql-sql

From Peter Eisentraut
Subject Re: [HACKERS] Unsupported feature F867: WITH TIES
Date
Msg-id 6a6214a6-68dc-e828-527c-c0509d9aee92@2ndquadrant.com
Whole thread Raw
In response to Unsupported feature F867: WITH TIES  (Jürgen Purtz <juergen@purtz.de>)
List 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



pgsql-sql by date:

Previous
From: Jürgen Purtz
Date:
Subject: Unsupported feature F867: WITH TIES
Next
From: Kavi
Date:
Subject: error-org.postgresql.Driver for 9.5.3 postgres version