Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 95aa15f

Browse files
committed
Give proper error on psql \copy use.
1 parent 58fffea commit 95aa15f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/bin/psql/psql.c

+8-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.140 1998/05/06 23:50:23 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.141 1998/05/12 23:04:01 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -1746,8 +1746,14 @@ HandleSlashCmds(PsqlSettings *pset,
17461746
break;
17471747
case 'c':
17481748
{
1749-
if (strncmp(cmd, "copy ", strlen("copy ")) == 0)
1749+
if (strncmp(cmd, "copy ", strlen("copy ")) == 0 ||
1750+
strncmp(cmd, "copy ", strlen("copy ")) == 0)
17501751
do_copy(optarg2, pset);
1752+
else if (strcmp(cmd, "copy") == 0)
1753+
{
1754+
fprintf(stderr, "See \\? for help\n");
1755+
break;
1756+
}
17511757
else if (strncmp(cmd, "connect ", strlen("connect ")) == 0 ||
17521758
strcmp(cmd, "connect") == 0 /* issue error message */ )
17531759
{

0 commit comments

Comments
 (0)