Re: Function and Procedure with same signature?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: Deepak M <mahtodeepak05(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Function and Procedure with same signature?
Date: 2024-02-09 23:38:02
Message-ID: 1733885.1707521882@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> On Fri, Feb 9, 2024, 12:05 Deepak M <mahtodeepak05(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2024-02-10 00:06:35 Re: Printing backtrace of postgres processes
Previous Message Noah Misch 2024-02-09 23:27:57 Re: Popcount optimization using AVX512