Re: error messages without schema name

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 17:10:16
Message-ID: bf54be870612130910w2982c586xb5258c9c650de14a@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

That means you might have the same table in both schemas, so try doing the
following to confirm:

select * from schema1.bar
select * from schema2.bar

You can also set search_path if you want to avoid adding schema name with
database objects:

set search_path = schema1
select * from bar

instead of doing:

select * from schema1.bar

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

On 12/13/06, Filip Rembiałkowski <plk(dot)zuber(at)gmail(dot)com> wrote:
>
> 06-12-13, Shoaib Mir <shoaibmir(at)gmail(dot)com> napisał(a):
> > 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');
> this returns 2 schema names. which one is of my "bar"?
>
> Actually, I was asking if this behaviour of postgres is OK?
> I heard from my PostgreSQL teacher, that all such messages should be
> corrected in the source code, to include schema name too.
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Antonios Katsikadamos 2006-12-13 17:16:13 storage
Previous Message Rafal Pietrak 2006-12-13 17:01:34 Re: A VIEW mimicing a TABLE