2 ms·
I'm probably wrong, but I think Stored Procedures are being introduced in 11. From the announcement: "SQL Stored Procedures PostgreSQL 11 introduces SQL store
by fjcp 8y ago
I'm probably wrong, but I think Stored Procedures are being introduced in 11.
From the announcement:
"SQL Stored Procedures
PostgreSQL 11 introduces SQL stored procedures that allow users to use embedded transactions (i.e. BEGIN, COMMIT/ROLLBACK) within a procedure. Procedures can be created using the CREATE PROCEDURE command and executed using the CALL command."
It doesn't make sense to teach people how to create procedures if they already have them before. The docs[0] also don't have a section for CREATE PROCEDURE before 11[1].
It is a great tool anyway, better late than never.
[0] https://www.postgresql.org/docs/10/static/sql-commands.html https://www.postgresql.org/docs/10/static/sql-commands.html
[1] https://www.postgresql.org/docs/11/static/sql-commands.html https://www.postgresql.org/docs/11/static/sql-commands.html
- gmfawcett 8y agoYou're correct, "CREATE PROCEDURE" didn't exist until PG 11. But "CREATE FUNCTION" has existed for ages, and it covers most of the common cases for server-side logic.