Re: psql: Add \dL to show languages - Mailing list pgsql-hackers

From Andreas Karlsson
Subject Re: psql: Add \dL to show languages
Date
Msg-id 1295297484.29248.13.camel@jansson
Whole thread Raw
In response to Re: psql: Add \dL to show languages  (Josh Kupershmidt <schmiddy@gmail.com>)
Responses Re: psql: Add \dL to show languages
List pgsql-hackers
On Sun, 2011-01-16 at 22:32 -0500, Josh Kupershmidt wrote:
> On Sat, Jan 15, 2011 at 8:26 PM, Andreas Karlsson <andreas@proxel.se> wrote:
> > Should we include a column in \dL+ for the laninline function (DO
> > blocks)?
> 
> Hrm, I guess that could be useful for the verbose output at least.

Magnus Hagander agreed with that idea and added that for that we need to
check the version. The column was added in 9.0 if I recall.

> > SELECT l.lanname AS "Procedural Language",
> >       pg_catalog.pg_get_userbyid(l.lanowner) as "Owner",
> >       l.lanpltrusted AS "Trusted",
> >       l.lanplcallfoid::regprocedure AS "Call Handler",
> >       l.lanvalidator::regprocedure AS "Validator",
> >       NOT l.lanispl AS "System Language",
> > pg_catalog.array_to_string(l.lanacl, E'\n') AS "Access privileges" FROM pg_catalog.pg_language l
> >  ORDER BY 1;
> 
> Sorry, I don't understand.. what's wrong with the formatting of this
> query? In terms of whitespace, it looks pretty similar to
> listDomains() directly below listLanguages() in describe.c.

It is quite similar, so the general style is correct. Just some errors
in the details. Here are the ones I see in the example above, but there
could be others in other code paths.

* Missing indentation before ACL column, the other functions have it.
* One space before FROM instead of one newline like the other queries.
* The space before ORDER BY.

That's enough nitpickery for now. :)

Regards,
Andreas




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Bug in pg_describe_object, patch v2
Next
From: Tom Lane
Date:
Subject: Re: Warning compiling pg_dump (MinGW, Windows XP)