Detaching multiple partitions in 1 ALTER TABLE statement

Поиск
Список
Период
Сортировка
От Ben Hood
Тема Detaching multiple partitions in 1 ALTER TABLE statement
Дата
Msg-id F0E75DFF-D633-447A-B4BA-84253B1D4AB0@relops.com
обсуждение исходный текст
Ответы Re: Detaching multiple partitions in 1 ALTER TABLE statement  (Simon Riggs <simon@2ndquadrant.com>)
Список pgsql-general
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”:

https://www.postgresql.org/docs/12/sql-altertable.html

But I haven’t found an example of where multiple partitions are detached in 1 statement.

This is using version 12 beta 1.

Many thanks,

Ben




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

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