Re: [PROPOSAL] Make PSQLVAR on \getenv opitional - Mailing list pgsql-hackers

From Christoph Moench-Tegeder
Subject Re: [PROPOSAL] Make PSQLVAR on \getenv opitional
Date
Msg-id YcuDxPSEmSo8V4HA@elch.exwg.net
Whole thread Raw
In response to Re: [PROPOSAL] Make PSQLVAR on \getenv opitional  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
## Pavel Stehule (pavel.stehule@gmail.com):

> it is not consistent with other \g* commands. Maybe a new statement \senv
> ?  But what is the use case? You can just press ^z and inside shell write
> echo $xxx, and then fg

That does not work: backgrounding psql will put you into your original
shell, the parent process of psql. Changes in the environment of a
process do not change the environment of the parent.
Use \! to start a new shell process from psql, which will inherit psql's
environment.

Regards,
Christoph

-- 
Spare Space



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Column Filtering in Logical Replication
Next
From: Jelte Fennema
Date:
Subject: Re: [EXTERNAL] Re: Add ETIMEDOUT to ALL_CONNECTION_FAILURE_ERRNOS