Re: [PATCH] Improve autocompletion for SELECT statements

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

On Tue, 2011-11-15 at 09:36 +0000, Dave Page wrote:
> On Tue, Nov 15, 2011 at 9:31 AM, Wander Winkelhorst
> <w(dot)winkelhorst+pgadmin(at)gmail(dot)com> wrote:
> >
> >
> > On Tue, Nov 15, 2011 at 10:03 AM, Dave Page <dpage(at)pgadmin(dot)org> wrote:
> >>
> >> On Mon, Nov 14, 2011 at 8:15 PM, Wander Winkelhorst
> >> <w(dot)winkelhorst(at)gmail(dot)com> wrote:
> >> >
> >> >
> >> > On Mon, Nov 14, 2011 at 10:16 AM, Dave Page <dpage(at)pgadmin(dot)org> wrote:
> >> >>
> >> >> FYI, I just took a look at the patch and it does touch
> >> >> tab-complete.inc - it certainly should *not* do that, as
> >> >> tab-complete.inc is generated with tabcomplete.pl from the upstream
> >> >> tab-complete.c. Any changes made to it are likely to be lost the next
> >> >> time it's updated. If that file must be changed, then it should be
> >> >> done by tab-complete.pl, though frankly it would be better to push the
> >> >> changes into psql first.
> >> >
> >> > Could you please tell me how I'm supposed to use tabcomplete.pl, and
> >> > where I
> >> > can get the correct version of tab-complete.c?
> >>
> >> I'm not sure I've ever used it - that was originally written by Magnus
> >> so I think he handled it originally.
> >>
> >> The top of the script has this:
> >>
> >> # This script builds tab-complete.inc from tab-complete.c. The
> >> # source file (tab-complete.c) should be copied from the latest
> >> # PostgreSQL sources (src/bin/psql/tab-complete.c), so we don't
> >> # have to do all the work ourselves...
> >>
> >> By the looks of it you copy tab-complete.c to pgadmin/utils, and then
> >> run the script in that directory.
> >
> >
> > Yeah, I've tried that, didn't work. tabcomplete.pl says "Failed match 1 at
> > tabcomplete.pl line 28."
>
> :-(
>

I tried too, and it starts to work with release 8.3. Makes you wonder
when was the last time it got updated. git log doesn't seem to give any
commit since 2007.

> >> I wouldn't be surprised if it needs
> >> updating though; the tab completion code does get hacked on quite
> >> regularly in PostgreSQL.
> >
> > So, should I just get the latest version of tab-complete.c, and base my work
> > on that? I'd be doing to separate things in one patch, which I don't like,
> > but if this is what gets my changes in pgadmin, I'd do it.
>
> Well you can always update tab-complete.c, send that patch, and then
> continue to work on top of that.
>

Just to make sureI get that right. The job to do is to update this file
in the PostgreSQL source files, so that we can grab that and push it
into pgAdmin's repository. Right?

If that's right, it's no wonder why this code doesn't get updated that
much.

--
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-15 21:01:44 Re: [PATCH] Improve autocompletion for SELECT statements
Previous Message Dave Page 2011-11-15 09:36:41 Re: [PATCH] Improve autocompletion for SELECT statements