aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Conway <neilc@samurai.com>2007-06-28 06:40:16 +0000
committerNeil Conway <neilc@samurai.com>2007-06-28 06:40:16 +0000
commit7c07b136bc596ed1238e786490419b6d26587302 (patch)
tree2a17fd7099fd75059becf01234263d40dfc52a80
parent867e2c91a0c341111b7a5257dc4c9a2659a022dc (diff)
downloadpostgresql-7c07b136bc596ed1238e786490419b6d26587302.tar.gz
postgresql-7c07b136bc596ed1238e786490419b6d26587302.zip
Add the function's volatility to the output of psql's \df+ command.
Update the psql reference page accordingly.
-rw-r--r--doc/src/sgml/ref/psql-ref.sgml4
-rw-r--r--src/bin/psql/describe.c9
2 files changed, 9 insertions, 4 deletions
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index 49570be8908..7da2f4f4561 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -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>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index 13d3be678e8..041a1c14b63 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -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)