File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -161,6 +161,11 @@ void
161
161
slashUsage (unsigned short int pager )
162
162
{
163
163
FILE * output ;
164
+ char * currdb ;
165
+
166
+ currdb = PQdb (pset .db );
167
+ if (currdb == NULL )
168
+ currdb = _ ("none" );
164
169
165
170
output = PageOutput (94 , pager );
166
171
@@ -254,7 +259,7 @@ slashUsage(unsigned short int pager)
254
259
fprintf (output , _ ("Connection\n" ));
255
260
fprintf (output , _ (" \\c[onnect] [DBNAME|- USER|- HOST|- PORT|-]\n"
256
261
" connect to new database (currently \"%s\")\n" ),
257
- PQdb ( pset . db ) );
262
+ currdb );
258
263
fprintf (output , _ (" \\encoding [ENCODING] show or set client encoding\n" ));
259
264
fprintf (output , _ (" \\password [USERNAME] securely change the password for a user\n" ));
260
265
fprintf (output , _ (" \\conninfo display information about current connection\n" ));
You can’t perform that action at this time.
0 commit comments