Re: SQL-standard function body
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2020-06-30T18:51:38Z
Lists: pgsql-hackers
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
Commits
-
Don't crash on empty statements in SQL-standard function bodies.
- bfeede9fa464 14.0 landed
-
psql: Fix line continuation prompts for unbalanced parentheses
- d9a9f4b4b92a 14.0 landed
-
Provide query source text when parsing a SQL-standard function body.
- 409723365b27 14.0 landed
-
Revert "Cope with NULL query string in ExecInitParallelPlan()."
- 83efce7a1ebc 14.0 landed
-
Undo decision to allow pg_proc.prosrc to be NULL.
- 1111b2668d89 14.0 landed
-
SQL-standard function body
- e717a9a18b2e 14.0 landed
-
Move pg_stat_statements query jumbling to core.
- 5fd9dfa5f50e 14.0 cited
-
Extend SQL function tests lightly
- 11b80d900fe4 14.0 landed