summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorTom Lane2020-12-11 22:54:10 +0000
committerTom Lane2020-12-11 23:58:21 +0000
commit653aa603f501aa6e4865105a928cd13082ee7152 (patch)
tree158acf06d799a63fa44fc83e9800a3896ad66255 /src/test
parentd2a2808eb444986d2fe716a48e21993329142f3d (diff)
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.)
Diffstat (limited to 'src/test')
-rw-r--r--src/test/regress/expected/arrays.out2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/test/regress/expected/arrays.out b/src/test/regress/expected/arrays.out
index 0254fac8011..8bc7721e7d5 100644
--- a/src/test/regress/expected/arrays.out
+++ b/src/test/regress/expected/arrays.out
@@ -238,6 +238,8 @@ ERROR: array subscript in assignment must not be null
-- Un-subscriptable type
SELECT (now())[1];
ERROR: cannot subscript type timestamp with time zone because it does not support subscripting
+LINE 1: SELECT (now())[1];
+ ^
-- test slices with empty lower and/or upper index
CREATE TEMP TABLE arrtest_s (
a int2[],