Re: BUG #19034: Recursive function with sql_body can replace an existing function but can not be created on it's own
От | David G. Johnston |
---|---|
Тема | Re: BUG #19034: Recursive function with sql_body can replace an existing function but can not be created on it's own |
Дата | |
Msg-id | CAKFQuwaFZzT3XCQiyX47Q6sP735CHBxONF6NWzB=0ikssf=3pQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: BUG #19034: Recursive function with sql_body can replace an existing function but can not be created on it's own (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: BUG #19034: Recursive function with sql_body can replace an existing function but can not be created on it's own
|
Список | pgsql-bugs |
On Sun, Sep 7, 2025, 15:37 Tom Lane <tgl@sss.pgh.pa.us> wrote:
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> Right, because the oid is preserved when the create or replace finishes
> pg_depend must have an entry where objid = refobjid where the oid value is
> that of the originally created function that is now just being altered.
> That situation seems detectable and prohibit-able.
This would not fix the problem for the case of two or more mutually
recursive functions (that is, a() calls b() calls a()). So I don't
find it to be an attractive answer.
Tack on a modified implementation of the existing detection of circular dependencies among roles to detect circular dependencies among sql_body functions?
While I agree making it must work would be nice given the presence of simple alternatives to use when this functionality is required it's got to be easier to detect and prohibit creation.
David J.
В списке pgsql-bugs по дате отправления: