Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Novice > Re: Running .ps...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 3 Topic 3131 of 3255
Post > Topic >>

Re: Running .psqlrc from a custom location

by tgl@[EMAIL PROTECTED] (Tom Lane) Jun 1, 2008 at 10:37 AM

Netzach <psql-novice@[EMAIL PROTECTED]
> writes:
> I use a hack to make psql automatically set search_path to the relevant 
> schema for the dump directory I am currently working in. I achieved this

> by running a wrapper script that changed the HOME environment variable, 
> setting a variable on the command line, and having the .psqlrc in the 
> custom location use that variable to set the search path. I just 
> upgraded to 8.1 from 7.4 and my hack stopped working - apparently psql 
> does not use the $HOME variable any more.

No, it doesn't, and changing $HOME is probably a pretty bad idea in any
case.

> My scripts are included below. I do not wish to run these commands every

> time I use psql, only when I run it from the wrapper script. As far as I

> am aware there is no way of setting search_path/schema from the command 
> line.

Try something like
	ex****t PGOPTIONS="--search-path=foo,bar"
before starting psql.

			regards, tom lane

-- 
Sent via pgsql-novice mailing list (pgsql-novice@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice
 




 3 Posts in Topic:
Running .psqlrc from a custom location
psql-novice@[EMAIL PROTEC  2008-06-01 12:27:12 
Re: Running .psqlrc from a custom location
tgl@[EMAIL PROTECTED] (T  2008-06-01 10:37:15 
Re: Running .psqlrc from a custom location
list@[EMAIL PROTECTED] (  2008-06-01 08:49:15 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Oct 12 14:32:21 CDT 2008.