aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/jsonfuncs.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2022-10-17 11:35:23 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2022-10-17 11:35:23 -0400
commiteec34661182db7b79a6b56c551ac1d79ef3e1f89 (patch)
tree9154731e2076f6339efd602e82ab8644dc3ab705 /src/backend/utils/adt/jsonfuncs.c
parentc68a1839902daeb42cf1ebc89edfdd91c00e5091 (diff)
downloadpostgresql-eec34661182db7b79a6b56c551ac1d79ef3e1f89.tar.gz
postgresql-eec34661182db7b79a6b56c551ac1d79ef3e1f89.zip
Guard against table-AM-less relations in planner.
The executor will dump core if it's asked to execute a seqscan on a relation having no table AM, such as a view. While that shouldn't really happen, it's possible to get there via catalog corruption, such as a missing ON SELECT rule. It seems worth installing a defense against that. There are multiple plausible places for such a defense, but I picked the planner's get_relation_info(). Per discussion of bug #17646 from Kui Liu. Back-patch to v12 where the tableam APIs were introduced; in older versions you won't get a SIGSEGV, so it seems less pressing. Discussion: https://postgr.es/m/17646-70c93cfa40365776@postgresql.org
Diffstat (limited to 'src/backend/utils/adt/jsonfuncs.c')
0 files changed, 0 insertions, 0 deletions