pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: Yushu Chen <gentcys@gmail.com>
Cc: katja.henke@foo.ag
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #19034: Recursive function with sql_body can replace an existing function but can not be created on it's own
Date: Fri, 05 Sep 2025 10:18:45 -0400
Message-ID: <1365203.1757081925@sss.pgh.pa.us> (raw)
In-Reply-To: <8dec121e2d3bfc1149d36359345fbce1faa087aa.camel@cybertec.at>
References: <19034-de0857b4f94ec10c@postgresql.org>
	<CAP5x3pZvk6D9b9mmKBEYKqZvJcDpH5OfZ419aVgzr+xXpo4O=w@mail.gmail.com>
	<1030106.1756999498@sss.pgh.pa.us>
	<8dec121e2d3bfc1149d36359345fbce1faa087aa.camel@cybertec.at>

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





view thread (13+ messages)  latest in thread

Message-ID: <1365203.1757081925@sss.pgh.pa.us>
Permalink:  ../1365203.1757081925@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1365203.1757081925@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, laurenz.albe@cybertec.at, gentcys@gmail.com, katja.henke@foo.ag, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #19034: Recursive function with sql_body can replace an existing function but can not be created on it's own
  In-Reply-To: <1365203.1757081925@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox