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

Commit0d93e38

Browse files
committed
Make psql's \df display functions that return sets as having return type
'setof something'; formerly you could not tell at all that the functionreturns set.
1 parent6099245 commit0d93e38

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

‎src/bin/psql/describe.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright 2000-2002 by PostgreSQL Global Development Group
55
*
6-
* $Header: /cvsroot/pgsql/src/bin/psql/describe.c,v 1.70 2002/10/15 02:24:16 tgl Exp $
6+
* $Header: /cvsroot/pgsql/src/bin/psql/describe.c,v 1.71 2002/10/19 20:50:44 tgl Exp $
77
*/
88
#include"postgres_fe.h"
99
#include"describe.h"
@@ -119,9 +119,10 @@ describeFunctions(const char *pattern, bool verbose)
119119
initPQExpBuffer(&buf);
120120

121121
printfPQExpBuffer(&buf,
122-
"SELECT pg_catalog.format_type(p.prorettype, NULL) as \"%s\",\n"
123-
" n.nspname as \"%s\",\n"
124-
" p.proname as \"%s\",\n"
122+
"SELECT CASE WHEN p.proretset THEN 'setof ' ELSE '' END ||\n"
123+
" pg_catalog.format_type(p.prorettype, NULL) as \"%s\",\n"
124+
" n.nspname as \"%s\",\n"
125+
" p.proname as \"%s\",\n"
125126
" pg_catalog.oidvectortypes(p.proargtypes) as \"%s\"",
126127
_("Result data type"),_("Schema"),_("Name"),
127128
_("Argument data types"));

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp