Re: error messages without schema name

Поиск
Список
Период
Сортировка
От Shoaib Mir
Тема Re: error messages without schema name
Дата
Msg-id bf54be870612130628i4470ab15l2355bdc680cb7471@mail.gmail.com
обсуждение исходный текст
Ответ на error messages without schema name  ("Filip Rembiałkowski" <plk.zuber@gmail.com>)
Список 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.zuber@gmail.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@postgresql.org so that your
       message can get through to the mailing list cleanly

В списке pgsql-general по дате отправления:

Предыдущее
От: dananrg@yahoo.com
Дата:
Сообщение: Re: TOAD-like query builder for PostgreSQL?
Следующее
От: "William Leite Araújo"
Дата:
Сообщение: Re: A VIEW mimicing a TABLE