aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>1998-05-12 23:04:01 +0000
committerBruce Momjian <bruce@momjian.us>1998-05-12 23:04:01 +0000
commit95aa15f32a123ecd084f564e36a4051a353bcb4e (patch)
tree350a039aebf5dfbdfd881840b4f4e9f15cf6fabf /src
parent58fffea03c11c753633411955b8e783178b3d381 (diff)
downloadpostgresql-95aa15f32a123ecd084f564e36a4051a353bcb4e.tar.gz
postgresql-95aa15f32a123ecd084f564e36a4051a353bcb4e.zip
Give proper error on psql \copy use.
Diffstat (limited to 'src')
-rw-r--r--src/bin/psql/psql.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/bin/psql/psql.c b/src/bin/psql/psql.c
index 1864475dd3e..97125d79579 100644
--- a/src/bin/psql/psql.c
+++ b/src/bin/psql/psql.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.140 1998/05/06 23:50:23 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.141 1998/05/12 23:04:01 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1746,8 +1746,14 @@ HandleSlashCmds(PsqlSettings *pset,
break;
case 'c':
{
- if (strncmp(cmd, "copy ", strlen("copy ")) == 0)
+ if (strncmp(cmd, "copy ", strlen("copy ")) == 0 ||
+ strncmp(cmd, "copy ", strlen("copy ")) == 0)
do_copy(optarg2, pset);
+ else if (strcmp(cmd, "copy") == 0)
+ {
+ fprintf(stderr, "See \\? for help\n");
+ break;
+ }
else if (strncmp(cmd, "connect ", strlen("connect ")) == 0 ||
strcmp(cmd, "connect") == 0 /* issue error message */ )
{