Обсуждение: pgsql: Create new ParseExprKind for use by policy expressions.

Поиск
Список
Период
Сортировка

pgsql: Create new ParseExprKind for use by policy expressions.

От
Joe Conway
Дата:
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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/632cd9f892119858bc5b617bb60c0377a8a2ed13

Modified Files
--------------
src/backend/commands/policy.c                    |    8 ++++----
src/backend/parser/parse_agg.c                   |   10 ++++++++++
src/backend/parser/parse_expr.c                  |    3 +++
src/include/parser/parse_node.h                  |    3 ++-
src/test/modules/test_rls_hooks/test_rls_hooks.c |    4 ++--
src/test/regress/expected/rowsecurity.out        |    9 +++++++++
src/test/regress/sql/rowsecurity.sql             |    9 +++++++++
7 files changed, 39 insertions(+), 7 deletions(-)