diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 6dfa33f..d2a4384 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -202,13 +202,19 @@ describeFunctions(const char *functypes, const char *pattern, bool verbose, bool bool showTrigger = strchr(functypes, 't') != NULL; bool showWindow = strchr(functypes, 'w') != NULL; + if (strlen(functypes) != strspn(functypes, "antwS+")) + { + fprintf(stderr, _("\\df only takes [antwS+] as options\n")); + return true; + } + PQExpBufferData buf; PGresult *res; printQueryOpt myopt = pset.popt; if (showWindow && pset.sversion < 80400) { - fprintf(stderr, _("\\df does not take a \"w\" decorator in %d.%d.\n"), + fprintf(stderr, _("\\df does not take a \"w\" option in %d.%d.\n"), pset.sversion / 10000, (pset.sversion / 100) % 100); return true; }