From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | John Scalia <jayknowsunix(at)gmail(dot)com> |
Cc: | pgsql-admin <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: Working with partition tables |
Date: | 2020-11-12 16:24:58 |
Message-ID: | CAKFQuwbCYS58u4=PyTAYunVgH=KdOe4+50_-zWDF-TFWfnrNGw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
On Thu, Nov 12, 2020 at 9:18 AM John Scalia <jayknowsunix(at)gmail(dot)com> wrote:
> Is there any way to remove the partition key, or do we simply need to
> create a new table with the structure we need, drop the old one, then
> rename the new one to that original name and reattach the partitions?
>
I'm not super familiar with partitioning but...you can probably do it in
the reverse order and avoid the rename. A partitioned table without
partitions seems useless so just drop it, then create a new one with the
same name with the correct defintion.
The documentation is indeed clear though you may be looking in the wrong
spot:
https://www.postgresql.org/docs/13/ddl-partitioning.html
"It is not possible to turn a regular table into a partitioned table or
vice versa."
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | Il Mimo di Creta | 2020-11-12 16:31:34 | Re: Save failed records into auxiliary table |
Previous Message | John Scalia | 2020-11-12 16:18:48 | Working with partition tables |