Re: [HACKERS] SQL procedures

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Daniel Verite <daniel(at)manitou-mail(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] SQL procedures
Date: 2017-11-14 18:54:07
Message-ID: CANP8+jJNyQ3tXgqbuTfMw3euHk8ygJnrLHUaweM+N53MdABmbA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 14 November 2017 at 12:56, Daniel Verite <daniel(at)manitou-mail(dot)org> wrote:
> Tom Lane wrote:
>
>> Do we really want the existence of a function foo(int) to mean
>> that you can't create a SQL procedure named
>> foo and taking one int argument?
>
> Isn't it pretty much implied by the
> ALTER | DROP ROUTINE foo(...)
> commands where foo(...) may be either a procedure
> or a function? It doesn't look like it could be both.

It doesn't seem particularly troublesome to create another catalog
table, if needed, so that shouldn't drive our thinking.

It would seem to be implied by the SQLStandard that Functions and
Procedures occupy the same namespace, since they are both Routines.

I can't see any benefit from having foo() function AND foo() procedure
at same time. It would certainly confuse most people that come from
programming languages without that distinction, but maybe someone
knows some Oracle-foo that I don't?

--
Simon Riggs 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 Robert Haas 2017-11-14 18:55:55 Re: [HACKERS] parallelize queries containing initplans
Previous Message Simon Riggs 2017-11-14 18:43:36 Re: [HACKERS] Proposal: Local indexes for partitioned table