dbTalk Databases Forums  

Alter session set current_schema

comp.databases.postgresql.novice comp.databases.postgresql.novice


Discuss Alter session set current_schema in the comp.databases.postgresql.novice forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Salerno, Vincent
 
Posts: n/a

Default Alter session set current_schema - 09-10-2004 , 09:34 AM






In Oracle you can log on using OS authentication & then:
ALTER SESSION SET CURRENT_SCHEMA= <schema name>;

Is there anyway to do this in PostGres?

Vinnie Salerno
Lockheed Martion
Simulation, Training & Support
Lake Underhill
Orlando, FL 32825
Phone: 407-306-3735



Reply With Quote
  #2  
Old   
Oliver Elphick
 
Posts: n/a

Default Re: Alter session set current_schema - 09-11-2004 , 01:00 AM






On Fri, 2004-09-10 at 15:34, Salerno, Vincent wrote:
Quote:
In Oracle you can log on using OS authentication & then:
ALTER SESSION SET CURRENT_SCHEMA= <schema name>;

Is there anyway to do this in PostGres?
The equivalent is

SET SEARCH_PATH TO <schema name>[,<other schema>]...;

You can use ALTER DATABASE SET SEARCH_PATH... to make this a permanent
change for everyone.

The default path is $user, public

--
Oliver Elphick olly (AT) lfix (DOT) co.uk
Isle of Wight http://www.lfix.co.uk/oliver
GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F A543 10EA
========================================
"I am crucified with Christ; nevertheless I live; yet
not I, but Christ liveth in me; and the life which I
now live in the flesh I live by the faith of the Son
of God, who loved me, and gave himself for me."
Galatians 2:20


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly



Reply With Quote
  #3  
Old   
Tom Lane
 
Posts: n/a

Default Re: Alter session set current_schema - 09-11-2004 , 01:19 AM



"Salerno, Vincent" <vincent.salerno (AT) lmco (DOT) com> writes:
Quote:
In Oracle you can log on using OS authentication & then:
ALTER SESSION SET CURRENT_SCHEMA= <schema name>;

Is there anyway to do this in PostGres?
I would suppose that "SET search_path" is the right equivalent ...

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.