File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change 7
7
*
8
8
*
9
9
* IDENTIFICATION
10
- * $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.64 1997/05/23 01:53:42 momjian Exp $
10
+ * $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.65 1997/05/24 01:45:17 momjian Exp $
11
11
*
12
12
*-------------------------------------------------------------------------
13
13
*/
@@ -1128,8 +1128,20 @@ HandleSlashCmds(PsqlSettings * settings,
1128
1128
}
1129
1129
do_connect (optarg2 , optarg3 , settings );
1130
1130
}
1131
- else
1132
- do_connect (optarg , optarg2 , settings );
1131
+ else {
1132
+ char * optarg3 ;
1133
+ int blank_loc2 ;
1134
+
1135
+ blank_loc2 = strcspn (optarg , " \t" );
1136
+ if (blank_loc2 == 0 || * (optarg + blank_loc2 ) == '\0' )
1137
+ optarg3 = NULL ;
1138
+ else {
1139
+ optarg3 = optarg + blank_loc2 +
1140
+ strspn (optarg + blank_loc2 , " \t" );
1141
+ * (optarg + blank_loc2 ) = '\0' ;
1142
+ }
1143
+ do_connect (optarg , optarg3 , settings );
1144
+ }
1133
1145
}
1134
1146
break ;
1135
1147
case 'd' : /* \d describe tables or columns in a table */
You can’t perform that action at this time.
0 commit comments