Re: Dropping column from big table - Mailing list pgsql-general

From David G. Johnston
Subject Re: Dropping column from big table
Date
Msg-id CAKFQuwYu3TMd6Fum51JOTHDXUt_V3BHobz2VnVkpe9QLnjYYgA@mail.gmail.com
Whole thread Raw
In response to Re: Dropping column from big table  (sud <suds1434@gmail.com>)
List pgsql-general
On Monday, July 15, 2024, sud <suds1434@gmail.com> wrote:

Thank you for the confirmation. 
And if someone wants to fully remove that column from the table , then the only option is to create a new table with an exact set of active columns and insert the data into that from the existing/old table and then rename it back to old. Is this correct understanding?

You haven’t removed the column from the table, you’ve removed the whole dang table while creating a new, wholly unrelated, one that just happens to have the same name.  But the name of a table isn’t its primary key, though some places do use it for lookup purposes.

David J.

pgsql-general by date:

Previous
From: Christophe Pettus
Date:
Subject: Re: PostgreSQL Active-Active Clustering
Next
From: "Shenavai, Manuel"
Date:
Subject: RE: Monitoring DB size