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@lists.postgresql.org
Subject: pgsql: Provide an error cursor for "can't subscript" error messages.
Date: Fri, 11 Dec 2020 23:58:39 +0000
Message-ID: <E1knsJ5-0005O7-4E@gemulon.postgresql.org> (raw)

Provide an error cursor for "can't subscript" error messages.

Commit c7aba7c14 didn't add this, but after more fooling with the
feature I feel that it'd be useful.  To make this possible, refactor
getSubscriptingRoutines() so that the caller is responsible for
throwing any error.  (In clauses.c, I just chose to make the
most conservative assumption rather than throwing an error.  We don't
expect failures there anyway really, so the code space for an error
message would be a poor investment.)

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/653aa603f501aa6e4865105a928cd13082ee7152

Modified Files
--------------
src/backend/executor/execExpr.c      | 8 ++++++++
src/backend/optimizer/util/clauses.c | 5 +++--
src/backend/parser/parse_node.c      | 6 ++++++
src/backend/utils/cache/lsyscache.c  | 7 ++-----
src/test/regress/expected/arrays.out | 2 ++
5 files changed, 21 insertions(+), 7 deletions(-)



view thread (2+ messages)

Message-ID: <E1knsJ5-0005O7-4E@gemulon.postgresql.org>
Permalink:  ../E1knsJ5-0005O7-4E@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1knsJ5-0005O7-4E@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: Provide an error cursor for "can't subscript" error messages.
  In-Reply-To: <E1knsJ5-0005O7-4E@gemulon.postgresql.org>
  References: <E1knsJ5-0005O7-4E@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