psql auto-completion for multiple where clauses - Mailing list pgsql-hackers

From Thom Brown
Subject psql auto-completion for multiple where clauses
Date
Msg-id AANLkTinOdp9x0ac8NxuXayDwU4mbqFfInzXBTYkCAPbk@mail.gmail.com
Whole thread Raw
Responses Re: psql auto-completion for multiple where clauses
List pgsql-hackers
Someone highlighed on IRC that after the first WHERE clause,
autocomplete no longer works.

An example:

CREATE TABLE tab_completion (
id serial,
stuff text,
meow boolean
);

SELECT * FROM tab_completion WHERE id = 2 AND s<tab><tab>

This would output a blank line.

Is there any chance of improving this so it would work for more than 1
WHERE clause?  I notice it also doesn't work for GROUP BY or HAVING at
all, but seems to be fine for ORDER BY.

While we're at it, how about a smarter auto-complete for
quote-required column names (or whichever term I was supposed to use
just then):

CREATE TABLE tab_completion (
id serial,
stuff text,
"bark bark" boolean
);

SELECT * FROM tab_completion WHERE id = 2 AND b<tab>

Since there is no column beginning with "b", it might be an idea to
get it to match "bark bark" instead.  It might help alleviate what may
be a gotcha for some.

Thanks

Thom


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: dividing money by money
Next
From: Tom Lane
Date:
Subject: Re: dividing money by money