Re: Odd procedure resolution

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Odd procedure resolution
Date: 2018-05-17 20:54:34
Message-ID: 7517.1526590474@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> writes:
> I think I have made a mistake here. I was reading in between the lines
> of a competitor's documentation that they have functions and procedures
> in different name spaces, which made me re-read the SQL standard, which
> appears to support that approach.

> So I'm proposing here a patch to fix that. It is similar to the patch
> proposed earlier in the thread, but more extensive.

> One open problem in my patch is that regproc/regprocedure don't have a
> way to distinguish functions from procedures. Maybe a two-argument
> version of to_regprocedure? This will also affect psql's \ef function
> and the like.

TBH, this is several months too late for v11. You're talking about a
really fundamental redesign, at least if it's done right and not as a
desperate last-minute hack (which is what this looks like). The points
you make here are just the tip of the iceberg of things that would need
to be reconsidered.

I also remain of the opinion that if we're to separate these namespaces,
the way to do that is to put procedures somewhere other than pg_proc.

Unless you can show that "separate namespaces" is the *only* correct
reading of the SQL spec, which I doubt given the ROUTINE syntax,
I think we're pretty much stuck with the choice we made already.

Or we can push beta back a month or two while we rethink that.
But there's no way you're convincing me that this is a good change
to make four days before beta.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2018-05-17 20:56:05 Re: Incorrect comment in get_partition_dispatch_recurse
Previous Message Andrew Gierth 2018-05-17 20:42:59 Re: [GSoC] Question about returning bytea array