Add a \getenv command to psql.
Tom Lane <tgl@sss.pgh.pa.us>
Add a \getenv command to psql. \getenv fetches the value of an environment variable into a psql variable. This is the inverse of the \setenv command that was added over ten years ago. We'd not seen a compelling use-case for \getenv at the time, but upcoming regression test refactoring provides a sufficient reason to add it now. Discussion: https://postgr.es/m/1655733.1639871614@sss.pgh.pa.us
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/ref/psql-ref.sgml | modified | +22 −0 |
| src/bin/psql/command.c | modified | +41 −0 |
| src/test/regress/expected/psql.out | modified | +12 −0 |
| src/test/regress/sql/psql.sql | modified | +12 −0 |
Documentation touched
Discussion
- Getting rid of regression test input/ and output/ files 11 messages · 2021-12-18 → 2021-12-21