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

Commit 5e4d8be

Browse files
committed
psql: suppress warnings about too many arguments if the command is not valid in the first place
1 parent 8322072 commit 5e4d8be

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/bin/psql/command.c

+5-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright 2000 by PostgreSQL Global Development Group
55
*
6-
* $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.31 2000/04/16 20:04:50 petere Exp $
6+
* $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.32 2000/05/05 09:38:40 petere Exp $
77
*/
88
#include "postgres.h"
99
#include "command.h"
@@ -778,7 +778,10 @@ exec_command(const char *cmd,
778778

779779
/* eat the rest of the options string */
780780
while ((val = scan_option(&string, OT_NORMAL, NULL)))
781-
psql_error("\\%s: extra argument '%s' ignored\n", cmd, val);
781+
{
782+
if (status != CMD_UNKNOWN)
783+
psql_error("\\%s: extra argument '%s' ignored\n", cmd, val);
784+
}
782785

783786
if (options_string && continue_parse)
784787
*continue_parse = options_string + (string - string_cpy);

0 commit comments

Comments
 (0)