Skip to content

Commit 0d93e38

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 function returns set.
1 parent 6099245 commit 0d93e38

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy