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
159159slashUsage (unsigned short int pager )
160160{
161161 FILE * output ;
162+ char * currdb ;
163+
164+ currdb = PQdb (pset .db );
165+ if (currdb == NULL )
166+ currdb = _ ("none" );
162167
163168 output = PageOutput (69 , pager );
164169
@@ -171,7 +176,7 @@ slashUsage(unsigned short int pager)
171176 fprintf (output , _ ("General\n" ));
172177 fprintf (output , _ (" \\c[onnect] [DBNAME|- USER|- HOST|- PORT|-]\n"
173178 " connect to new database (currently \"%s\")\n" ),
174- PQdb ( pset . db ) );
179+ currdb );
175180 fprintf (output , _ (" \\cd [DIR] change the current working directory\n" ));
176181 fprintf (output , _ (" \\copyright show PostgreSQL usage and distribution terms\n" ));
177182 fprintf (output , _ (" \\encoding [ENCODING]\n"
You can’t perform that action at this time.
0 commit comments