On Thu, Aug 5, 2021 at 08:35:46AM +0100, Simon Riggs wrote:
> If we drop a column we cascade that drop to all indexes and all
> constraints that mention that column, even if they include other
> columns also. We might expect that indexes should be dropped
> automatically, but the latter behavior for constraints seems like a
> bug, since it can silently remove constraints that might still be
> valid without the dropped column. (Example below). This is even more
> surprising if the user specifies RESTRICT explicitly. I note that this
> is acting as documented, it's just the docs don't explain the full
> implications, so I'm guessing we didn't think about this before.
Wow, I certainly never thought of it or heard anyone complain about it.
--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EDB https://enterprisedb.com
If only the physical world exists, free will is an illusion.