Re: SQL-standard function body
Thomas Munro <thomas.munro@gmail.com>
From: Thomas Munro <thomas.munro@gmail.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2020-07-01T22:56:24Z
Lists: pgsql-hackers
On Wed, Jul 1, 2020 at 5:58 AM Robert Haas <robertmhaas@gmail.com> wrote: > On Tue, Jun 30, 2020 at 1:49 PM Peter Eisentraut > <peter.eisentraut@2ndquadrant.com> 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. > > With what other implementations is it compatible? Judging by the Wikipedia article[1], it sounds like at least DB2 and MySQL/MariaDB are purposely striving for conformance. When I worked with DB2 a few years back I preferred to use their standard-conforming PL stuff (as opposed to their be-more-like-Oracle PL/SQL mode), and I always hoped that PostgreSQL would eventually understand the same syntax; admittedly, anyone who has ever worked on large applications that support multiple RDBMSs knows that there's more than just surface syntax to worry about, but it still seems like a pretty solid plan to conform to the standard that's in our name, so +1 from me on the general direction (I didn't look at the patch). [1] https://en.wikipedia.org/wiki/SQL/PSM
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