Re: Function and Procedure with same signature?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Function and Procedure with same signature?
Дата
Msg-id 1733885.1707521882@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Function and Procedure with same signature?  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: Function and Procedure with same signature?  (Hannu Krosing <hannuk@google.com>)
Список 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 по дате отправления:

Предыдущее
От: Noah Misch
Дата:
Сообщение: Re: Popcount optimization using AVX512
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Printing backtrace of postgres processes