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-07-01T14:14:10Z
Lists: pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes: > In my experience, there's certainly demand for some kind of mode where > plpgsql functions get checked at function definition time, rather than > at execution time. Yeah, absolutely agreed. But I'm afraid this proposal takes us too far in the other direction: with this, you *must* have a 100% parseable and semantically valid function body, every time all the time. So far as plpgsql is concerned, I could see extending the validator to run parse analysis (not just raw parsing) on all SQL statements in the body. This wouldn't happen of course with check_function_bodies off, so it wouldn't affect dump/reload. But likely there would still be demand for more fine-grained control over it ... or maybe it could stop doing analysis as soon as it finds a DDL command? 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