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

From: Scott Goodwin <scott(at)scottg(dot)net>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Patch to psql to allow SEARCH_PATH to be set from env
Date: 2004-02-10 13:54:41
Message-ID: ACD9B816-5BD0-11D8-9BF7-000A95A0910A@scottg.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Hi Chris,

No, I didn't know that, but I figured there might be another, better
way to do this that I hadn't found. Thanks for the info; I'm going to
dig into ALTER USER to see what else I may be missing. Consider this
patch "rescinded", though it was a good exercise in working with PG
source code. If anyone cares to, I'd still like feedback on anything I
could have done better in this patch (i.e. coding style, better place
to put this kind of code etc.).

thanks,

/s.

On Feb 10, 2004, at 8:37 AM, Christopher Kings-Lynne wrote:

> Scott Goodwin wrote:
>> Using schemas is fun. Setting the search_path every time I use psql
>> isn't. This patch modifies startup.c in psql to allow the SEARCH_PATH
>> to be set to whatever the PG_SCHEMA_SEARCH_PATH environment variable
>> is set to. If the var is not defined or is empty, no action is taken
>> and the search path is what it would be without this patch. If
>> PG_SCHEMA_SEARCH_PATH is set to garbage, psql simply reports the
>> database error about non-existent schemas and continues running with
>> the search_path it would have without this patch. The patch is
>> against PG 7.4.1.
>
> Do you know that you can go ALTER USER yourselft SET SEARCH_PATH TO
> "'public','core','objects'"; So that will always be your default path?
>
> Chris
>

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Michael Glaesemann 2004-02-10 14:01:18 Repost: Linking references in documentation
Previous Message Christopher Kings-Lynne 2004-02-10 13:37:09 Re: Patch to psql to allow SEARCH_PATH to be set from env