Re: [PATCH] Improve autocompletion for SELECT statements

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Wander Winkelhorst <w(dot)winkelhorst(at)gmail(dot)com>
Cc: pgadmin-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] Improve autocompletion for SELECT statements
Date: 2011-11-01 15:31:36
Message-ID: 1320161496.2122.64.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

On Tue, 2011-11-01 at 15:11 +0100, Wander Winkelhorst wrote:
> Hi,
>
> On Tue, Nov 1, 2011 at 2:50 PM, Guillaume Lelarge <guillaume(at)lelarge(dot)info>wrote:
>
> >
> > Line 482 is when you freed the buffer. Not sure it's relevant to this
> > issue, but you have a bug in your code.
> >
>
> Sorry; seems like the allocation was off by one.
>
> Attached is the updated patch.
>

OK, it works now. I understand a lot of improvements could come later,
but there is one thing that bugs me. And I think it should be fixed
before applying.

Let's say I wrote this:

SELECT * FROM person JOIN company ON

and try autocompletion afterwards. I get the list of columns in person
and company, which is great. The issue is that you only have the
column's name, not the table's name. So you don't know if the column
refers to the first table or the second. We could say it's not an issue
if we were sure they were all different. But if I have two times the id
column, it gets kinda weird. Maybe you should show the table's name in
front of the column's name.

Moreover, I'm not sure this is done or not. But having the columns in
order (of attnum) would be great.

--
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Guillaume Lelarge 2011-11-03 11:20:07 pgAdmin III commit: Fix cache type lookup
Previous Message Guillaume Lelarge 2011-11-01 14:40:05 Re: Option "Nulls First" in the ordering screen.