Re: patch: autocomplete for functions

From: Josh Kupershmidt <schmiddy(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: patch: autocomplete for functions
Date: 2012-06-19 04:16:57
Message-ID: CAK3UJRFtfje0KBZ-Lkhyz7Z5Nwg0WDSpqJ+bSp-fBOYWN+bzqg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Mar 19, 2012 at 1:01 PM, Alvaro Herrera
<alvherre(at)commandprompt(dot)com> wrote:

> I'm rather of the contrary opinion -- surely if we're going to complete
> function names, we should only complete those that are in schemas in the
> path; similarly for column names.

I think it makes sense to only include currently-visible functions,
but *not* only columns from currently visible tables, since we won't
know yet whether the user intends to schema-qualify the table name.

>  (BTW I didn't check but does this
> completion work if I schema-qualify a column name?)

Peter's proposed tab-completion only kicks in for the column-name
itself. Keep in mind, the user might be trying to enter:
SELECT schema.table.column ...
SELECT table.column ...
SELECT table_alias.column ...
SELECT column ...

and presumably want to tab-complete the second token somehow. I'm a
bit leery about trying to tab-complete those first two, and the third
is right out. Just having the fourth would make me happy.

Josh

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-06-19 05:43:18 Re: Allow WAL information to recover corrupted pg_controldata
Previous Message Josh Kupershmidt 2012-06-19 04:13:58 Re: patch: autocomplete for functions