Re: Query tool: Autocompletion - Mailing list pgadmin-hackers

From Magnus Hagander
Subject Re: Query tool: Autocompletion
Date
Msg-id 6BCB9D8A16AC4241919521715F4D8BCE92E9CD@algol.sollentuna.se
Whole thread Raw
Responses Re: Query tool: Autocompletion  (Andreas Pflug <pgadmin@pse-consulting.de>)
List pgadmin-hackers
> > > So. Thoughts, and comments?
>
> Nice, it works quite well. Some thoughts:

Here's an updated version. No change in the actual "psql-emulation"
logic, so no new .inc file needed.


> - My main concern is that I do use tab, which this prevents -
> as per your comment in the source I think we need an option
> to turn the feature off for those that don't want it.

Config option added in this one. I left it always possible to use
Ctrl-Space to do it (visual studio style). I don't think anybody
actually uses Ctrl-Space in their SQL code, but I'm sure a lot of ppl
use TAB.


> - A space should be added after an item has been inserted
> form the auto-complete list, per psql.

Done in this version. If you "terminate" the popdown using space, you
end up with *two* spaces. From what I can tell, there is no way around
that. And two spaces shouldn't break a query.


> - Schema-prefixed table names can't have columns in the WHERE
> clause auto-completed. Actually on further investigation this
> seems to apply to psql as well.

It does. I think I saw something on the list that someone was working on
making the tab completion better in psql. I'm not sure if this is part
of it though.
(Though I'm sure this patch will have to be updated once that is
applied, since it looked like one or two renames of macros etc)


> - SELECT * FROM foo WHERE bar = 'FOO' AND <tab> doesn't work.
> Also as per psql?

Yes.


> I'd like Andreas to look at this before applying -
> particularly the encoding bits which are still largely a
> mystery to me as well.

Sounds good.


//Magnus

Attachment

pgadmin-hackers by date:

Previous
From: "Dave Page"
Date:
Subject: Re: Website
Next
From: Bastiaan Wakkie
Date:
Subject: Re: Website