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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Provide an error cursor for "can't subscript" error messages.
Date: 2020-12-11 23:58:39
Message-ID: E1knsJ5-0005O7-4E@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2020-12-12 17:51:34 pgsql: initdb: properly alphabetize getopt_long options in C string
Previous Message Peter Eisentraut 2020-12-11 18:18:04 pgsql: pg_dump: Don't use enums for defining bit mask values