Re: Function and Procedure with same signature? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Function and Procedure with same signature?
Date
Msg-id 1733885.1707521882@sss.pgh.pa.us
Whole thread Raw
In response to Re: Function and Procedure with same signature?  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: Function and Procedure with same signature?
List pgsql-hackers
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Fri, Feb 9, 2024, 12:05 Deepak M <mahtodeepak05@gmail.com> wrote:
>> Folks, When tried to create a function with the same signature as
>> procedure it fails.

> That seems like a good hint you cannot do it.  Specifically because they
> get defined in the same internal catalog within which names must be unique.

Worth noting perhaps that this is actually required by the SQL
standard: per spec, functions and procedures are both "routines"
and share the same namespace, which is necessary so that commands
like DROP ROUTINE are well-defined.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Noah Misch
Date:
Subject: Re: Popcount optimization using AVX512
Next
From: Michael Paquier
Date:
Subject: Re: Printing backtrace of postgres processes