aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/jsonpath_exec.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2024-06-11 17:57:46 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2024-06-11 17:57:46 -0400
commit915de706d28c433283e9dc63701e8f978488a2b9 (patch)
tree0329cea84f33a685a0c78b1174e2cad693a06f44 /src/backend/utils/adt/jsonpath_exec.c
parentc2fab70248d8b9f129d2333c91b7a6e279a591e3 (diff)
downloadpostgresql-915de706d28c433283e9dc63701e8f978488a2b9.tar.gz
postgresql-915de706d28c433283e9dc63701e8f978488a2b9.zip
Fix infer_arbiter_indexes() to not assume resultRelation is 1.
infer_arbiter_indexes failed to renumber varnos in index expressions or predicates that it got from the catalogs. This escaped detection up to now because the stored varnos in such trees will be 1, and an INSERT's result relation is usually the first rangetable entry, so that that was fine. However, in cases such as inserting through an updatable view, it's not fine, leading to failure to match the expressions to the query with ensuing "there is no unique or exclusion constraint matching the ON CONFLICT specification" errors. Fix by copy-and-paste from get_relation_info(). Per bug #18502 from Michael Wang. Back-patch to all supported versions. Discussion: https://postgr.es/m/18502-545b53f5b81e54e0@postgresql.org
Diffstat (limited to 'src/backend/utils/adt/jsonpath_exec.c')
0 files changed, 0 insertions, 0 deletions