Skip to content

Commit b2a52b3

Browse files
committed
Make \dFt and \dFt+ do something different --- omitting the function
names in the former case seems more consistent with the behavior of other \dF commands.
1 parent d321421 commit b2a52b3

File tree

1 file changed

+23
-13
lines changed

1 file changed

+23
-13
lines changed

src/bin/psql/describe.c

Lines changed: 23 additions & 13 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.158 2007/08/21 01:11:22 tgl Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.159 2007/08/22 02:25:34 tgl Exp $
77
*/
88
#include "postgres_fe.h"
99
#include "describe.h"
@@ -2227,18 +2227,28 @@ listTSTemplates(const char *pattern, bool verbose)
22272227

22282228
initPQExpBuffer(&buf);
22292229

2230-
printfPQExpBuffer(&buf,
2231-
"SELECT \n"
2232-
" n.nspname AS \"%s\",\n"
2233-
" t.tmplname AS \"%s\",\n"
2234-
" t.tmplinit::pg_catalog.regproc AS \"%s\",\n"
2235-
" t.tmpllexize::pg_catalog.regproc AS \"%s\",\n"
2236-
" pg_catalog.obj_description(t.oid, 'pg_ts_template') AS \"%s\"\n",
2237-
_("Schema"),
2238-
_("Name"),
2239-
_("Init"),
2240-
_("Lexize"),
2241-
_("Description"));
2230+
if (verbose)
2231+
printfPQExpBuffer(&buf,
2232+
"SELECT \n"
2233+
" n.nspname AS \"%s\",\n"
2234+
" t.tmplname AS \"%s\",\n"
2235+
" t.tmplinit::pg_catalog.regproc AS \"%s\",\n"
2236+
" t.tmpllexize::pg_catalog.regproc AS \"%s\",\n"
2237+
" pg_catalog.obj_description(t.oid, 'pg_ts_template') AS \"%s\"\n",
2238+
_("Schema"),
2239+
_("Name"),
2240+
_("Init"),
2241+
_("Lexize"),
2242+
_("Description"));
2243+
else
2244+
printfPQExpBuffer(&buf,
2245+
"SELECT \n"
2246+
" n.nspname AS \"%s\",\n"
2247+
" t.tmplname AS \"%s\",\n"
2248+
" pg_catalog.obj_description(t.oid, 'pg_ts_template') AS \"%s\"\n",
2249+
_("Schema"),
2250+
_("Name"),
2251+
_("Description"));
22422252

22432253
appendPQExpBuffer(&buf, "FROM pg_catalog.pg_ts_template t\n"
22442254
"LEFT JOIN pg_catalog.pg_namespace n ON n.oid = t.tmplnamespace\n");

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