diff options
author | Joe Conway <mail@joeconway.com> | 2015-07-29 15:41:00 -0700 |
---|---|---|
committer | Joe Conway <mail@joeconway.com> | 2015-07-29 15:41:00 -0700 |
commit | 43797ed42a7c0365c9143ad6efdc566ac9d93fd8 (patch) | |
tree | fc04f3dc24120507a592fbf859b97d7eebdfc3c5 /src/include/parser/parse_node.h | |
parent | 3ef1a682d5e4a919dcaddc8256ea65de91654d1c (diff) |
Create new ParseExprKind for use by policy expressions.
Policy USING and WITH CHECK expressions were using EXPR_KIND_WHERE for
parse analysis, which results in inappropriate ERROR messages when
the expression contains unsupported constructs such as aggregates.
Create a new ParseExprKind called EXPR_KIND_POLICY and tailor the
related messages to fit.
Reported by Noah Misch. Reviewed by Dean Rasheed, Alvaro Herrera,
and Robert Haas. Back-patch to 9.5 where RLS was introduced.
Diffstat (limited to 'src/include/parser/parse_node.h')
-rw-r--r-- | src/include/parser/parse_node.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/parser/parse_node.h b/src/include/parser/parse_node.h index 7ecaffc0dc3..52499453690 100644 --- a/src/include/parser/parse_node.h +++ b/src/include/parser/parse_node.h @@ -63,7 +63,8 @@ typedef enum ParseExprKind EXPR_KIND_INDEX_PREDICATE, /* index predicate */ EXPR_KIND_ALTER_COL_TRANSFORM, /* transform expr in ALTER COLUMN TYPE */ EXPR_KIND_EXECUTE_PARAMETER, /* parameter value in EXECUTE */ - EXPR_KIND_TRIGGER_WHEN /* WHEN condition in CREATE TRIGGER */ + EXPR_KIND_TRIGGER_WHEN, /* WHEN condition in CREATE TRIGGER */ + EXPR_KIND_POLICY /* USING or WITH CHECK expr in policy */ } ParseExprKind; |