agora inbox for pgsql-hackers@postgresql.org  
help / color / mirror / Atom feed
From: Alvaro Herrera from 2ndQuadrant <alvherre@alvh.no-ip.org>
To: 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: Thu, 5 Sep 2019 18:51:58 -0400
Message-ID: <20190905225158.GA30717@alvherre.pgsql> (raw)
In-Reply-To: <CALAY4q9enemJLe4h16Jku9cYwX9UyCMcA4XWWp_UH79anS8=EA@mail.gmail.com>

As Tom just said in the thread for PERCENT, the gram.y changes need a
better representation.  Also, rename EXACT_NUMBER, per that thread.

As far as I can tell, this concerns feature F867.  I think we should
mark that as supported after this patch -- please edit
src/backend/catalog/sql_features.txt.

Earlier in the thread, Tomas Vondra said:

> 3) I'm a bit confused by the initialization added to ExecInitLimit. It
> first gets the tuple descriptor from the limitstate (it should not do so                                                                                                                    
> directly but use ExecGetResultType). But when it creates the extra slot,                                                                                                                    
> it uses ops extracted from the outer plan. That's strange, I guess ...                                                                                                                      
>                                                                                                                                                                                             
> And then it extracts the descriptor from the outer plan and uses it when                                                                                                                    
> calling execTuplesMatchPrepare. But AFAIK it's going to be compared to                                                                                                                      
> the last_slot, which is using a descriptor from the limitstate.                                                                                                                             
>                                                                                                                                                                                             
> IMHO all of this should use descriptor/ops from the outer plan, no? It                                                                                                                      
> probably does not change anything because limit does not project, but it                                                                                                                    
> seems confusing.                                                                                                                                                                            

and you replied:

> agree

... yet this doesn't appear to have resulted in any change in the code,
or I just missed it.  Are you going to update the patch per that?

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





view thread (61+ messages)  latest in thread

Message-ID: <20190905225158.GA30717@alvherre.pgsql>
Permalink:  ../20190905225158.GA30717@alvherre.pgsql/
Also on:    postgresql.org/message-id/20190905225158.GA30717@alvherre.pgsql

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: alvherre@alvh.no-ip.org, 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: <20190905225158.GA30717@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox