diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2023-03-27 15:04:02 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2023-03-27 15:04:02 -0400 |
commit | 334cc4c966b27a5e7cad0a4892ad9fba9a0854ed (patch) | |
tree | 56c9e47a282a65c5139ffb78505627200a374f29 /src/backend/access/gist/gistbuild.c | |
parent | 11213d44663e71807ec55e31f506983f67ae338f (diff) | |
download | postgresql-334cc4c966b27a5e7cad0a4892ad9fba9a0854ed.tar.gz postgresql-334cc4c966b27a5e7cad0a4892ad9fba9a0854ed.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