Re: Set search_path for session

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Set search_path for session
Дата
Msg-id 20090417162156.GG7709@alvh.no-ip.org
обсуждение исходный текст
Ответ на Set search_path for session  ("Mary Sipple" <msipple@iii.com>)
Ответы Re: Set search_path for session  ("Mary Sipple" <msipple@iii.com>)
Список pgsql-general
Mary Sipple wrote:
> We have a script wrapper for psql which reads a configuration file and
> constructs a psql command to connect to the configured instance of postgres.
> We would like to include a search_path setting in the configuraration file
> and have the wrapper use that to set the search_path for the psql session. I
> tried using the -v flag (-vsearch_path=xxxx) with the psql command but that
> did not work:
>
> > psql -h$SOCKET -U$USER -p$PORT -vsearch_path=$SCHEMAS $DBNAME

This should work:

export PGOPTIONS="-c search_path=$SCHEMAS"
psql -h$SOCKET -U$USER -p$PORT $DBNAME

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

В списке pgsql-general по дате отправления:

Предыдущее
От: Scott Mead
Дата:
Сообщение: Re: Set search_path for session
Следующее
От: Irene Barg
Дата:
Сообщение: number of relations reported by vacuumdb -av