git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9336d63)
Adjust pg_proc.proargtypes[0] tests in psql \df to handle new NULL value
Fri, 1 Apr 2005 05:30:38 +0000 (05:30 +0000)
Fri, 1 Apr 2005 05:30:38 +0000 (05:30 +0000)
for a function taking no arguments, per report from Michael Fuhr.


diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index afae93b89b9cbeaf405f635c6b84a825524a8c8c..e10904acdbc959d6fcc6ecfadfea862063cedfd7 100644 (file)
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.113 2005年03月16日 23:52:18 neilc Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.114 2005年04月01日 05:30:38 momjian Exp $
*/
#include "postgres_fe.h"
#include "describe.h"
@@ -201,7 +201,8 @@ describeFunctions(const char *pattern, bool verbose)
*/
appendPQExpBuffer(&buf,
"WHERE p.prorettype <> 'pg_catalog.cstring'::pg_catalog.regtype\n"
- " AND p.proargtypes[0] <> 'pg_catalog.cstring'::pg_catalog.regtype\n"
+ " AND (p.proargtypes[0] IS NULL\n"
+ " OR p.proargtypes[0] <> 'pg_catalog.cstring'::pg_catalog.regtype)\n"
" AND NOT p.proisagg\n");
processNamePattern(&buf, pattern, true, false,
@@ -491,7 +492,8 @@ objectDescription(const char *pattern)
" LEFT JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace\n"
" WHERE p.prorettype <> 'pg_catalog.cstring'::pg_catalog.regtype\n"
- " AND p.proargtypes[0] <> 'pg_catalog.cstring'::pg_catalog.regtype\n"
+ " AND (p.proargtypes[0] IS NULL\n"
+ " OR p.proargtypes[0] <> 'pg_catalog.cstring'::pg_catalog.regtype)\n"
" AND NOT p.proisagg\n",
_("function"));
processNamePattern(&buf, pattern, true, false,
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /