Re: tab completion in psql - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: tab completion in psql
Date
Msg-id Pine.GSO.4.02A.9911301836280.13278-100000@Vessla.DoCS.UU.SE
Whole thread Raw
In response to tab completion in psql  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: tab completion in psql  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: [HACKERS] Re: tab completion in psql  (Brian E Gallew <geek+@cmu.edu>)
List pgsql-hackers
On Tue, 30 Nov 1999, Bruce Momjian wrote:

> I liked the new tab competion ability in psql.  Seems to work well in
> CREATE * but not so great in the others, like doing FROM and WHERE.  Can
> you take a look at backend/parser/keywords.c and see if you can merge
> completion for those words in to psql.  It may be a nice feature.

The tab completion is not very smart, it only covers the really obvious
cases. Doing FROM shouldn't be so hard, but once you get into WHERE you
almost end up writing a complete SQL parser just for this. Not that
there's anything fundamentally wrong with that. It's a very evolving piece
of code, however; it can only get better. I bet those readline authors
never had this one in mind. Otherwise readline would play nicer with it.

-- 
Peter Eisentraut                  Sernanders vaeg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Ownership/protection (was Re: [HACKERS] Portability)
Next
From: Bruce Momjian
Date:
Subject: Re: [ADMIN] When postgres will be faster?