From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: SQL procedures
Date: Wed, 8 Nov 2017 09:21:11 -0500
Message-ID: <f2b2ac79-f7d0-e736-ac12-50a103d0dcbd@2ndquadrant.com> (raw)
In-Reply-To: <9388.1509474184@sss.pgh.pa.us>
References: <336f6926-8990-ff2d-4167-276ce417fc32@2ndquadrant.com>
<9388.1509474184@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
On 10/31/17 14:23, Tom Lane wrote:
> Putting 0 in prorettype seems like a pretty bad idea.
It seemed like the natural thing to do, since we use a zero OID to
indicate "nothing" in many other places.
> 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.
> Or if there is some reason why "void" isn't the
> right pseudotype, maybe you should invent a new one, analogous to the
> "trigger" and "event_trigger" pseudotypes.
I guess that would be doable, but I think it would make things more
complicated without any gain that I can see. In the case of the
pseudotypes you mention, those are the actual types mentioned in the
CREATE FUNCTION command. If we invented a new pseudotype, that would
run the risk of existing code creating nonsensical reverse compilations
like CREATE FUNCTION RETURNS PROCEDURE. Catalog queries using
prorettype == 0 would behave sensibly by default. For example, an inner
or outer join against pg_type would automatically make sense.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: peter.eisentraut@2ndquadrant.com, tgl@sss.pgh.pa.us
Subject: Re: SQL procedures
In-Reply-To: <f2b2ac79-f7d0-e736-ac12-50a103d0dcbd@2ndquadrant.com>
References: <336f6926-8990-ff2d-4167-276ce417fc32@2ndquadrant.com> <9388.1509474184@sss.pgh.pa.us> <f2b2ac79-f7d0-e736-ac12-50a103d0dcbd@2ndquadrant.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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