We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 78298da commit bb9a9a9Copy full SHA for bb9a9a9
src/bin/psql/help.c
@@ -161,6 +161,11 @@ void
161
slashUsage(unsigned short int pager)
162
{
163
FILE *output;
164
+ char *currdb;
165
+
166
+ currdb = PQdb(pset.db);
167
+ if (currdb == NULL)
168
+ currdb = _("none");
169
170
output = PageOutput(86, pager);
171
@@ -246,7 +251,7 @@ slashUsage(unsigned short int pager)
246
251
fprintf(output, _("Connection\n"));
247
252
fprintf(output, _(" \\c[onnect] [DBNAME|- USER|- HOST|- PORT|-]\n"
248
253
" connect to new database (currently \"%s\")\n"),
249
- PQdb(pset.db));
254
+ currdb);
250
255
fprintf(output, _(" \\encoding [ENCODING] show or set client encoding\n"));
256
fprintf(output, _(" \\password [USERNAME] securely change the password for a user\n"));
257
fprintf(output, "\n");
0 commit comments