mirror of
https://github.com/postgres/postgres.git
synced 2025-07-09 22:41:56 +03:00
Add the function's volatility to the output of psql's \df+ command.
Update the psql reference page accordingly.
This commit is contained in:
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.191 2007/05/03 15:47:48 alvherre Exp $
|
$PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.192 2007/06/28 06:40:16 neilc Exp $
|
||||||
PostgreSQL documentation
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -976,7 +976,7 @@ testdb=>
|
|||||||
class="parameter">pattern</replaceable>
|
class="parameter">pattern</replaceable>
|
||||||
is specified, only functions whose names match the pattern are shown.
|
is specified, only functions whose names match the pattern are shown.
|
||||||
If the form <literal>\df+</literal> is used, additional information about
|
If the form <literal>\df+</literal> is used, additional information about
|
||||||
each function, including language and description, is shown.
|
each function, including volatility, language, source code and description, is shown.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<note>
|
<note>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2007, PostgreSQL Global Development Group
|
* Copyright (c) 2000-2007, PostgreSQL Global Development Group
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.155 2007/03/19 23:38:31 wieck Exp $
|
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.156 2007/06/28 06:40:16 neilc Exp $
|
||||||
*/
|
*/
|
||||||
#include "postgres_fe.h"
|
#include "postgres_fe.h"
|
||||||
#include "describe.h"
|
#include "describe.h"
|
||||||
@ -205,11 +205,16 @@ describeFunctions(const char *pattern, bool verbose)
|
|||||||
|
|
||||||
if (verbose)
|
if (verbose)
|
||||||
appendPQExpBuffer(&buf,
|
appendPQExpBuffer(&buf,
|
||||||
|
",\n CASE\n"
|
||||||
|
" WHEN p.provolatile = 'i' THEN 'immutable'\n"
|
||||||
|
" WHEN p.provolatile = 's' THEN 'stable'\n"
|
||||||
|
" WHEN p.provolatile = 'v' THEN 'volatile'\n"
|
||||||
|
"END as \"%s\""
|
||||||
",\n r.rolname as \"%s\",\n"
|
",\n r.rolname as \"%s\",\n"
|
||||||
" l.lanname as \"%s\",\n"
|
" l.lanname as \"%s\",\n"
|
||||||
" p.prosrc as \"%s\",\n"
|
" p.prosrc as \"%s\",\n"
|
||||||
" pg_catalog.obj_description(p.oid, 'pg_proc') as \"%s\"",
|
" pg_catalog.obj_description(p.oid, 'pg_proc') as \"%s\"",
|
||||||
_("Owner"), _("Language"),
|
_("Volatility"), _("Owner"), _("Language"),
|
||||||
_("Source code"), _("Description"));
|
_("Source code"), _("Description"));
|
||||||
|
|
||||||
if (!verbose)
|
if (!verbose)
|
||||||
|
Reference in New Issue
Block a user