Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bdJWz-0008W2-MW for pgsql-sql@arkaria.postgresql.org; Fri, 26 Aug 2016 15:58:57 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bdJWz-0000IC-98 for pgsql-sql@arkaria.postgresql.org; Fri, 26 Aug 2016 15:58:57 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bdJWy-0000GN-KJ; Fri, 26 Aug 2016 15:58:56 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bdJWw-0008Ki-0l; Fri, 26 Aug 2016 15:58:55 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 27F8220234; Fri, 26 Aug 2016 11:58:53 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute2.internal (MEProxy); Fri, 26 Aug 2016 11:58:53 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=oH3Wq/8TUnb5H4S o9XdRaPP4+Wk=; b=Z/wJTw6564z50BBfe7uelDGUmnBbvyNxmf+JwUxAh155Cin kMTa96f/PDgjVm9KVXhQ/26JFI4XqcpyI60Tjs/26mdXI2tdJcZuqRlpgS2dEjEW ZxtTB6chfag+sb+giAeu0oGyMVRxn07/PGrPIJQTZAfxr/DY7o7BAhLaTr78= X-Sasl-enc: +nW0EU9JtHX2TXK76FolgNsJhzO/49dWoOR8ECe0d+j1 1472227132 Received: from april.local (c-73-13-66-39.hsd1.pa.comcast.net [73.13.66.39]) by mail.messagingengine.com (Postfix) with ESMTPA id D25B0F29D1; Fri, 26 Aug 2016 11:58:52 -0400 (EDT) Subject: Re: [HACKERS] Unsupported feature F867: WITH TIES To: =?UTF-8?Q?J=c3=bcrgen_Purtz?= , pgsql-hackers@postgresql.org, pgsql-sql@postgresql.org References: <5ab043b6-686d-b907-6672-7d39738ebd6f@purtz.de> From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: <6a6214a6-68dc-e828-527c-c0509d9aee92@2ndquadrant.com> Date: Fri, 26 Aug 2016 11:58:52 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <5ab043b6-686d-b907-6672-7d39738ebd6f@purtz.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-sql Precedence: bulk Sender: pgsql-sql-owner@postgresql.org 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 -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql