Search Postgresql Archives

Re: postgres 9.3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/21/2015 11:52 AM, Melvin Davidson wrote:
You cannot directly "connect" one schema with another,
but you can set the default to have both in the search_path.
Uncomment the #search_path parameter in Postgresql.conf
and change it to
search_path = 'preview, role,public,"$user",public'

the above would change it globally for all databases and users on the system, which is, IMHO, probably not what you want to do.

better would be to...

    ALTER ROLE username SET SEARCH_PATH='preview,"$user", public';
or
    ALTER DATABASE dbname SET...;

and then this change just applies to that named role or database...

to the OP, a simple SET xxxx only applies to the current session, its not remembered. ALTER ROLE (or ALTER DATABASE) will remember the setting for the specified user or database.

but if as you said, its the "preview" role that you want to access the "preview" schema, then the default search path would suffice, as $USER == preview.



--
john r pierce, recycling bits in santa cruz



--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux