Re: Detaching multiple partitions in 1 ALTER TABLE statement

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: Detaching multiple partitions in 1 ALTER TABLE statement
Дата
Msg-id CANP8+jK61qC3ouHceNME+po7_b5LXsaw7P9UYkwGuobQ=4S_aA@mail.gmail.com
обсуждение исходный текст
Ответ на Detaching multiple partitions in 1 ALTER TABLE statement  (Ben Hood <ben@relops.com>)
Ответы Re: Detaching multiple partitions in 1 ALTER TABLE statement  (Adrian Klaver <adrian.klaver@aklaver.com>)
Список pgsql-general
On Thu, 20 Jun 2019 at 15:19, Ben Hood <ben@relops.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 detaches in one command at present.

But it sounds like a great feature.

--
Simon Riggs                http://www.2ndQuadrant.com/
PostgreSQL Solutions for the Enterprise

В списке pgsql-general по дате отправления:

Предыдущее
От: Shay Rojansky
Дата:
Сообщение: Re: Row data is reflected in DETAIL message when constraints fail on insert/update
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Row data is reflected in DETAIL message when constraints fail on insert/update