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

Commit4703250

Browse files
committed
Remove psql's ancient hack that suppressed functions taking or returning
cstring from the output of \df. Now that the default behavior is toexclude all system functions, the de-cluttering rationale for this behaviorseems pretty weak; and it was always quite confusing/unhelpful if you wereactually looking for I/O functions. (Not to mention if you were lookingfor encoding converters or other cases that might take or return cstring.)
1 parente0daf7f commit4703250

File tree

2 files changed

+6
-22
lines changed

2 files changed

+6
-22
lines changed

‎doc/src/sgml/ref/psql-ref.sgml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.222 2009/04/04 00:39:14 tgl Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.223 2009/04/08 22:29:30 tgl Exp $
33
PostgreSQL documentation
44
-->
55

@@ -1055,16 +1055,10 @@ testdb=&gt;
10551055

10561056
<note>
10571057
<para>
1058-
To look up functions takingargument or returning values of a specific
1058+
To look up functions takingarguments or returning values of a specific
10591059
type, use your pager's search capability to scroll through the <literal>\df</>
10601060
output.
10611061
</para>
1062-
1063-
<para>
1064-
To reduce clutter, <literal>\df</> does not show data type I/O
1065-
functions. This is implemented by ignoring functions that accept
1066-
or return type <type>cstring</>.
1067-
</para>
10681062
</note>
10691063

10701064
</listitem>

‎src/bin/psql/describe.c

Lines changed: 4 additions & 14 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.207 2009/04/04 00:44:30 tgl Exp $
11+
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.208 2009/04/08 22:29:30 tgl Exp $
1212
*/
1313
#include"postgres_fe.h"
1414

@@ -274,13 +274,7 @@ describeFunctions(const char *pattern, bool verbose, bool showSystem)
274274
appendPQExpBuffer(&buf,
275275
" LEFT JOIN pg_catalog.pg_language l ON l.oid = p.prolang\n");
276276

277-
/*
278-
* we skip in/out funcs by excluding functions that take or return cstring
279-
*/
280-
appendPQExpBuffer(&buf,
281-
"WHERE p.prorettype <> 'pg_catalog.cstring'::pg_catalog.regtype\n"
282-
" AND p.proargtypes[0] IS DISTINCT FROM 'pg_catalog.cstring'::pg_catalog.regtype\n"
283-
" AND NOT p.proisagg\n");
277+
appendPQExpBuffer(&buf,"WHERE NOT p.proisagg\n");
284278

285279
if (!showSystem&& !pattern)
286280
appendPQExpBuffer(&buf," AND n.nspname <> 'pg_catalog'\n"
@@ -643,7 +637,7 @@ objectDescription(const char *pattern, bool showSystem)
643637
"n.nspname","p.proname",NULL,
644638
"pg_catalog.pg_function_is_visible(p.oid)");
645639

646-
/* Function descriptions(except in/outs for datatypes)*/
640+
/* Function descriptions */
647641
appendPQExpBuffer(&buf,
648642
"UNION ALL\n"
649643
" SELECT p.oid as oid, p.tableoid as tableoid,\n"
@@ -652,11 +646,7 @@ objectDescription(const char *pattern, bool showSystem)
652646
" CAST('%s' AS pg_catalog.text) as object\n"
653647
" FROM pg_catalog.pg_proc p\n"
654648
" LEFT JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace\n"
655-
656-
" WHERE p.prorettype <> 'pg_catalog.cstring'::pg_catalog.regtype\n"
657-
" AND (p.proargtypes[0] IS NULL\n"
658-
" OR p.proargtypes[0] <> 'pg_catalog.cstring'::pg_catalog.regtype)\n"
659-
" AND NOT p.proisagg\n",
649+
" WHERE NOT p.proisagg\n",
660650
gettext_noop("function"));
661651

662652
if (!showSystem&& !pattern)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp