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 @@ -159,6 +159,11 @@ void
159
159
slashUsage (unsigned short int pager )
160
160
{
161
161
FILE * output ;
162
+ char * currdb ;
163
+
164
+ currdb = PQdb (pset .db );
165
+ if (currdb == NULL )
166
+ currdb = _ ("none" );
162
167
163
168
output = PageOutput (69 , pager );
164
169
@@ -171,7 +176,7 @@ slashUsage(unsigned short int pager)
171
176
fprintf (output , _ ("General\n" ));
172
177
fprintf (output , _ (" \\c[onnect] [DBNAME|- USER|- HOST|- PORT|-]\n"
173
178
" connect to new database (currently \"%s\")\n" ),
174
- PQdb ( pset . db ) );
179
+ currdb );
175
180
fprintf (output , _ (" \\cd [DIR] change the current working directory\n" ));
176
181
fprintf (output , _ (" \\copyright show PostgreSQL usage and distribution terms\n" ));
177
182
fprintf (output , _ (" \\encoding [ENCODING]\n"
You can’t perform that action at this time.
0 commit comments