Re: BUG #19034: Recursive function with sql_body can replace an existing function but can not be created on it's own - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #19034: Recursive function with sql_body can replace an existing function but can not be created on it's own
Date
Msg-id 1365203.1757081925@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #19034: Recursive function with sql_body can replace an existing function but can not be created on it's own  (Laurenz Albe <laurenz.albe@cybertec.at>)
List pgsql-bugs
Laurenz Albe <laurenz.albe@cybertec.at> writes:
> On Thu, 2025-09-04 at 11:24 -0400, Tom Lane wrote:
>> Given that recursive SQL functions are a tiny-minority use case
>> and there's already a perfectly serviceable way to make them
>> (ie use an old-style body), I seriously doubt that we'll do
>> anything about this request.

> Sure, but creating a dump that will fail to load is not good.

Oh, if you are defining the problem as "pg_dump doesn't cope after
I make this function in two steps" rather than "the server should
allow this to be done in one step", that seems more defensible.

One could expect that that'd let pg_dump also cope with cases
involving mutual recursion between two or more such functions,
which is something we'd certainly not try to make the server
allow without help.

            regards, tom lane



pgsql-bugs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: BUG #19034: Recursive function with sql_body can replace an existing function but can not be created on it's own
Next
From: "David G. Johnston"
Date:
Subject: Re: BUG #19043: jdbc connection url is not case insensitive