Re: psql: Add \dL to show languages

From: Josh Kupershmidt <schmiddy(at)gmail(dot)com>
To: Andreas Karlsson <andreas(at)proxel(dot)se>
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-19 00:34:41
Message-ID: AANLkTi=_aWqOt2KnKEfTSvmqFoGpk-7Ci1tcoDYyKY5M@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jan 18, 2011 at 1:35 PM, Andreas Karlsson <andreas(at)proxel(dot)se> wrote:
> 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.

Whoops, good you caught that. Should be fixed now.

> 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. :)

Got that now too. I lost my ~/.emacs file recently, which is mostly
why I'm making whitespace mistakes. Rebuilding slowly though;
(setq-default show-trailing-whitespace t) is what I needed.

I left the "Call Handler" and "Validator" columns in the verbose
output since I haven't heard otherwise.

Josh

Attachment Content-Type Size
psql_languages.v8.patch text/x-patch 6.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hitoshi Harada 2011-01-19 01:06:15 Re: pl/python refactoring
Previous Message Tom Lane 2011-01-19 00:34:01 Re: Extending opfamilies for GIN indexes