1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-02 09:02:37 +03:00

Add a \setenv command to psql.

This can be used to set (or unset) environment variables that will
affect programs called by psql (such as the PAGER), probably most
usefully in a .psqlrc file.

Andrew Dunstan, reviewed by Josh Kupershmidt.
This commit is contained in:
Andrew Dunstan
2011-12-04 11:43:38 -05:00
parent eb06416ba4
commit e6d9e2106f
3 changed files with 65 additions and 1 deletions

View File

@ -158,7 +158,7 @@ slashUsage(unsigned short int pager)
{
FILE *output;
output = PageOutput(93, pager);
output = PageOutput(94, pager);
/* if you add/remove a line here, change the row count above */
@ -257,6 +257,7 @@ slashUsage(unsigned short int pager)
fprintf(output, _("Operating System\n"));
fprintf(output, _(" \\cd [DIR] change the current working directory\n"));
fprintf(output, _(" \\setenv NAME [VALUE] set or unset environment variable\n"));
fprintf(output, _(" \\timing [on|off] toggle timing of commands (currently %s)\n"),
ON(pset.timing));
fprintf(output, _(" \\! [COMMAND] execute command in shell or start interactive shell\n"));