Hi

2016-10-08 23:46 GMT+02:00 Jim Nasby <jim.na...@bluetreble.com>:

> On 10/3/16 3:18 PM, Pavel Stehule wrote:
>
>> I am feeling consensus on removing source of PL from \dt+. There is
>> partial consensus on saving this field (renamed) for C and internal
>> language. I am not sure about consensus about \sf enhancing.
>>
>
> FWIW, I'm completely in favor of ditching PL source code. I'm neutral on C
> and internal.
>

here is a patch

Regards

Pavel


> --
> Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
> Experts in Analytics, Data Architecture and PostgreSQL
> Data in Trouble? Get it in Treble! http://BlueTreble.com
> 855-TREBLE2 (855-873-2532)   mobile: 512-569-9461
>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index 6275a68..f03f547 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -455,10 +455,12 @@ describeFunctions(const char *functypes, const char *pattern, bool verbose, bool
 		printACLColumn(&buf, "p.proacl");
 		appendPQExpBuffer(&buf,
 						  ",\n l.lanname as \"%s\""
-						  ",\n p.prosrc as \"%s\""
+						  ",\n CASE\n"
+						  "      WHEN l.lanname IN ('c','internal') THEN p.prosrc\n"
+						  "    END as \"%s\""
 				",\n pg_catalog.obj_description(p.oid, 'pg_proc') as \"%s\"",
 						  gettext_noop("Language"),
-						  gettext_noop("Source code"),
+						  gettext_noop("Reference name"),
 						  gettext_noop("Description"));
 	}
 
-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to