Re: \gsetenv - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: \gsetenv
Date
Msg-id alpine.DEB.2.22.394.2012201422130.17354@pseudo
Whole thread Raw
In response to \gsetenv  (David Fetter <david@fetter.org>)
Responses Re: \gsetenv
List pgsql-hackers
Hello David,

> We have \gset to set some parameters, but not ones in the environment,
> so I fixed this with a new analogous command, \gsetenv. I considered
> refactoring SetVariable to include environment variables, but for a
> first cut, I just made a separate function and an extra if.

My 0.02€: ISTM that you do not really need that, it can already be 
achieved with gset, so I would not bother to add a gsetenv.

   sh> psql
     SELECT 'Calvin' AS foo \gset
     \setenv FOO :foo
     \! echo $FOO
     Calvin

-- 
Fabien.

pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: pg_preadv() and pg_pwritev()
Next
From: Magnus Hagander
Date:
Subject: Re: Commit fest manager for 2021-01