Re: psql auto-completion for multiple where clauses - Mailing list pgsql-hackers

From Tom Lane
Subject Re: psql auto-completion for multiple where clauses
Date
Msg-id 18130.1279299998@sss.pgh.pa.us
Whole thread Raw
In response to Re: psql auto-completion for multiple where clauses  ("Greg Sabino Mullane" <greg@turnstep.com>)
List pgsql-hackers
"Greg Sabino Mullane" <greg@turnstep.com> writes:
> No: there is only a small number of words that we go back through, 
> so the above will not work as we cannot get back to the name of the table 
> from the right side of the AND. The way to fix that is to redesign our 
> tab-completion system such that it knows about a greater number of words, 
> perhaps even the complete statement.

Yeah, tab_complete.c is really a pretty awful kluge.  One thing that
might be interesting is to make it use psql's lexer, which I think
wasn't there at all when the completion code was started.  But that just
takes care of word-recognition issues, it won't do anything at the
semantic level.  I hesitate to think of trying to incorporate the
backend grammar too :-(
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: putting plproxy in pg_pltemplate
Next
From: Rob Wultsch
Date:
Subject: Re: SHOW TABLES