Re: Schema + search path problem - Mailing list pgsql-general

From Tom Lane
Subject Re: Schema + search path problem
Date
Msg-id 14612.1071167918@sss.pgh.pa.us
Whole thread Raw
In response to Schema + search path problem  ("John Sidney-Woollett" <johnsw@wardbrook.com>)
Responses Re: Schema + search path problem  ("John Sidney-Woollett" <johnsw@wardbrook.com>)
List pgsql-general
"John Sidney-Woollett" <johnsw@wardbrook.com> writes:
> Is there a way to set the default search path for the user 'FRED'
> permanently?

See ALTER USER.  You can set per-user or per-database defaults for any
SETtable variable, not only search_path.

> If I am the postgres user and creating a function (for example) in a given
> schema, do I have to qualify ALL the objects referred to in the function
> by the schema prefix (if I don't want them in the public schema)?

It's a good idea.  At the moment a function body is interpreted with the
call-time value of search_path.  We've batted around the idea that it
should use the creation-time path, but nothing's been done about it.

> ps Is the 7.4 documentation less detailed on schemas than the 7.3
> docs?

I don't believe we've removed anything; rearranged, perhaps.  Does
http://www.postgresql.org/docs/current/static/ddl-schemas.html
not cover the same ground that's in the 7.3 docs?

            regards, tom lane

pgsql-general by date:

Previous
From: Joe Conway
Date:
Subject: Re: Strange permission problem regarding pg_settings
Next
From: "John Sidney-Woollett"
Date:
Subject: Re: Schema + search path problem