Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd4e6133

Browse files
committed
Revert commit0725065.
The previous commit was intended to make psql show the full path name whendoing a \s (history save), but it was very badly implemented and would showconfusing if not outright wrong information in many situations; forinstance if the path name given to \s is absolute, or if \cd commandsinvolving relative paths have been issued. Consensus seems to be thatwe don't especially need this functionality in \s, and certainly not in \salone. So revert rather than trying to fix it up. Per gripe fromIan Barwick.Although the bogus behavior exists in all supported versions, I'm notback-patching, because the work created for translators (by change ofa translatable message) would probably outweigh the value of what isafter all a mostly-cosmetic change.
1 parent2636ecf commitd4e6133

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

‎src/bin/psql/command.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -289,11 +289,6 @@ exec_command(const char *cmd,
289289
success= false;
290290
}
291291

292-
if (pset.dirname)
293-
free(pset.dirname);
294-
pset.dirname=pg_strdup(dir);
295-
canonicalize_path(pset.dirname);
296-
297292
if (opt)
298293
free(opt);
299294
}
@@ -1102,8 +1097,7 @@ exec_command(const char *cmd,
11021097
/* This scrolls off the screen when using /dev/tty */
11031098
success=saveHistory(fname ?fname :DEVTTY,-1, false, false);
11041099
if (success&& !pset.quiet&&fname)
1105-
printf(gettext("Wrote history to file \"%s/%s\".\n"),
1106-
pset.dirname ?pset.dirname :".",fname);
1100+
printf(_("Wrote history to file \"%s\".\n"),fname);
11071101
if (!fname)
11081102
putchar('\n');
11091103
free(fname);

‎src/bin/psql/settings.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,6 @@ typedef struct _psqlSettings
8484
intsversion;/* backend server version */
8585
constchar*progname;/* in case you renamed psql */
8686
char*inputfile;/* file being currently processed, if any */
87-
char*dirname;/* current directory for \s display */
88-
8987
uint64lineno;/* also for error reporting */
9088

9189
booltiming;/* enable timing of all queries */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp