mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Remove psql's ancient hack that suppressed functions taking or returning
cstring from the output of \df. Now that the default behavior is to exclude all system functions, the de-cluttering rationale for this behavior seems pretty weak; and it was always quite confusing/unhelpful if you were actually looking for I/O functions. (Not to mention if you were looking for encoding converters or other cases that might take or return cstring.)
This commit is contained in:
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.222 2009/04/04 00:39:14 tgl Exp $
|
$PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.223 2009/04/08 22:29:30 tgl Exp $
|
||||||
PostgreSQL documentation
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -1055,16 +1055,10 @@ testdb=>
|
|||||||
|
|
||||||
<note>
|
<note>
|
||||||
<para>
|
<para>
|
||||||
To look up functions taking argument or returning values of a specific
|
To look up functions taking arguments or returning values of a specific
|
||||||
type, use your pager's search capability to scroll through the <literal>\df</>
|
type, use your pager's search capability to scroll through the <literal>\df</>
|
||||||
output.
|
output.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
|
||||||
To reduce clutter, <literal>\df</> does not show data type I/O
|
|
||||||
functions. This is implemented by ignoring functions that accept
|
|
||||||
or return type <type>cstring</>.
|
|
||||||
</para>
|
|
||||||
</note>
|
</note>
|
||||||
|
|
||||||
</listitem>
|
</listitem>
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2009, PostgreSQL Global Development Group
|
* Copyright (c) 2000-2009, PostgreSQL Global Development Group
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.207 2009/04/04 00:44:30 tgl Exp $
|
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.208 2009/04/08 22:29:30 tgl Exp $
|
||||||
*/
|
*/
|
||||||
#include "postgres_fe.h"
|
#include "postgres_fe.h"
|
||||||
|
|
||||||
@ -274,13 +274,7 @@ describeFunctions(const char *pattern, bool verbose, bool showSystem)
|
|||||||
appendPQExpBuffer(&buf,
|
appendPQExpBuffer(&buf,
|
||||||
" LEFT JOIN pg_catalog.pg_language l ON l.oid = p.prolang\n");
|
" LEFT JOIN pg_catalog.pg_language l ON l.oid = p.prolang\n");
|
||||||
|
|
||||||
/*
|
appendPQExpBuffer(&buf, "WHERE NOT p.proisagg\n");
|
||||||
* we skip in/out funcs by excluding functions that take or return cstring
|
|
||||||
*/
|
|
||||||
appendPQExpBuffer(&buf,
|
|
||||||
"WHERE p.prorettype <> 'pg_catalog.cstring'::pg_catalog.regtype\n"
|
|
||||||
" AND p.proargtypes[0] IS DISTINCT FROM 'pg_catalog.cstring'::pg_catalog.regtype\n"
|
|
||||||
" AND NOT p.proisagg\n");
|
|
||||||
|
|
||||||
if (!showSystem && !pattern)
|
if (!showSystem && !pattern)
|
||||||
appendPQExpBuffer(&buf, " AND n.nspname <> 'pg_catalog'\n"
|
appendPQExpBuffer(&buf, " AND n.nspname <> 'pg_catalog'\n"
|
||||||
@ -643,7 +637,7 @@ objectDescription(const char *pattern, bool showSystem)
|
|||||||
"n.nspname", "p.proname", NULL,
|
"n.nspname", "p.proname", NULL,
|
||||||
"pg_catalog.pg_function_is_visible(p.oid)");
|
"pg_catalog.pg_function_is_visible(p.oid)");
|
||||||
|
|
||||||
/* Function descriptions (except in/outs for datatypes) */
|
/* Function descriptions */
|
||||||
appendPQExpBuffer(&buf,
|
appendPQExpBuffer(&buf,
|
||||||
"UNION ALL\n"
|
"UNION ALL\n"
|
||||||
" SELECT p.oid as oid, p.tableoid as tableoid,\n"
|
" SELECT p.oid as oid, p.tableoid as tableoid,\n"
|
||||||
@ -652,11 +646,7 @@ objectDescription(const char *pattern, bool showSystem)
|
|||||||
" CAST('%s' AS pg_catalog.text) as object\n"
|
" CAST('%s' AS pg_catalog.text) as object\n"
|
||||||
" FROM pg_catalog.pg_proc p\n"
|
" FROM pg_catalog.pg_proc p\n"
|
||||||
" LEFT JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace\n"
|
" LEFT JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace\n"
|
||||||
|
" WHERE NOT p.proisagg\n",
|
||||||
" WHERE p.prorettype <> '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",
|
|
||||||
gettext_noop("function"));
|
gettext_noop("function"));
|
||||||
|
|
||||||
if (!showSystem && !pattern)
|
if (!showSystem && !pattern)
|
||||||
|
Reference in New Issue
Block a user