Re: Better psql tab-completion support for schemas and tables

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Sabino Mullane <greg(at)turnstep(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Better psql tab-completion support for schemas and tables
Date: 2008-03-29 19:23:14
Message-ID: 19784.1206818594@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Greg Sabino Mullane <greg(at)turnstep(dot)com> writes:
> Full support for all schema and table name combinations when
> getting a list of attributes. All of the following will now work:

> select * from information_schema.columns where <tab>
> select * from foo where <tab>
> select * from "user" where <tab>
> select * from "foo" where <tab>
> select * from "Uppercase".lower where <tab>
> select * from "gtsm.com"."foo.Bar" where <tab>
> select * from "GTSM.com".foo where <tab>

Applied with minor revisions. I noticed while testing this that
although you fixed it for the case of the user having unnecessarily
quoted the preceding name, for example given a table foo,

update "foo" set <tab>

it's still not bright about letting you complete such an entry in the
first place -- try

update "f<tab>

That doesn't invalidate this patch, but there's still more work to do
on the completion queries.

regards, tom lane

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Magnus Hagander 2008-03-29 21:32:39 Re: create language ... if not exists
Previous Message Heikki Linnakangas 2008-03-29 19:00:42 Re: create language ... if not exists