Search Postgresql Archives

Re: error messages without schema name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You can not truncate table 'foo' because there is referential integrity between 'foo' and 'bar', so try using

TRUNCATE nsp2.foo CASCADE;

You can find the schema name for 'bar' using a query like:

select nspname from pg_namespace where oid = (select relnamespace from pg_class where relname = 'bar');

-------------------------
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)

On 12/13/06, Filip Rembiałkowski <plk.zuber@xxxxxxxxx> wrote:
Hi all,

I heard once that all messages which refer to table names should also
give their schema name.

I mean, if I see something like

rzeznia=# TRUNCATE  nsp2.foo;
ERROR:  cannot truncate a table referenced in a foreign key constraint
DETAIL:  Table "bar" references "foo".
HINT:  Truncate table "bar" at the same time, or use TRUNCATE ... CASCADE.

I do not know which namespace "bar" belongs to.

Is this a bug, or do I have to live with it?

--
Filip Rembiałkowski

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
       message can get through to the mailing list cleanly


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux