diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2013-11-05 17:51:58 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2013-11-05 17:52:09 -0500 |
commit | d4e6133c681f0038861e5cf8707302bd80917fa0 (patch) | |
tree | b7f5bfdf90e4d0db03722f098aad65a48768860e /src | |
parent | 2636ecf78b608f7faf1a0a7ff9b56fa54b7710db (diff) | |
download | postgresql-d4e6133c681f0038861e5cf8707302bd80917fa0.tar.gz postgresql-d4e6133c681f0038861e5cf8707302bd80917fa0.zip |
Revert commit 0725065b37b8b0e9074a624a8d3e3ac1844fc820.
The previous commit was intended to make psql show the full path name when
doing a \s (history save), but it was very badly implemented and would show
confusing if not outright wrong information in many situations; for
instance if the path name given to \s is absolute, or if \cd commands
involving relative paths have been issued. Consensus seems to be that
we don't especially need this functionality in \s, and certainly not in \s
alone. So revert rather than trying to fix it up. Per gripe from
Ian Barwick.
Although the bogus behavior exists in all supported versions, I'm not
back-patching, because the work created for translators (by change of
a translatable message) would probably outweigh the value of what is
after all a mostly-cosmetic change.
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/psql/command.c | 8 | ||||
-rw-r--r-- | src/bin/psql/settings.h | 2 |
2 files changed, 1 insertions, 9 deletions
diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c index 0daac61e01c..0b7b8d45b8b 100644 --- a/src/bin/psql/command.c +++ b/src/bin/psql/command.c @@ -289,11 +289,6 @@ exec_command(const char *cmd, success = false; } - if (pset.dirname) - free(pset.dirname); - pset.dirname = pg_strdup(dir); - canonicalize_path(pset.dirname); - if (opt) free(opt); } @@ -1102,8 +1097,7 @@ exec_command(const char *cmd, /* This scrolls off the screen when using /dev/tty */ success = saveHistory(fname ? fname : DEVTTY, -1, false, false); if (success && !pset.quiet && fname) - printf(gettext("Wrote history to file \"%s/%s\".\n"), - pset.dirname ? pset.dirname : ".", fname); + printf(_("Wrote history to file \"%s\".\n"), fname); if (!fname) putchar('\n'); free(fname); diff --git a/src/bin/psql/settings.h b/src/bin/psql/settings.h index e78aa9a4999..36a7a469cde 100644 --- a/src/bin/psql/settings.h +++ b/src/bin/psql/settings.h @@ -84,8 +84,6 @@ typedef struct _psqlSettings int sversion; /* backend server version */ const char *progname; /* in case you renamed psql */ char *inputfile; /* file being currently processed, if any */ - char *dirname; /* current directory for \s display */ - uint64 lineno; /* also for error reporting */ bool timing; /* enable timing of all queries */ |