diff options
| author | Peter Eisentraut | 2017-11-30 13:46:13 +0000 |
|---|---|---|
| committer | Peter Eisentraut | 2017-11-30 16:03:20 +0000 |
| commit | e4128ee767df3c8c715eb08f8977647ae49dfb59 (patch) | |
| tree | 6513b824fd69b982057f5fe2742039597ce6cea4 /src/include/commands | |
| parent | 1761653bbb17447906c812c347b3fe284ce699cf (diff) | |
SQL procedures
This adds a new object type "procedure" that is similar to a function
but does not have a return type and is invoked by the new CALL statement
instead of SELECT or similar. This implementation is aligned with the
SQL standard and compatible with or similar to other SQL implementations.
This commit adds new commands CALL, CREATE/ALTER/DROP PROCEDURE, as well
as ALTER/DROP ROUTINE that can refer to either a function or a
procedure (or an aggregate function, as an extension to SQL). There is
also support for procedures in various utility commands such as COMMENT
and GRANT, as well as support in pg_dump and psql. Support for defining
procedures is available in all the languages supplied by the core
distribution.
While this commit is mainly syntax sugar around existing functionality,
future features will rely on having procedures as a separate object
type.
Reviewed-by: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Diffstat (limited to 'src/include/commands')
| -rw-r--r-- | src/include/commands/defrem.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/commands/defrem.h b/src/include/commands/defrem.h index bfead9af3d1..52cbf61ccb0 100644 --- a/src/include/commands/defrem.h +++ b/src/include/commands/defrem.h @@ -59,12 +59,13 @@ extern void DropTransformById(Oid transformOid); extern void IsThereFunctionInNamespace(const char *proname, int pronargs, oidvector *proargtypes, Oid nspOid); extern void ExecuteDoStmt(DoStmt *stmt); +extern void ExecuteCallStmt(ParseState *pstate, CallStmt *stmt); extern Oid get_cast_oid(Oid sourcetypeid, Oid targettypeid, bool missing_ok); extern Oid get_transform_oid(Oid type_id, Oid lang_id, bool missing_ok); extern void interpret_function_parameter_list(ParseState *pstate, List *parameters, Oid languageOid, - bool is_aggregate, + ObjectType objtype, oidvector **parameterTypes, ArrayType **allParameterTypes, ArrayType **parameterModes, |
