Re: Query tool: Autocompletion
Re: Query tool: Autocompletion
> > > 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 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
Re: Query tool: Autocompletion
От:
Andreas Pflug <pgadmin@pse-consulting.de>
Дата:
I've spent several hours now to get the beast compiled, still no go. It's a nightmare I don't like to spend more time on. Dave, if you succeed hacking something workable that doesn't try to call more core pgsql includes from somewhere (!), commit it. Note: pgsql copied stuff should go to src/db, not utils. Actually, I doubt that the psql way is desirable at all. Instead of constantly accessing the db for completion candidates, using pgAdmin's object tree as cache should be the way to go. Regards, Andreas