Re: Running .psqlrc from a custom location
От | Tom Lane |
---|---|
Тема | Re: Running .psqlrc from a custom location |
Дата | |
Msg-id | 20003.1212331035@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Running .psqlrc from a custom location (Netzach <psql-novice@netzach.co.il>) |
Список | pgsql-novice |
Netzach <psql-novice@netzach.co.il> 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 export PGOPTIONS="--search-path=foo,bar" before starting psql. regards, tom lane
В списке pgsql-novice по дате отправления: