Re: TABLE tab completion - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: TABLE tab completion
Date
Msg-id CABUevEzvDP-YNA7ddrA3t_TH1MFpcutvCGmbNgsCBaX612WwVA@mail.gmail.com
Whole thread Raw
In response to Re: TABLE tab completion  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Responses Re: TABLE tab completion
Re: TABLE tab completion
List pgsql-hackers
On Sun, Sep 25, 2011 at 15:06, Dean Rasheed <dean.a.rasheed@gmail.com> wrote:
> On 24 September 2011 11:59, Magnus Hagander <magnus@hagander.net> wrote:
>> TABLE tab completion in psql only completes to tables, not views. but
>> the TABLE command works fine for both tables and views (and also
>> sequences).
>>
>> Seems we should just complete it to relations and not tables - or can
>> anyone see a particular reason why we shouldn't?
>>
>
> Doesn't that mean that "DROP TABLE <tab>" would offer up views as well
> as tables, which would be incorrect?

Meh - you are correct, of course. I guess that's why we have code review :-)

So - not a oneliner, but how about something like this?

(Happy to have someone point out a neater way of doing it, not
entirely fluent in how we do the tab completion..)

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

Attachment

pgsql-hackers by date:

Previous
From: Fujii Masao
Date:
Subject: Re: Remastering using streaming only replication?
Next
From: Fujii Masao
Date:
Subject: Re: new createuser option for replication role