postgresql/src/backend/utils/adt
Alexander Korotkov 3161ae86ce Fix jsonpath existense checking of missing variables
The current jsonpath code assumes that the referenced variable always exists.
It could only throw an error at the value valuation time.  At the same time
existence checking assumes variable is present without valuation, and error
suppression doesn't work for missing variables.

This commit makes existense checking trigger an error for missing variables.
This makes the overall behavior consistent.

Backpatch to 12 where jsonpath was introduced.

Reported-by: David G. Johnston
Discussion: https://postgr.es/m/CAKFQuwbeytffJkVnEqDyLZ%3DrQsznoTh1OgDoOF3VmOMkxcTMjA%40mail.gmail.com
Author: Alexander Korotkov, David G. Johnston
Backpatch-through: 12
2023-01-12 18:16:34 +03:00
..
.gitignore Build all Flex files standalone 2022-09-04 12:09:01 +07:00
acl.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
amutils.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
array_expanded.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
array_selfuncs.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
array_typanalyze.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
array_userfuncs.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
arrayfuncs.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
arraysubs.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
arrayutils.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
ascii.c New header varatt.h split off from postgres.h 2023-01-10 05:54:36 +01:00
bool.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
cash.c Convert a few more datatype input functions to report errors softly. 2022-12-14 18:03:11 -05:00
char.c New header varatt.h split off from postgres.h 2023-01-10 05:54:36 +01:00
cryptohashfuncs.c New header varatt.h split off from postgres.h 2023-01-10 05:54:36 +01:00
date.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
datetime.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
datum.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
dbsize.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
domains.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
encode.c New header varatt.h split off from postgres.h 2023-01-10 05:54:36 +01:00
enum.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
expandeddatum.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
expandedrecord.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
float.c Invent random_normal() to provide normally-distributed random numbers. 2023-01-09 12:44:00 -05:00
format_type.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
formatting.c New header varatt.h split off from postgres.h 2023-01-10 05:54:36 +01:00
genfile.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
geo_ops.c New header varatt.h split off from postgres.h 2023-01-10 05:54:36 +01:00
geo_selfuncs.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
geo_spgist.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
hbafuncs.c Rename some variables related to ident files in hba.{c,h} 2023-01-12 14:23:20 +09:00
inet_cidr_ntop.c Avoid conflicts with library versions of inet_net_ntop() and friends. 2019-08-18 19:27:23 -04:00
inet_net_pton.c Avoid conflicts with library versions of inet_net_ntop() and friends. 2019-08-18 19:27:23 -04:00
int.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
int8.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
json.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
jsonb.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
jsonb_gin.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
jsonb_op.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
jsonb_util.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
jsonbsubs.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
jsonfuncs.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
jsonpath.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
jsonpath_exec.c Fix jsonpath existense checking of missing variables 2023-01-12 18:16:34 +03:00
jsonpath_gram.y Update copyright for 2023 2023-01-02 15:00:37 -05:00
jsonpath_internal.h Update copyright for 2023 2023-01-02 15:00:37 -05:00
jsonpath_scan.l Update copyright for 2023 2023-01-02 15:00:37 -05:00
levenshtein.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
like.c New header varatt.h split off from postgres.h 2023-01-10 05:54:36 +01:00
like_match.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
like_support.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
lockfuncs.c Fix the display of lock information for specktoken. 2023-01-10 08:53:47 +05:30
mac.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
mac8.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
Makefile Build all Flex files standalone 2022-09-04 12:09:01 +07:00
mcxtfuncs.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
meson.build Update copyright for 2023 2023-01-02 15:00:37 -05:00
misc.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
multirangetypes.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
multirangetypes_selfuncs.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
name.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
network.c Convert a few more datatype input functions to report errors softly. 2022-12-14 13:22:08 -05:00
network_gist.c New header varatt.h split off from postgres.h 2023-01-10 05:54:36 +01:00
network_selfuncs.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
network_spgist.c New header varatt.h split off from postgres.h 2023-01-10 05:54:36 +01:00
numeric.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
numutils.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
oid.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
oracle_compat.c New header varatt.h split off from postgres.h 2023-01-10 05:54:36 +01:00
orderedsetaggs.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
partitionfuncs.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
pg_locale.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
pg_lsn.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
pg_upgrade_support.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
pgstatfuncs.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
pseudotypes.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
quote.c New header varatt.h split off from postgres.h 2023-01-10 05:54:36 +01:00
rangetypes.c New header varatt.h split off from postgres.h 2023-01-10 05:54:36 +01:00
rangetypes_gist.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
rangetypes_selfuncs.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
rangetypes_spgist.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
rangetypes_typanalyze.c New header varatt.h split off from postgres.h 2023-01-10 05:54:36 +01:00
regexp.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
regproc.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
ri_triggers.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
rowtypes.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
ruleutils.c Fix typos in comments, code and documentation 2023-01-03 16:26:14 +09:00
selfuncs.c Allow left join removals and unique joins on partitioned tables 2023-01-09 17:15:08 +13:00
tid.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
timestamp.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
trigfuncs.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
tsginidx.c New header varatt.h split off from postgres.h 2023-01-10 05:54:36 +01:00
tsgistidx.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
tsquery.c New header varatt.h split off from postgres.h 2023-01-10 05:54:36 +01:00
tsquery_cleanup.c New header varatt.h split off from postgres.h 2023-01-10 05:54:36 +01:00
tsquery_gist.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
tsquery_op.c New header varatt.h split off from postgres.h 2023-01-10 05:54:36 +01:00
tsquery_rewrite.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
tsquery_util.c New header varatt.h split off from postgres.h 2023-01-10 05:54:36 +01:00
tsrank.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
tsvector.c New header varatt.h split off from postgres.h 2023-01-10 05:54:36 +01:00
tsvector_op.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
tsvector_parser.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
uuid.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
varbit.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
varchar.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
varlena.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
version.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
windowfuncs.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
xid.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
xid8funcs.c Update copyright for 2023 2023-01-02 15:00:37 -05:00
xml.c Update copyright for 2023 2023-01-02 15:00:37 -05:00