From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: SQL-standard function body
Date: Tue, 30 Jun 2020 14:51:38 -0400
Message-ID: <494838.1593543098@sss.pgh.pa.us> (raw)
In-Reply-To: <493812.1593541480@sss.pgh.pa.us>
References: <1c11f1eb-f00c-43b7-799d-2d44132c02d7@2ndquadrant.com>
<CA+TgmoZ-FXU0iyevFETN0sGYw0RKTSCFxKONGE+2nVJEM5_8OQ@mail.gmail.com>
<493812.1593541480@sss.pgh.pa.us>
I wrote:
> Replicating the creation-time search path will be a big headache for
> pg_dump, I bet.
On further thought, we probably don't have to. Re-parsing the function
body the same way is exactly the same problem as re-parsing a view or
matview body the same way. I don't want to claim that that's a 100%
solved problem, but I've heard few complaints in that area lately.
The point remains that exposing the function body's dependencies will
constrain restore order far more than we are accustomed to see. It
might be possible to build examples that flat out can't be restored,
even granting that we teach pg_dump how to break dependency loops
by first creating the function with empty body and later redefining
it with the real body. (Admittedly, if that's possible then you
likely could make it happen with views too. But somehow it seems
more likely that people would create spaghetti dependencies for
functions than views.)
regards, tom lane
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-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, peter.eisentraut@2ndquadrant.com
Subject: Re: SQL-standard function body
In-Reply-To: <494838.1593543098@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