From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | Simon Riggs <simon(at)2ndquadrant(dot)com>, Ben Hood <ben(at)relops(dot)com> |
Cc: | pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Detaching multiple partitions in 1 ALTER TABLE statement |
Date: | 2019-06-20 17:09:43 |
Message-ID: | 769fbf8e-e649-0b6f-ab33-d564d0028325@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 6/20/19 9:00 AM, Simon Riggs wrote:
> On Thu, 20 Jun 2019 at 15:19, Ben Hood <ben(at)relops(dot)com
> <mailto:ben(at)relops(dot)com>> wrote:
>
> Hi,
>
> I’m wondering what is the syntax for detaching multiple partitions
> in 1 ALTER TABLE statement.
>
> I’ve tried this:
>
>
> # ALTER TABLE movement_legs DETACH PARTITION
> movement_legs_2019_06_20_11_15, DETACH PARTITION
> movement_legs_2019_06_20_11_20;
> psql: ERROR: syntax error at or near ","
> LINE 1: ...gs DETACH PARTITION movement_legs_2019_06_20_11_15, DETACH P…
>
>
> The documentation suggests "DETACH PARTITION can be combined into a
> list of multiple alterations to be applied together”:
>
>
> Docs say this" All the forms of ALTER TABLE that act on a single table,
> except RENAME , SET SCHEMA , ATTACH
> PARTITION , and DETACH PARTITION can be combined into a list of
> multiple alterations to be
> applied together."
>
> Perhaps a comma would be helpful, but its clear that you can do multiple
^not
Or I am thoroughly confused:)
> detaches in one command at present.
>
> But it sounds like a great feature.
>
> --
> Simon Riggshttp://www.2ndQuadrant.com/ <http://www.2ndquadrant.com/>
> PostgreSQL Solutions for the Enterprise
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2019-06-20 18:20:05 | Re: Row data is reflected in DETAIL message when constraints fail on insert/update |
Previous Message | Ravi Krishna | 2019-06-20 16:42:16 | Re: Row data is reflected in DETAIL message when constraints fail on insert/update |