Re: SET search path - Mailing list pgsql-admin

From Harald Fuchs
Subject Re: SET search path
Date
Msg-id 868vo1kv95.fsf@protecting.net
Whole thread Raw
In response to SET search path  (Akash Kodibail <akash.kodibail@onmobile.com>)
List pgsql-admin
In article <201110311014.45633.achill@matrix.gatewaynet.com>,
Achilleas Mantzios <achill@matrix.gatewaynet.com> writes:

> Στις Sunday 30 October 2011 12:34:38 ο/η Akash Kodibail έγραψε:
>> Hi,
>>
>> I am using postgresql 8.4.0
>>
>> Select version() gives:
>>
>> PostgreSQL 8.4.0 on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC) 3.4.6 20060404 (Red Hat 3.4.6-10), 64-bit
>>
>> I have trying to set search path, so that I do not have to append the schema_name while doing a select on the
tables,however, when I do so, the search_path is set only for that session, it is not a permanent change that is done.
Canyou please guide me as to how to make it permanent. 
>>
>> After I do a set search_path, pg_user view does not show any entry in the column "useconfig" for the same being set.
>>
> As superuser
> ALTER user username set search_path TO "$user",someschema,public ;
> works in 8.3 and 9.*

This sets the search path even if this user connects to another database
without someschema.  Therefore I prefer

ALTER DATABASE dbname SET search_path TO public,someschema;

pgsql-admin by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: SET search path
Next
From: Matthew Sellers
Date:
Subject: Corruption Debug Help.