Re: \gsetenv

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: David Fetter <david(at)fetter(dot)org>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: \gsetenv
Date: 2020-12-20 13:26:14
Message-ID: alpine.DEB.2.22.394.2012201422130.17354@pseudo
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

  • \gsetenv at 2020-12-16 21:24:29 from David Fetter

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2020-12-20 13:26:59 Re: Commit fest manager for 2021-01
Previous Message Thomas Munro 2020-12-20 11:12:12 Re: pg_preadv() and pg_pwritev()