From: | Josh Kupershmidt <schmiddy(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | plpgsql extension install nitpick |
Date: | 2011-07-03 03:02:14 |
Message-ID: | CAK3UJREs08giAHkCJ4U9pnSK=gb=Fm6TDR_A30JVDKsNRD09Tw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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):
SELECT
d.objoid, d.classoid, d.objsubid,
'extension'::text AS objtype,
ext.extnamespace AS objnamespace,
ext.extname AS objname,
d.description,
nsp.nspname IN ('pg_catalog', 'information_schema') AS is_system
FROM
pg_description d
JOIN pg_extension ext ON d.classoid = ext.tableoid AND d.objoid = ext.oid
JOIN pg_namespace nsp ON ext.extnamespace = nsp.oid
WHERE
d.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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2011-07-03 03:22:41 | Re: plpgsql extension install nitpick |
Previous Message | Steve Singer | 2011-07-03 02:08:28 | Re: libpq SSL with non-blocking sockets |