1
0
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:
Neil Conway
2007-06-28 06:40:16 +00:00
parent 867e2c91a0
commit 7c07b136bc
2 changed files with 9 additions and 4 deletions

View File

@ -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
-->
@ -976,7 +976,7 @@ testdb=&gt;
class="parameter">pattern</replaceable>
is specified, only functions whose names match the pattern are shown.
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>
<note>

View File

@ -3,7 +3,7 @@
*
* 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 "describe.h"
@ -205,11 +205,16 @@ describeFunctions(const char *pattern, bool verbose)
if (verbose)
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"
" l.lanname as \"%s\",\n"
" p.prosrc as \"%s\",\n"
" pg_catalog.obj_description(p.oid, 'pg_proc') as \"%s\"",
_("Owner"), _("Language"),
_("Volatility"), _("Owner"), _("Language"),
_("Source code"), _("Description"));
if (!verbose)