Re: Truncate and Foreign Key Constraint question

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Gregory S(dot) Williamson" <gsw(at)globexplorer(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Truncate and Foreign Key Constraint question
Date: 2006-04-13 05:02:00
Message-ID: 9700.1144904520@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Gregory S. Williamson" <gsw(at)globexplorer(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Yanni Chiu 2006-04-13 05:31:12 Re: Select first ten of each category?
Previous Message Gregory S. Williamson 2006-04-13 03:37:57 Truncate and Foreign Key Constraint question