Re: Truncate and Foreign Key Constraint question

Поиск
Список
Период
Сортировка
От Gregory S. Williamson
Тема Re: Truncate and Foreign Key Constraint question
Дата
Msg-id 71E37EF6B7DCC1499CEA0316A2568328024BC2E2@loki.wc.globexplorer.net
обсуждение исходный текст
Ответ на Truncate and Foreign Key Constraint question  ("Gregory S. Williamson" <gsw@globexplorer.com>)
Список 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 по дате отправления:

Предыдущее
От: Yanni Chiu
Дата:
Сообщение: Re: Select first ten of each category?
Следующее
От: "Harald Armin Massa"
Дата:
Сообщение: how can I create the DML for an existing database - within an application