Thread: How to remove the partition from table .

How to remove the partition from table .

From
Rakesh Nashine
Date:
We would like to remove the partition from one of the tables , although that partition has some business data. Now business doesn't need that partition any more .. How could we remove it? although they need the data . 

 

--
Thanks & Regards
Rakesh 

Re: How to remove the partition from table .

From
Erik Wienhold
Date:
> On 25/10/2022 12:47 CEST Rakesh Nashine <nashine.rakesh@gmail.com> wrote:
>
> We would like to remove the partition from one of the tables , although that
> partition has some business data. Now business doesn't need that partition
> any more .. How could we remove it? although they need the data .

Detach the partition:

https://www.postgresql.org/docs/15/sql-altertable.html#SQL-ALTERTABLE-DETACH-PARTITION

--
Erik



Re: How to remove the partition from table .

From
Ron
Date:
On 10/25/22 05:47, Rakesh Nashine wrote:
> We would like to remove the partition from one of the tables , although 
> that partition has some business data. Now business doesn't need that 
> partition any more .. How could we remove it? although they need the data .

That depends on which version of Postgresql you're using.

-- 
Angular momentum makes the world go 'round.