knowing which table/schema is going to be chosen

From: Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it>
To: <pgsql-general(at)postgresql(dot)org>
Subject: knowing which table/schema is going to be chosen
Date: 2009-11-12 08:13:43
Message-ID: 20091112091343.23fe5d0e@dawn.webthatworks.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I may have several tables with the same name in different schema.

pina.mytable, test.mytable, import.mytable

I have a search_path that may not just consist of $user, public.
eg.
$user, public, test, import

I'd like to know which table is going to be chosen if I do a
select * from mytable;

In this case test.mytable will be chosen.

Is there a way to ask postgresql the schema of the table that will be
chosen?

--
Ivan Sergio Borgonovo
http://www.webthatworks.it

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dave Page 2009-11-12 08:41:46 Re: pgday.eu
Previous Message Guillaume Lelarge 2009-11-12 08:00:58 Re: [GENERAL] CREATE TABLE LIKE and SERIAL