Обсуждение: Set search_path

Поиск
Список
Период
Сортировка

Set search_path

От
"Michael A Weber"
Дата:

I am attempting to change my schema search path to my newly-created schema, which isn’t functioning correctly.

 

When I initially show search_path, it gives me $Users, public, which is expected.

 

When I perform set search_path TO newpath, I am told that it was performed correctly.

 

When I then show search_path, it shows me newpath, which is correct and expected.

 

If I attempt to do a query of, say Select * from Users, it fails with ‘relation “users” does not exist.

 

Show search_path still returns newpath

 

If I open a new SQL query window and show search_path, I see $users, public returned.

 

Is there a way to make it ‘stick’ as it seems that it isn’t sticking?  Or, am I missing something completely?  Please help!

 

Michael A Weber

Weber Racing Equipment, Inc.

440-327-7702

440-327-6899 fax

mweber@4wre.com

 

Re: Set search_path

От
Tom Lane
Дата:
"Michael A Weber" <mweber@4wre.com> writes:
> If I attempt to do a query of, say Select * from Users, it fails with
> 'relation "users" does not exist.

And you think this is wrong why?  You haven't mentioned creating such a
table in schema newpath ...

            regards, tom lane

Re: Set search_path

От
Jeffrey Melloy
Дата:

On May 14, 2004, at 7:11 PM, Michael A Weber wrote:

<excerpt>

<fontfamily><param>Arial</param><x-tad-bigger>Is there a way to make
it ‘stick’ as it seems that it isn’t sticking?  Or, am I missing
something completely?  Please help!</x-tad-bigger></fontfamily>



</excerpt>set search_path simply sets it for your current session.


To set it permanently, do alter user <italic>username</italic> set
search_path = newpath;


Jeff


On May 14, 2004, at 7:11 PM, Michael A Weber wrote:
>
> Is there a way to make it ‘stick’ as it seems that it isn’t sticking? 
> Or, am I missing something completely?  Please help!
>
>
set search_path simply sets it for your current session.

To set it permanently, do alter user username set search_path = newpath;

Jeff