summaryrefslogtreecommitdiff
path: root/src/include/parser/parse_node.h
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2017-11-30 08:46:13 -0500
committerPeter Eisentraut <peter_e@gmx.net>2017-11-30 11:03:20 -0500
commite4128ee767df3c8c715eb08f8977647ae49dfb59 (patch)
tree6513b824fd69b982057f5fe2742039597ce6cea4 /src/include/parser/parse_node.h
parent1761653bbb17447906c812c347b3fe284ce699cf (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/parser/parse_node.h')
-rw-r--r--src/include/parser/parse_node.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/parser/parse_node.h b/src/include/parser/parse_node.h
index f0e210ad8d8..565bb3dc6cf 100644
--- a/src/include/parser/parse_node.h
+++ b/src/include/parser/parse_node.h
@@ -67,7 +67,8 @@ typedef enum ParseExprKind
EXPR_KIND_EXECUTE_PARAMETER, /* parameter value in EXECUTE */
EXPR_KIND_TRIGGER_WHEN, /* WHEN condition in CREATE TRIGGER */
EXPR_KIND_POLICY, /* USING or WITH CHECK expr in policy */
- EXPR_KIND_PARTITION_EXPRESSION /* PARTITION BY expression */
+ EXPR_KIND_PARTITION_EXPRESSION, /* PARTITION BY expression */
+ EXPR_KIND_CALL /* CALL argument */
} ParseExprKind;