pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Remove absolete function TupleDescGetSlot().
8+ messages / 2 participants
[nested] [flat]

Commits from this thread:
  2018-09-27 27e082b0c6  Clean up in the wake of TupleDescGetSlot() removal / 10763358c3f.
* pgsql: Remove absolete function TupleDescGetSlot().
@ 2018-09-25 23:39 Andres Freund <andres@anarazel.de>
  2018-09-26 00:04 ` Re: pgsql: Remove absolete function TupleDescGetSlot(). Michael Paquier <michael@paquier.xyz>
  0 siblings, 1 reply; 8+ messages in thread

From: Andres Freund @ 2018-09-25 23:39 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Remove absolete function TupleDescGetSlot().

TupleDescGetSlot() was kept around for backward compatibility for
user-written SRFs. With the TupleTableSlot abstraction work, that code
will need to be version specific anyway, so there's no point in
keeping the function around any longer.

Author: Ashutosh Bapat
Reviewed-By: Andres Freund
Discussion: https://postgr.es/m/20180220224318.gw4oe5jadhpmcdnm@alap3.anarazel.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/10763358c3f0df48d2ae39b49b0c93be149cceab

Modified Files
--------------
src/backend/executor/execTuples.c | 22 ----------------------
1 file changed, 22 deletions(-)



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: pgsql: Remove absolete function TupleDescGetSlot().
  2018-09-25 23:39 pgsql: Remove absolete function TupleDescGetSlot(). Andres Freund <andres@anarazel.de>
@ 2018-09-26 00:04 ` Michael Paquier <michael@paquier.xyz>
  2018-09-26 00:10   ` Re: pgsql: Remove absolete function TupleDescGetSlot(). Andres Freund <andres@anarazel.de>
  0 siblings, 1 reply; 8+ messages in thread

From: Michael Paquier @ 2018-09-26 00:04 UTC (permalink / raw)
  To: Andres Freund <andres@anarazel.de>; +Cc: Postgres hackers <pgsql-hackers@postgresql.org>

Hi Andres,

On Tue, Sep 25, 2018 at 11:39:05PM +0000, Andres Freund wrote:
> Remove absolete function TupleDescGetSlot().
> 
> TupleDescGetSlot() was kept around for backward compatibility for
> user-written SRFs. With the TupleTableSlot abstraction work, that code
> will need to be version specific anyway, so there's no point in
> keeping the function around any longer.

There are still references in the code to this function, and a
declaration of it:
git grep TupleDescGetSlot
doc/src/sgml/xfunc.sgml:     * user-defined SRFs that use the deprecated TupleDescGetSlot().
src/include/funcapi.h:   * user-defined SRFs that use the deprecated TupleDescGetSlot().
src/include/funcapi.h: * TupleTableSlot *TupleDescGetSlot(TupleDesc tupdesc) - Builds a
src/include/funcapi.h:extern TupleTableSlot *TupleDescGetSlot(TupleDesc tupdesc);
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: pgsql: Remove absolete function TupleDescGetSlot().
  2018-09-25 23:39 pgsql: Remove absolete function TupleDescGetSlot(). Andres Freund <andres@anarazel.de>
  2018-09-26 00:04 ` Re: pgsql: Remove absolete function TupleDescGetSlot(). Michael Paquier <michael@paquier.xyz>
@ 2018-09-26 00:10   ` Andres Freund <andres@anarazel.de>
  2018-09-26 01:38     ` Re: pgsql: Remove absolete function TupleDescGetSlot(). Michael Paquier <michael@paquier.xyz>
  0 siblings, 1 reply; 8+ messages in thread

From: Andres Freund @ 2018-09-26 00:10 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; +Cc: Postgres hackers <pgsql-hackers@postgresql.org>

On 2018-09-26 09:04:14 +0900, Michael Paquier wrote:
> Hi Andres,
> 
> On Tue, Sep 25, 2018 at 11:39:05PM +0000, Andres Freund wrote:
> > Remove absolete function TupleDescGetSlot().
> > 
> > TupleDescGetSlot() was kept around for backward compatibility for
> > user-written SRFs. With the TupleTableSlot abstraction work, that code
> > will need to be version specific anyway, so there's no point in
> > keeping the function around any longer.
> 
> There are still references in the code to this function, and a
> declaration of it:

Hrmpf :/. Thanks for catching.


> src/include/funcapi.h: * TupleTableSlot *TupleDescGetSlot(TupleDesc tupdesc) - Builds a
> src/include/funcapi.h:extern TupleTableSlot *TupleDescGetSlot(TupleDesc tupdesc);

These two clearly need to go.


> git grep TupleDescGetSlot
> doc/src/sgml/xfunc.sgml:     * user-defined SRFs that use the deprecated TupleDescGetSlot().
> src/include/funcapi.h:   * user-defined SRFs that use the deprecated TupleDescGetSlot().

But here I'm less convinced. It's not entirely clear to me that the only
real reason for this to exists actually was TupleDescGetSlot(). OTOH, I
can't really see any proper reason to have it either.

Greetings,

Andres Freund




^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: pgsql: Remove absolete function TupleDescGetSlot().
  2018-09-25 23:39 pgsql: Remove absolete function TupleDescGetSlot(). Andres Freund <andres@anarazel.de>
  2018-09-26 00:04 ` Re: pgsql: Remove absolete function TupleDescGetSlot(). Michael Paquier <michael@paquier.xyz>
  2018-09-26 00:10   ` Re: pgsql: Remove absolete function TupleDescGetSlot(). Andres Freund <andres@anarazel.de>
@ 2018-09-26 01:38     ` Michael Paquier <michael@paquier.xyz>
  2018-09-26 01:42       ` Re: pgsql: Remove absolete function TupleDescGetSlot(). Andres Freund <andres@anarazel.de>
  0 siblings, 1 reply; 8+ messages in thread

From: Michael Paquier @ 2018-09-26 01:38 UTC (permalink / raw)
  To: Andres Freund <andres@anarazel.de>; +Cc: Postgres hackers <pgsql-hackers@postgresql.org>

On Tue, Sep 25, 2018 at 05:10:39PM -0700, Andres Freund wrote:
>> git grep TupleDescGetSlot
>> doc/src/sgml/xfunc.sgml:     * user-defined SRFs that use the deprecated TupleDescGetSlot().
>> src/include/funcapi.h:   * user-defined SRFs that use the deprecated TupleDescGetSlot().
> 
> But here I'm less convinced. It's not entirely clear to me that the only
> real reason for this to exists actually was TupleDescGetSlot(). OTOH, I
> can't really see any proper reason to have it either.

I have not been following the recent thread about the refactoring of
TupleSlot and such very closely, but if you don't plan to use
TupleTableSlot in FuncCallContext in the future, cannot this just go
away?  The function is not here anymore, so my take would be to get rid
of all things which relied on its presence.
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: pgsql: Remove absolete function TupleDescGetSlot().
  2018-09-25 23:39 pgsql: Remove absolete function TupleDescGetSlot(). Andres Freund <andres@anarazel.de>
  2018-09-26 00:04 ` Re: pgsql: Remove absolete function TupleDescGetSlot(). Michael Paquier <michael@paquier.xyz>
  2018-09-26 00:10   ` Re: pgsql: Remove absolete function TupleDescGetSlot(). Andres Freund <andres@anarazel.de>
  2018-09-26 01:38     ` Re: pgsql: Remove absolete function TupleDescGetSlot(). Michael Paquier <michael@paquier.xyz>
@ 2018-09-26 01:42       ` Andres Freund <andres@anarazel.de>
  2018-09-26 03:41         ` Re: pgsql: Remove absolete function TupleDescGetSlot(). Michael Paquier <michael@paquier.xyz>
  0 siblings, 1 reply; 8+ messages in thread

From: Andres Freund @ 2018-09-26 01:42 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; +Cc: Postgres hackers <pgsql-hackers@postgresql.org>

On 2018-09-26 10:38:51 +0900, Michael Paquier wrote:
> On Tue, Sep 25, 2018 at 05:10:39PM -0700, Andres Freund wrote:
> >> git grep TupleDescGetSlot
> >> doc/src/sgml/xfunc.sgml:     * user-defined SRFs that use the deprecated TupleDescGetSlot().
> >> src/include/funcapi.h:   * user-defined SRFs that use the deprecated TupleDescGetSlot().
> > 
> > But here I'm less convinced. It's not entirely clear to me that the only
> > real reason for this to exists actually was TupleDescGetSlot(). OTOH, I
> > can't really see any proper reason to have it either.
> 
> I have not been following the recent thread about the refactoring of
> TupleSlot and such very closely, but if you don't plan to use
> TupleTableSlot in FuncCallContext in the future, cannot this just go
> away?  The function is not here anymore, so my take would be to get rid
> of all things which relied on its presence.

My point is that FuncCallContext->slot isn't actually all that related
to TupleDescGetSlot() and could be used entirely independently.

Greetings,

Andres Freund




^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: pgsql: Remove absolete function TupleDescGetSlot().
  2018-09-25 23:39 pgsql: Remove absolete function TupleDescGetSlot(). Andres Freund <andres@anarazel.de>
  2018-09-26 00:04 ` Re: pgsql: Remove absolete function TupleDescGetSlot(). Michael Paquier <michael@paquier.xyz>
  2018-09-26 00:10   ` Re: pgsql: Remove absolete function TupleDescGetSlot(). Andres Freund <andres@anarazel.de>
  2018-09-26 01:38     ` Re: pgsql: Remove absolete function TupleDescGetSlot(). Michael Paquier <michael@paquier.xyz>
  2018-09-26 01:42       ` Re: pgsql: Remove absolete function TupleDescGetSlot(). Andres Freund <andres@anarazel.de>
@ 2018-09-26 03:41         ` Michael Paquier <michael@paquier.xyz>
  2018-09-26 19:35           ` Re: pgsql: Remove absolete function TupleDescGetSlot(). Andres Freund <andres@anarazel.de>
  0 siblings, 1 reply; 8+ messages in thread

From: Michael Paquier @ 2018-09-26 03:41 UTC (permalink / raw)
  To: Andres Freund <andres@anarazel.de>; +Cc: Postgres hackers <pgsql-hackers@postgresql.org>

On Tue, Sep 25, 2018 at 06:42:51PM -0700, Andres Freund wrote:
> My point is that FuncCallContext->slot isn't actually all that related
> to TupleDescGetSlot() and could be used entirely independently.

That's fair.  Why not just replacing the existing comment with something
like "slot can be used in your own context to store tuple values,
useful in the context of user-defined SRFs"?  Just my 2c.
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: pgsql: Remove absolete function TupleDescGetSlot().
  2018-09-25 23:39 pgsql: Remove absolete function TupleDescGetSlot(). Andres Freund <andres@anarazel.de>
  2018-09-26 00:04 ` Re: pgsql: Remove absolete function TupleDescGetSlot(). Michael Paquier <michael@paquier.xyz>
  2018-09-26 00:10   ` Re: pgsql: Remove absolete function TupleDescGetSlot(). Andres Freund <andres@anarazel.de>
  2018-09-26 01:38     ` Re: pgsql: Remove absolete function TupleDescGetSlot(). Michael Paquier <michael@paquier.xyz>
  2018-09-26 01:42       ` Re: pgsql: Remove absolete function TupleDescGetSlot(). Andres Freund <andres@anarazel.de>
  2018-09-26 03:41         ` Re: pgsql: Remove absolete function TupleDescGetSlot(). Michael Paquier <michael@paquier.xyz>
@ 2018-09-26 19:35           ` Andres Freund <andres@anarazel.de>
  2018-09-27 18:42             ` Re: pgsql: Remove absolete function TupleDescGetSlot(). Andres Freund <andres@anarazel.de>
  0 siblings, 1 reply; 8+ messages in thread

From: Andres Freund @ 2018-09-26 19:35 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; +Cc: Postgres hackers <pgsql-hackers@postgresql.org>

Hi,

On 2018-09-26 12:41:38 +0900, Michael Paquier wrote:
> On Tue, Sep 25, 2018 at 06:42:51PM -0700, Andres Freund wrote:
> > My point is that FuncCallContext->slot isn't actually all that related
> > to TupleDescGetSlot() and could be used entirely independently.
> 
> That's fair.  Why not just replacing the existing comment with something
> like "slot can be used in your own context to store tuple values,
> useful in the context of user-defined SRFs"?  Just my 2c.

I've tried to do search for users of FuncCallContext->slot and couldn't
find anything. Therefore I'm more inclined to drop it too - just about
all cases where it's useful seem to require a more extensive
datastructure around anyway.  Unless somebody protests I'm going to that
in a few - if somebody later in the cycle signals a need for it, we can
still revert that part.

Greetings,

Andres Freund




^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: pgsql: Remove absolete function TupleDescGetSlot().
  2018-09-25 23:39 pgsql: Remove absolete function TupleDescGetSlot(). Andres Freund <andres@anarazel.de>
  2018-09-26 00:04 ` Re: pgsql: Remove absolete function TupleDescGetSlot(). Michael Paquier <michael@paquier.xyz>
  2018-09-26 00:10   ` Re: pgsql: Remove absolete function TupleDescGetSlot(). Andres Freund <andres@anarazel.de>
  2018-09-26 01:38     ` Re: pgsql: Remove absolete function TupleDescGetSlot(). Michael Paquier <michael@paquier.xyz>
  2018-09-26 01:42       ` Re: pgsql: Remove absolete function TupleDescGetSlot(). Andres Freund <andres@anarazel.de>
  2018-09-26 03:41         ` Re: pgsql: Remove absolete function TupleDescGetSlot(). Michael Paquier <michael@paquier.xyz>
  2018-09-26 19:35           ` Re: pgsql: Remove absolete function TupleDescGetSlot(). Andres Freund <andres@anarazel.de>
@ 2018-09-27 18:42             ` Andres Freund <andres@anarazel.de>
  0 siblings, 0 replies; 8+ messages in thread

From: Andres Freund @ 2018-09-27 18:42 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; +Cc: Postgres hackers <pgsql-hackers@postgresql.org>

On 2018-09-26 12:35:25 -0700, Andres Freund wrote:
> Hi,
> 
> On 2018-09-26 12:41:38 +0900, Michael Paquier wrote:
> > On Tue, Sep 25, 2018 at 06:42:51PM -0700, Andres Freund wrote:
> > > My point is that FuncCallContext->slot isn't actually all that related
> > > to TupleDescGetSlot() and could be used entirely independently.
> > 
> > That's fair.  Why not just replacing the existing comment with something
> > like "slot can be used in your own context to store tuple values,
> > useful in the context of user-defined SRFs"?  Just my 2c.
> 
> I've tried to do search for users of FuncCallContext->slot and couldn't
> find anything. Therefore I'm more inclined to drop it too - just about
> all cases where it's useful seem to require a more extensive
> datastructure around anyway.  Unless somebody protests I'm going to that
> in a few - if somebody later in the cycle signals a need for it, we can
> still revert that part.

Done so now.

Greetings,

Andres Freund




^ permalink  raw  reply  [nested|flat] 8+ messages in thread


end of thread, other threads:[~2018-09-27 18:42 UTC | newest]

Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-09-25 23:39 pgsql: Remove absolete function TupleDescGetSlot(). Andres Freund <andres@anarazel.de>
2018-09-26 00:04 ` Michael Paquier <michael@paquier.xyz>
2018-09-26 00:10   ` Andres Freund <andres@anarazel.de>
2018-09-26 01:38     ` Michael Paquier <michael@paquier.xyz>
2018-09-26 01:42       ` Andres Freund <andres@anarazel.de>
2018-09-26 03:41         ` Michael Paquier <michael@paquier.xyz>
2018-09-26 19:35           ` Andres Freund <andres@anarazel.de>
2018-09-27 18:42             ` Andres Freund <andres@anarazel.de>

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