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

Commit7c07b13

Browse files
author
Neil Conway
committed
Add the function's volatility to the output of psql's \df+ command.
Update the psql reference page accordingly.
1 parent867e2c9 commit7c07b13

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

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

Lines changed: 2 additions & 2 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.191 2007/05/03 15:47:48 alvherre Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.192 2007/06/28 06:40:16 neilc Exp $
33
PostgreSQL documentation
44
-->
55

@@ -976,7 +976,7 @@ testdb=&gt;
976976
class="parameter">pattern</replaceable>
977977
is specified, only functions whose names match the pattern are shown.
978978
If the form <literal>\df+</literal> is used, additional information about
979-
each function, including language and description, is shown.
979+
each function, includingvolatility,language, source code and description, is shown.
980980
</para>
981981

982982
<note>

‎src/bin/psql/describe.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2007, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.155 2007/03/19 23:38:31 wieck Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.156 2007/06/28 06:40:16 neilc Exp $
77
*/
88
#include"postgres_fe.h"
99
#include"describe.h"
@@ -205,11 +205,16 @@ describeFunctions(const char *pattern, bool verbose)
205205

206206
if (verbose)
207207
appendPQExpBuffer(&buf,
208+
",\n CASE\n"
209+
" WHEN p.provolatile = 'i' THEN 'immutable'\n"
210+
" WHEN p.provolatile = 's' THEN 'stable'\n"
211+
" WHEN p.provolatile = 'v' THEN 'volatile'\n"
212+
"END as \"%s\""
208213
",\n r.rolname as \"%s\",\n"
209214
" l.lanname as \"%s\",\n"
210215
" p.prosrc as \"%s\",\n"
211216
" pg_catalog.obj_description(p.oid, 'pg_proc') as \"%s\"",
212-
_("Owner"),_("Language"),
217+
_("Volatility"),_("Owner"),_("Language"),
213218
_("Source code"),_("Description"));
214219

215220
if (!verbose)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp