Re: [PATCH] Psql List Languages - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [PATCH] Psql List Languages
Date
Msg-id 200907191100.50278.peter_e@gmx.net
Whole thread Raw
In response to Re: [PATCH] Psql List Languages  (Fernando Ike <fike@midstorm.org>)
Responses Re: [PATCH] Psql List Languages
List pgsql-hackers
On Friday 17 July 2009 18:26:31 Fernando Ike wrote:
>    Follow new version patch, now with version postgresql version.

1) This is obviously wrong:

CASE WHEN l.lanispl = 't' THEN 'Trusted' WHEN l.lanispl = 'f' THEN 'Untrusted' 
END

2) It may be better to use lanispl to determine whether a language is a system 
object or not.  It's kind of obscure, but pg_dump does it that way, so it'd at 
least be consistent.

3) Your code does processSQLNamePattern(), but neither the help nor the 
documentation mention that \dL accepts a pattern.  A pattern for listing 
languages might be overkill, but at least the documentation needs to match 
what the code attempts to do.

4) Instead of LEFT JOIN pg_catalog.pg_proc p on l.lanplcallfoid = p.oid etc, 
just cast the oid field to regprocedure.  See examples elsewhere in 
describe.c.

Please submit an updated patch.


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Sampling profiler updated
Next
From: Andres Freund
Date:
Subject: Re: machine-readable explain output v2