Re: Patch to psql to allow SEARCH_PATH to be set from env

From: Neil Conway <neilc(at)samurai(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Scott Goodwin <scott(at)scottg(dot)net>, pgsql-patches(at)postgresql(dot)org
Subject: Re: Patch to psql to allow SEARCH_PATH to be set from env
Date: 2004-02-10 20:27:31
Message-ID: 871xp2wuh8.fsf@mailbox.samurai.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2004-02-10 21:35:20 Re: [PATCHES] Current-stream read for psql's \copy
Previous Message Neil Conway 2004-02-10 20:24:07 Re: Patch to psql to allow SEARCH_PATH to be set from env