Обсуждение: How to remove the partition from table .

Поиск
Список
Период
Сортировка

How to remove the partition from table .

От
Rakesh Nashine
Дата:
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 .

От
Erik Wienhold
Дата:
> 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 .

От
Ron
Дата:
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.