pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Harald Fuchs <hari.fuchs@gmail.com>
To: pgsql-admin@postgresql.org
Subject: Re: SET search path
Date: Mon, 31 Oct 2011 16:59:02 +0100
Message-ID: <868vo1kv95.fsf@protecting.net> (raw)
References: <04DA5C9AF2453F44ACD4541A08EFE9832FFC005000@MUSCA.onmobile.com>
	<201110311014.45633.achill@matrix.gatewaynet.com>

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. Can you 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;




view thread (4+ messages)

Message-ID: <868vo1kv95.fsf@protecting.net>
Permalink:  ../868vo1kv95.fsf@protecting.net/
Also on:    postgresql.org/message-id/868vo1kv95.fsf@protecting.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: hari.fuchs@gmail.com
  Subject: Re: SET search path
  In-Reply-To: <868vo1kv95.fsf@protecting.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox