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