summaryrefslogtreecommitdiff
path: root/src/bin/psql/describe.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/psql/describe.c')
-rw-r--r--src/bin/psql/describe.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index c8a0bb7b3a5..2084f5ccdac 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -410,14 +410,9 @@ describeFunctions(const char *functypes, const char *func_pattern,
appendPQExpBuffer(&buf,
",\n l.lanname as \"%s\"",
gettext_noop("Language"));
- if (pset.sversion >= 140000)
- appendPQExpBuffer(&buf,
- ",\n COALESCE(pg_catalog.pg_get_function_sqlbody(p.oid), p.prosrc) as \"%s\"",
- gettext_noop("Source code"));
- else
- appendPQExpBuffer(&buf,
- ",\n p.prosrc as \"%s\"",
- gettext_noop("Source code"));
+ appendPQExpBuffer(&buf,
+ ",\n CASE WHEN l.lanname IN ('internal', 'c') THEN p.prosrc END as \"%s\"",
+ gettext_noop("Internal name"));
appendPQExpBuffer(&buf,
",\n pg_catalog.obj_description(p.oid, 'pg_proc') as \"%s\"",
gettext_noop("Description"));