diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2018-02-10 13:05:14 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2018-02-10 13:05:14 -0500 |
commit | 65b1d767856d96c7d6f952f30890dd5b7d4b66bb (patch) | |
tree | 81f43c2ee257f223e7d9f7f8943ac5274e24bb16 /src/include/parser/parse_node.h | |
parent | fad15f4a547ad433a28c370bd071b08df9e65f10 (diff) | |
download | postgresql-65b1d767856d96c7d6f952f30890dd5b7d4b66bb.tar.gz postgresql-65b1d767856d96c7d6f952f30890dd5b7d4b66bb.zip |
Fix oversight in CALL argument handling, and do some minor cleanup.
CALL statements cannot support sub-SELECTs in the arguments of the called
procedure, since they just use ExecEvalExpr to evaluate such arguments.
Teach transformSubLink() to reject the case, as it already does for other
contexts in which subqueries are not supported.
In passing, s/EXPR_KIND_CALL/EXPR_KIND_CALL_ARGUMENT/ to make that enum
symbol line up more closely with the phrasing of the error messages it is
associated with. And fix someone's weak grasp of English grammar in the
preceding EXPR_KIND_PARTITION_EXPRESSION addition. Also update an
incorrect comment in resolve_unique_index_expr (possibly it was correct
when written, but nowadays transformExpr definitely does reject SRFs here).
Per report from Pavel Stehule --- but this resolves only one of the bugs
he mentions.
Discussion: https://postgr.es/m/CAFj8pRDxOwPPzpA8i+AQeDQFj7bhVw-dR2==rfWZ3zMGkm568Q@mail.gmail.com
Diffstat (limited to 'src/include/parser/parse_node.h')
-rw-r--r-- | src/include/parser/parse_node.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/parser/parse_node.h b/src/include/parser/parse_node.h index 2e0792d60b0..0230543810f 100644 --- a/src/include/parser/parse_node.h +++ b/src/include/parser/parse_node.h @@ -69,7 +69,7 @@ typedef enum ParseExprKind 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_CALL /* CALL argument */ + EXPR_KIND_CALL_ARGUMENT /* procedure argument in CALL */ } ParseExprKind; |