5 ms·
Stored functions, not procedures. The difference is explained here: https://www.postgresql.org/docs/11/static/xproc.html https://www.postgresql.org/docs/11/sta
by colanderman 8y ago
Stored functions, not procedures. The difference is explained here: https://www.postgresql.org/docs/11/static/xproc.html https://www.postgresql.org/docs/11/static/xproc.html Basically, procedures do not return values, and can have nested transactions. (Today, functions are used to accomplish much of what seems more appropriate for a procedure.)
- cryptonector 8y agoThey do return values: https://www.postgresql.org/docs/devel/static/sql-call.html https://www.postgresql.org/docs/devel/static/sql-call.html CALL executes a procedure. If the procedure has output arguments, then a result row will be returned. and from https://www.postgresql.org/docs/devel/static/sql-createprocedure.html https://www.postgresql.org/docs/devel/static/sql-createproce... argmode The mode of an argument: IN, INOUT, or VARIADIC. If omitted, the default is IN. (OUT arguments are currently not supported for procedures. Use INOUT instead.)
- colanderman 8y agoNot in the sense of a function; you can't call a procedure from within an expression. Interesting that they can produce output rows though.
- cryptonector 8y agoYes, that's true.