aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeModifyTable.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
commit99b6b705d439fbf72aefe968941f38d571b9231c (patch)
tree1d79a3557731df59cdd733d59fe7deabd6bd91ba /src/backend/executor/nodeModifyTable.c
parent3d7df87c4bba27f1d1dcc5d92e7997b82cedd458 (diff)
downloadpostgresql-99b6b705d439fbf72aefe968941f38d571b9231c.tar.gz
postgresql-99b6b705d439fbf72aefe968941f38d571b9231c.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/executor/nodeModifyTable.c')
0 files changed, 0 insertions, 0 deletions