mirror of
https://github.com/postgres/postgres.git
synced 2025-11-04 20:11:56 +03:00
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.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user