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

From Gregory S. Williamson
Subject Re: Truncate and Foreign Key Constraint question
Date
Msg-id 71E37EF6B7DCC1499CEA0316A2568328024BC2E2@loki.wc.globexplorer.net
Whole thread Raw
In response to Truncate and Foreign Key Constraint question  ("Gregory S. Williamson" <gsw@globexplorer.com>)
List pgsql-general
Doh !  A test schema that was a left over. Thanks for the sanity check ... as usual, pilot error!

g

-----Original Message-----
From:    Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent:    Wed 4/12/2006 10:02 PM
To:    Gregory S. Williamson
Cc:    pgsql-general@postgresql.org
Subject:    Re: [GENERAL] Truncate and Foreign Key Constraint question

"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

!DSPAM:443ddb4b66027357040552!





pgsql-general by date:

Previous
From: Yanni Chiu
Date:
Subject: Re: Select first ten of each category?
Next
From: "Harald Armin Massa"
Date:
Subject: how can I create the DML for an existing database - within an application