pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Fix oversight in CALL argument handling, and do some minor clean
Date: Sat, 10 Feb 2018 18:05:19 +0000
Message-ID: <E1ekZWZ-0001a1-Vz@gemulon.postgresql.org> (raw)

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/65b1d767856d96c7d6f952f30890dd5b7d4b66bb

Modified Files
--------------
src/backend/commands/functioncmds.c        |  2 +-
src/backend/parser/parse_agg.c             | 10 +++++-----
src/backend/parser/parse_clause.c          | 11 +++++------
src/backend/parser/parse_expr.c            |  6 ++++--
src/backend/parser/parse_func.c            |  2 +-
src/include/parser/parse_node.h            |  2 +-
src/test/regress/expected/create_table.out |  4 ++--
7 files changed, 19 insertions(+), 18 deletions(-)



Message-ID: <E1ekZWZ-0001a1-Vz@gemulon.postgresql.org>
Permalink:  ../E1ekZWZ-0001a1-Vz@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1ekZWZ-0001a1-Vz@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Fix oversight in CALL argument handling, and do some minor clean
  In-Reply-To: <E1ekZWZ-0001a1-Vz@gemulon.postgresql.org>
  References: <E1ekZWZ-0001a1-Vz@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox