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-18 18:35:44
Message-ID: 1295375744.29248.32.camel@jansson
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Josh,

Nope, I do not have any better ideas than "DO Blocks?".

Everything looks good with the exception one bug now.

\dL foo
********* QUERY **********
SELECT l.lanname AS "Name",
pg_catalog.pg_get_userbyid(l.lanowner) as "Owner",
l.lanpltrusted AS "Trusted"
FROM pg_catalog.pg_language lWHERE l.lanname ~ '^(foo)$'

ORDER BY 1;
**************************

ERROR: syntax error at or near "l"
LINE 4: FROM pg_catalog.pg_language lWHERE l.lanname ~ '^(foo)$'

I believe the fix is to move \n from before the WHERE clause to after
the FROM, and from before ORDER BY to after WHERE.

Fix this bug and I believe this patch is ready for a committer.

PS. You added some trailing withspace after printACLColumn, A
recommendation if you want to avoid it is to either have a git commit
hook which checks for that and/or have colouring of git diffs so you can
see it marked in red. I use both. :)

Andreas

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2011-01-18 18:36:13 Re: pg_basebackup for streaming base backups
Previous Message Tom Lane 2011-01-18 18:32:44 Re: limiting hint bit I/O