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

Commit135f65e

Browse files
committed
Adjust pg_proc.proargtypes[0] tests in psql \df to handle new NULL value
for a function taking no arguments, per report from Michael Fuhr.
1 parent9336d63 commit135f65e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

‎src/bin/psql/describe.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
55
*
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 $
77
*/
88
#include"postgres_fe.h"
99
#include"describe.h"
@@ -201,7 +201,8 @@ describeFunctions(const char *pattern, bool verbose)
201201
*/
202202
appendPQExpBuffer(&buf,
203203
"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"
205206
" AND NOT p.proisagg\n");
206207

207208
processNamePattern(&buf,pattern, true, false,
@@ -491,7 +492,8 @@ objectDescription(const char *pattern)
491492
" LEFT JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace\n"
492493

493494
" 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"
495497
" AND NOT p.proisagg\n",
496498
_("function"));
497499
processNamePattern(&buf,pattern, true, false,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp