Hi all,
I noticed that the plpgsql extension gets installed with an extension
comment of 'PL/pgSQL procedural language', which comes from
plpgsql.control. That seems fine and dandy, but take a look at the
following query (modified from psql's \dL query):
SELECT l.lanname AS "Name", pg_catalog.pg_get_userbyid(l.lanowner) as "Owner", l.lanpltrusted AS "Trusted",
d.description
FROM pg_catalog.pg_language l
LEFT JOIN pg_description d
ON d.classoid = l.tableoid AND d.objoid = l.oid;
You should see plpgsql has no comment. The comment does show up if
you're looking for extension comments, like in this query (lifted from
the pg_comments patch):
SELECTd.objoid, d.classoid, d.objsubid,'extension'::text AS objtype,ext.extnamespace AS objnamespace,ext.extname AS
objname,d.description,nsp.nspnameIN ('pg_catalog', 'information_schema') AS is_system
FROMpg_description dJOIN pg_extension ext ON d.classoid = ext.tableoid AND d.objoid = ext.oidJOIN pg_namespace nsp ON
ext.extnamespace= nsp.oid
WHEREd.objsubid = 0;
So, basically, I would like to have that comment show up for the first
query. I imagine this could be fixed quite easily by adding:
COMMENT ON PROCEDURAL LANGUAGE plpgsql IS 'PL/pgSQL procedural language';
somewhere like plpgsql--1.0.sql. And if you're wondering why I care
about any of this, it's because I'd like to fix up psql's \dL command
to display the comments attached to procedural languages, and I'd
rather not have to special-case plpgsql.
Josh