aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistbuild.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2023-03-27 15:04:02 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2023-03-27 15:04:02 -0400
commitd90d59e2503879cc2742a3a0eee01d2af2cca02d (patch)
treebc7947e8be0d095f9bfe0dbcffc5d0250603bbeb /src/backend/access/gist/gistbuild.c
parent7c4873438fd4c89da40beb943a373c61ae509e93 (diff)
downloadpostgresql-d90d59e2503879cc2742a3a0eee01d2af2cca02d.tar.gz
postgresql-d90d59e2503879cc2742a3a0eee01d2af2cca02d.zip
Reject attempts to alter composite types used in indexes.
find_composite_type_dependencies() ignored indexes, which is a poor decision because an expression index could have a stored column of a composite (or other container) type even when the underlying table does not. Teach it to detect such cases and error out. We have to work a bit harder than for other relations because the pg_depend entry won't identify the specific index column of concern, but it's not much new code. This does not address bug #17872's original complaint that dropping a column in such a type might lead to violations of the uniqueness property that a unique index is supposed to ensure. That seems of much less concern to me because it won't lead to crashes. Per bug #17872 from Alexander Lakhin. Back-patch to all supported branches. Discussion: https://postgr.es/m/17872-d0fbb799dc3fd85d@postgresql.org
Diffstat (limited to 'src/backend/access/gist/gistbuild.c')
0 files changed, 0 insertions, 0 deletions