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

Commit0669785

Browse files
committed
Improve psql \df error handling.
David Fetter
1 parent301f800 commit0669785

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

‎src/bin/psql/describe.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
* Copyright (c) 2000-2009, PostgreSQL Global Development Group
1010
*
11-
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.209 2009/04/2115:49:06 momjian Exp $
11+
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.210 2009/04/2117:28:01 momjian Exp $
1212
*/
1313
#include"postgres_fe.h"
1414

@@ -206,9 +206,15 @@ describeFunctions(const char *functypes, const char *pattern, bool verbose, bool
206206
PGresult*res;
207207
printQueryOptmyopt=pset.popt;
208208

209+
if (strlen(functypes)!=strspn(functypes,"antwS+"))
210+
{
211+
fprintf(stderr,_("\\df only takes [antwS+] as options\n"));
212+
return true;
213+
}
214+
209215
if (showWindow&&pset.sversion<80400)
210216
{
211-
fprintf(stderr,_("\\df does not take a \"w\"decorator in %d.%d.\n"),
217+
fprintf(stderr,_("\\df does not take a \"w\"option in %d.%d.\n"),
212218
pset.sversion /10000, (pset.sversion /100) %100);
213219
return true;
214220
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp