Home > Archive > PostgreSQL Discussion > May 2005 > Re: table synonyms









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: table synonyms
jjeffman@cpovo.net

2005-05-23, 9:23 am

Thank you very much for your answer.

What happens if there are more than one table with the same name in the
"search_path" ?


Jayme Jeffman Filho
GSEE-PUCRS
+55 51 91123422


Martijn van Oosterhout

2005-05-23, 11:23 am

On Mon, May 23, 2005 at 09:07:08AM -0300, jjeffman@cpovo.net wrote:
> Thank you very much for your answer.
>
> What happens if there are more than one table with the same name in the
> "search_path" ?


It takes the first one.

There is no explicit relationship between users and schemas, however
many installations have the search_path default to "$user, public"
which is magically substituted on connection. You are ofcourse free to
alter search_path whenever you want. Any table can always be referred
to by its full name...

Hope this helps,
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.


Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com