Re: Truncate and Foreign Key Constraint question - Mailing list pgsql-general

From Tom Lane
Subject Re: Truncate and Foreign Key Constraint question
Date
Msg-id 9700.1144904520@sss.pgh.pa.us
Whole thread Raw
In response to Truncate and Foreign Key Constraint question  ("Gregory S. Williamson" <gsw@globexplorer.com>)
List pgsql-general
"Gregory S. Williamson" <gsw@globexplorer.com> writes:
> As the sequence below shows, I dropped the FK constraint successfully, but when I run TRUNCATE collections_l it says:
> ERROR:  cannot truncate a table referenced in a foreign key constraint
> DETAIL:  Table "client_collect_rates" references "collections_l" via foreign key constraint "$2".

Hm, works for me.  Is it possible that you've got multiple
client_collect_rates tables in different schemas, and it's complaining
about some other one?  The error message doesn't show the schema of the
table ...

            regards, tom lane

pgsql-general by date:

Previous
From: "Gregory S. Williamson"
Date:
Subject: Truncate and Foreign Key Constraint question
Next
From: Yanni Chiu
Date:
Subject: Re: Select first ten of each category?