From: | "Shoaib Mir" <shoaibmir(at)gmail(dot)com> |
---|---|
To: | Filip Rembiałkowski <plk(dot)zuber(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: error messages without schema name |
Date: | 2006-12-13 14:28:34 |
Message-ID: | bf54be870612130628i4470ab15l2355bdc680cb7471@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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(dot)zuber(at)gmail(dot)com> 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(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>
From | Date | Subject | |
---|---|---|---|
Next Message | Gurjeet Singh | 2006-12-13 14:53:54 | Re: PG Admin |
Previous Message | Filip Rembiałkowski | 2006-12-13 14:19:45 | error messages without schema name |