How to remove the partition from table .

Started by Rakesh Nashineover 3 years ago3 messagesgeneral
Jump to latest
#1Rakesh Nashine
nashine.rakesh@gmail.com

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

#2Erik Wienhold
ewie@ewie.name
In reply to: Rakesh Nashine (#1)
Re: How to remove the partition from table .

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

#3Ron
ronljohnsonjr@gmail.com
In reply to: Rakesh Nashine (#1)
Re: How to remove the partition from table .

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.