pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
SET search path
4+ messages / 4 participants
[nested] [flat]

* SET search path
@ 2011-10-30 10:34  Akash Kodibail <akash.kodibail@onmobile.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Akash Kodibail @ 2011-10-30 10:34 UTC (permalink / raw)
  To: pgsql-admin

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.

Regards,
Akash.

________________________________
DISCLAIMER: The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this message by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful. Please immediately contact the sender if you have received this message in error. Further, this e-mail may contain viruses and all reasonable precaution to minimize the risk arising there from is taken by OnMobile. OnMobile is not liable for any damage sustained by you as a result of any virus in this e-mail. All applicable virus checks should be carried out by you before opening this e-mail or any attachment thereto.
Thank you - OnMobile Global Limited.

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: SET search path
@ 2011-10-31 08:14  Achilleas Mantzios <achill@matrix.gatewaynet.com>
  parent: Akash Kodibail <akash.kodibail@onmobile.com>
  0 siblings, 2 replies; 4+ messages in thread

From: Achilleas Mantzios @ 2011-10-31 08:14 UTC (permalink / raw)
  To: pgsql-admin

Στις 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.*

> Regards,
> Akash.
> 
> ________________________________
> DISCLAIMER: The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this message by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful. Please immediately contact the sender if you have received this message in error. Further, this e-mail may contain viruses and all reasonable precaution to minimize the risk arising there from is taken by OnMobile. OnMobile is not liable for any damage sustained by you as a result of any virus in this e-mail. All applicable virus checks should be carried out by you before opening this e-mail or any attachment thereto.
> Thank you - OnMobile Global Limited.
> 



-- 
Achilleas Mantzios



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: SET search path
@ 2011-10-31 15:48  Kevin Grittner <Kevin.Grittner@wicourts.gov>
  parent: Achilleas Mantzios <achill@matrix.gatewaynet.com>
  1 sibling, 0 replies; 4+ messages in thread

From: Kevin Grittner @ 2011-10-31 15:48 UTC (permalink / raw)
  To: Achilleas Mantzios <achill@matrix.gatewaynet.com>; pgsql-admin

Achilleas Mantzios <achill@matrix.gatewaynet.com> wrote:
> **** Sunday 30 October 2011 12:34:38 */* Akash Kodibail ******:
 
>> I am using postgresql 8.4.0
 
Please consider an immediate update to 8.4.9.
 
http://www.postgresql.org/support/versioning
 
>> I have trying to set search path
 
>> the search_path is set only for that session, it is not a
>> permanent change that is done.
 
> As superuser
> ALTER user username set search_path  ...
 
Or set it in the postgresql.conf file.
 
-Kevin



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: SET search path
@ 2011-10-31 15:59  Harald Fuchs <hari.fuchs@gmail.com>
  parent: Achilleas Mantzios <achill@matrix.gatewaynet.com>
  1 sibling, 0 replies; 4+ messages in thread

From: Harald Fuchs @ 2011-10-31 15:59 UTC (permalink / raw)
  To: 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. 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;




^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2011-10-31 15:59 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-10-30 10:34 SET search path Akash Kodibail <akash.kodibail@onmobile.com>
2011-10-31 08:14 ` Achilleas Mantzios <achill@matrix.gatewaynet.com>
2011-10-31 15:48   ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
2011-10-31 15:59   ` Harald Fuchs <hari.fuchs@gmail.com>

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