Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5e4d8be

Browse files
committed
psql: suppress warnings about too many arguments if the command is not valid in the first place
1 parent8322072 commit5e4d8be

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

‎src/bin/psql/command.c

Lines changed: 5 additions & 2 deletions
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)

[8]ページ先頭

©2009-2025 Movatter.jp