Re: Patch to psql to allow SEARCH_PATH to be set from env - Mailing list pgsql-patches

From Neil Conway
Subject Re: Patch to psql to allow SEARCH_PATH to be set from env
Date
Msg-id 871xp2wuh8.fsf@mailbox.samurai.com
Whole thread Raw
In response to Re: Patch to psql to allow SEARCH_PATH to be set from env  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
Tom Lane <tgl@sss.pgh.pa.us> writes:
> Another possibility is to issue the SET from a ~/.psqlrc file (I think
> that's what it's called, check the man page).

Yet another possibility is to use the existing PGOPTIONS env var:

%PGOPTIONS='-c search_path=foo,public' psql template1
[ ... ]
template1=# show search_path;
 search_path
-------------
 foo,public
(1 row)

> (Seen in this light, PGCLIENTENCODING is a wart, but I suppose we
> have to keep it for backwards compatibility.)

I seems to me that PGGEQO, PGTZ, and PGDATESTYLE fall into the same
category.

-Neil


pgsql-patches by date:

Previous
From: Neil Conway
Date:
Subject: Re: Patch to psql to allow SEARCH_PATH to be set from env
Next
From: Scott Goodwin
Date:
Subject: Re: Patch to psql to allow SEARCH_PATH to be set from env