Re: [HACKERS] SQL procedures

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] SQL procedures
Date: 2017-11-14 15:57:26
Message-ID: 32ceef13-595d-a698-128c-b90ab9494a52@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 11/8/17 09:54, Tom Lane wrote:
> Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> writes:
>> On 10/31/17 14:23, Tom Lane wrote:
>>> Why not use VOIDOID for the prorettype value?
>
>> We need a way to distinguish functions that are callable by SELECT and
>> procedures that are callable by CALL.
>
> Do procedures of this ilk belong in pg_proc at all? It seems like a large
> fraction of the attributes tracked in pg_proc are senseless for this
> purpose. A new catalog might be a better approach.

The common functionality between functions and procedures is like 98%
[citation needed], so they definitely belong there, even more so than
aggregates, for example.

> In any case, I buy none of your arguments that 0 is a better choice than a
> new pseudotype.

Well, I haven't heard any reasons for doing it differently, so I can't
judge the relative merits of either approach. Ultimately, it would be a
minor detail as far as the code is concerned, I think.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Antonin Houska 2017-11-14 16:00:01 Re: [HACKERS] [PATCH] Incremental sort
Previous Message Peter Eisentraut 2017-11-14 15:54:57 Re: [HACKERS] SQL procedures