Re: psql: Add \dL to show languages

From: Andreas Karlsson <andreas(at)proxel(dot)se>
To: Josh Kupershmidt <schmiddy(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Fernando Ike <fike(at)midstorm(dot)org>
Subject: Re: psql: Add \dL to show languages
Date: 2011-01-17 20:51:24
Message-ID: 1295297484.29248.13.camel@jansson
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)proxel(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-01-17 20:51:57 Re: Warning compiling pg_dump (MinGW, Windows XP)
Previous Message Tom Lane 2011-01-17 20:46:21 Re: Bug in pg_describe_object, patch v2