Re: SQL-standard function body
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2020-09-07T06:00:08Z
Lists: pgsql-hackers
Attachments
- v3-0001-SQL-standard-function-body.patch (text/plain) patch v3-0001
Some conflicts have emerged, so here is an updated patch. I have implemented/fixed the inlining of set-returning functions written in the new style, which was previously marked TODO in the patch. On 2020-08-28 07:33, Peter Eisentraut wrote: > On 2020-06-30 19:49, Peter Eisentraut wrote: >> This adds support for writing CREATE FUNCTION and CREATE PROCEDURE >> statements for language SQL with a function body that conforms to the >> SQL standard and is portable to other implementations. > > Here is a new patch. The only significant change is that pg_dump > support is now fixed. Per the discussion in [0], I have introduced a > new function pg_get_function_sqlbody() that just produces the formatted > SQL body, not the whole function definition. All the tests now pass. > As mentioned before, more tests are probably needed, so if reviewers > just want to play with this and find things that don't work, those could > be put into test cases, for example. > > As a thought, a couple of things could probably be separated from this > patch and considered separately: > > 1. making LANGUAGE SQL the default > > 2. the RETURN statement > > If reviewers think that would be sensible, I can prepare separate > patches for those. > > > [0]: > https://www.postgresql.org/message-id/flat/9df8a3d3-13d2-116d-26ab-6a273c1ed38c%402ndquadrant.com > -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
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