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 @@ -157,6 +157,11 @@ void
157
157
slashUsage (unsigned short int pager )
158
158
{
159
159
FILE * output ;
160
+ char * currdb ;
161
+
162
+ currdb = PQdb (pset .db );
163
+ if (currdb == NULL )
164
+ currdb = _ ("none" );
160
165
161
166
output = PageOutput (92 , pager );
162
167
@@ -248,7 +253,7 @@ slashUsage(unsigned short int pager)
248
253
fprintf (output , _ ("Connection\n" ));
249
254
fprintf (output , _ (" \\c[onnect] [DBNAME|- USER|- HOST|- PORT|-]\n"
250
255
" connect to new database (currently \"%s\")\n" ),
251
- PQdb ( pset . db ) );
256
+ currdb );
252
257
fprintf (output , _ (" \\encoding [ENCODING] show or set client encoding\n" ));
253
258
fprintf (output , _ (" \\password [USERNAME] securely change the password for a user\n" ));
254
259
fprintf (output , _ (" \\conninfo display information about current connection\n" ));
You can’t perform that action at this time.
0 commit comments