From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Simon Riggs <simon(dot)riggs(at)enterprisedb(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Accidentally dropped constraints: bug? |
Date: | 2021-08-05 20:09:01 |
Message-ID: | 20210805200901.GA10792@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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(at)momjian(dot)us> https://momjian.us
EDB https://enterprisedb.com
If only the physical world exists, free will is an illusion.
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2021-08-05 20:12:01 | Re: RFC: Improve CPU cache locality of syscache searches |
Previous Message | Andres Freund | 2021-08-05 19:50:15 | Re: straightening out backend process startup |