|
3 | 3 | * |
4 | 4 | * Copyright (c) 2000-2005, PostgreSQL Global Development Group |
5 | 5 | * |
6 | | - * $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.113 2005/03/16 23:52:18 neilc Exp $ |
| 6 | + * $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.114 2005/04/01 05:30:38 momjian Exp $ |
7 | 7 | */ |
8 | 8 | #include"postgres_fe.h" |
9 | 9 | #include"describe.h" |
@@ -201,7 +201,8 @@ describeFunctions(const char *pattern, bool verbose) |
201 | 201 | */ |
202 | 202 | appendPQExpBuffer(&buf, |
203 | 203 | "WHERE p.prorettype <> 'pg_catalog.cstring'::pg_catalog.regtype\n" |
204 | | -" AND p.proargtypes[0] <> 'pg_catalog.cstring'::pg_catalog.regtype\n" |
| 204 | +" AND (p.proargtypes[0] IS NULL\n" |
| 205 | +" OR p.proargtypes[0] <> 'pg_catalog.cstring'::pg_catalog.regtype)\n" |
205 | 206 | " AND NOT p.proisagg\n"); |
206 | 207 |
|
207 | 208 | processNamePattern(&buf,pattern, true, false, |
@@ -491,7 +492,8 @@ objectDescription(const char *pattern) |
491 | 492 | " LEFT JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace\n" |
492 | 493 |
|
493 | 494 | " WHERE p.prorettype <> 'pg_catalog.cstring'::pg_catalog.regtype\n" |
494 | | -" AND p.proargtypes[0] <> 'pg_catalog.cstring'::pg_catalog.regtype\n" |
| 495 | +" AND (p.proargtypes[0] IS NULL\n" |
| 496 | +" OR p.proargtypes[0] <> 'pg_catalog.cstring'::pg_catalog.regtype)\n" |
495 | 497 | " AND NOT p.proisagg\n", |
496 | 498 | _("function")); |
497 | 499 | processNamePattern(&buf,pattern, true, false, |
|