Re: TRUNCATE tables referenced by FKs on partitioned tables

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: TRUNCATE tables referenced by FKs on partitioned tables
Дата
Msg-id 20180711225916.domrlbkmukhrg6jg@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: TRUNCATE tables referenced by FKs on partitioned tables  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: TRUNCATE tables referenced by FKs on partitioned tables
Список pgsql-hackers
On 2018-Jul-11, Michael Paquier wrote:

> > alvherre=# truncate table prim, partfk;
> > ERROR:  cannot truncate a table referenced in a foreign key constraint
> > DETALLE:  Table "partfk" references "prim".
> > SUGERENCIA:  Truncate table "partfk" at the same time, or use TRUNCATE ... CASCADE.
> 
> Your first and second queries are the same :)

Yeah, C&P failure :-(

Anyway, this patch seems to fix it, and adds what I think is appropriate
test coverage.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Вложения

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

Предыдущее
От: Mai Peng
Дата:
Сообщение: Segfault logical replication PG 10.4
Следующее
От: Mai Peng
Дата:
Сообщение: Re: ERROR: cannot start subtransactions during a parallel operation