Re: psql setenv command - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: psql setenv command
Date
Msg-id 4EB1B7D8.2080002@dunslane.net
Whole thread Raw
In response to Re: psql setenv command  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: psql setenv command
List pgsql-hackers

On 09/26/2011 05:16 PM, Andrew Dunstan wrote:
>
>
> On 09/26/2011 05:07 PM, Jeff Janes wrote:
>>
>> But in any case, considering that we are both wondering if it works on
>> Windows, I think that argues that an automatic regression test would
>> be very handy.
>>
>>
>
> I think an automated test should be possible. Something like:
>
>    \setenv PGFOO blurfl
>    \! echo $PGFOO %PGFOO%
>
>
> and then have a couple of alternative results. When I get time to get
> back to this I'll experiment.
>
>

I can confirm it does work on Windows:

    C:\prog\bf\root\HEAD\testinst>type ..\..\..\setenv.sql
    \setenv PGFOO foo
    \! echo $PGFOO %PGFOO%
    \setenv PGFOO
    \! echo $PGFOO %PGFOO%
    C:\prog\bf\root\HEAD\testinst>bin\psql -f ..\..\..\setenv.sql postgres
    $PGFOO foo
    $PGFOO %PGFOO%


I think I agree on reflection with Josh Kupershmidt that we don't need a
regression test for this.

Updated patch is attached - adding to Nov commitfest.

cheers

andrew



Attachment

pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: GiST for range types (was Re: Range Types - typo + NULL string constructor)
Next
From: Andrew Dunstan
Date:
Subject: Re: pg_dump --exclude-table-data