Discussion:
Alter session set current_schema
Salerno, Vincent
2004-09-10 14:34:38 UTC
Permalink
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
Oliver Elphick
2004-09-11 06:00:11 UTC
Permalink
Post by Salerno, Vincent
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 ***@lfix.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 ***@postgresql.org so that your
message can get through to the mailing list cleanly
Tom Lane
2004-09-11 06:19:16 UTC
Permalink
Post by Salerno, Vincent
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 ***@postgresql.org)
Loading...