public inbox for [email protected]  
help / color / mirror / Atom feed
From: lakshmi <[email protected]>
To: pgsql-hackers <[email protected]>
Cc: 金 <[email protected]>
Cc: Kirill Reshke <[email protected]>
Cc: Chao Li <[email protected]>
Cc: jian he <[email protected]>
Subject: Re: let ALTER TABLE DROP COLUMN drop whole-row referenced object
Date: Thu, 30 Apr 2026 10:27:00 +0530
Message-ID: <CAEvyyTjgSuQ6GvNjxp0+1w8uKAzettjbaOBXZ7uX-KDeA4u8jw@mail.gmail.com> (raw)
In-Reply-To: <CACJufxGi+EBX=+ij3qhcKe37=-XYNyDbncqgPRgu=RR0CAH7ag@mail.gmail.com>
References: <CACJufxGA6KVQy7DbHGLVw9s9KKmpGyZt5ME6C7kEfjDpr2wZCw@mail.gmail.com>
	<CACJufxFMqpraCreGKTWWB7cyPAYP+yehwTMFm-CSx+rzWdHf+A@mail.gmail.com>
	<[email protected]>
	<CACJufxHmmsg7GTD_LpGGam09+Aq4KkYHe2dfPgtGjrUELqbK=w@mail.gmail.com>
	<[email protected]>
	<CACJufxGfNBFtziA3V=j9qY4UAVd2KfkT7v0JRieb=gTegs6ofg@mail.gmail.com>
	<CACJufxE-PJyKmoDnZDEt+anKdtV1MvfA+u9x_S9CvorYUQ9Bww@mail.gmail.com>
	<CACJufxEApboeVKP4jdYOkikOij22HrHWnuSb=u-cJ7AHMBcOxA@mail.gmail.com>
	<CACJufxHvZbH6p+h1HSQXn6D2aVNP+xg5WQedYSaTuBkbd2jHdg@mail.gmail.com>
	<[email protected]>
	<CACJufxGi+EBX=+ij3qhcKe37=-XYNyDbncqgPRgu=RR0CAH7ag@mail.gmail.com>

Hi,

I tested the latest v8-0001 patch on current master and wanted to share my
observations.

Before applying the patch, when dropping a column, constraints and indexes
that referenced the whole row (for example, CHECK (ts = ROW(...)) or
expressions using ts) were not removed. This left the table in an
inconsistent state and resulted in errors during inserts.

After applying the patch, these objects are correctly detected and removed
when the column is dropped. The table remains clean, and inserts work as
expected.

I also tried a few additional scenarios:

   -

   DROP COLUMN with CASCADE—behaved as expected, no leftover objects
   -

   normal column-level constraints — still handled correctly (no regression)
   -

   multiple whole-row constraints — all removed properly
   -

   ALTER COLUMN TYPE — correctly throws an error when a whole-row
   constraint exists

Overall, the behavior looks correct and consistent based on these tests.

Thanks for working on this!
lakshmi


reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: let ALTER TABLE DROP COLUMN drop whole-row referenced object
  In-Reply-To: <CAEvyyTjgSuQ6GvNjxp0+1w8uKAzettjbaOBXZ7uX-KDeA4u8jw@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox