[GENERAL] knowing which table/schema is going to be chosen

2009-11-12 Thread Ivan Sergio Borgonovo
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

Re: [GENERAL] knowing which table/schema is going to be chosen

2009-11-12 Thread Richard Huxton
Ivan Sergio Borgonovo wrote: 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; Is there a way to ask postgresql the schema of the table that will be chosen?

Re: [GENERAL] knowing which table/schema is going to be chosen

2009-11-12 Thread Ivan Sergio Borgonovo
On Thu, 12 Nov 2009 10:38:27 + Richard Huxton d...@archonet.com wrote: Ivan Sergio Borgonovo wrote: 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

Re: [GENERAL] knowing which table/schema is going to be chosen

2009-11-12 Thread Tom Lane
Ivan Sergio Borgonovo m...@webthatworks.it writes: BTW I think I've spotted an error in the docs: http://www.postgresql.org/docs/8.3/interactive/ddl-schemas.html http://www.postgresql.org/docs/8.4/interactive/ddl-schemas.html 5.7.2. The Public Schema In the previous sections we created