-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

Robert Haas wrote:

> One thing that's been bugging me for a while is that the tab
> completion code all works by looking backward up to n words.  What we
> really want to know is what kind of statement we're in and where we
> are in it.  Absent other information, if we're in the target list of a
> SELECT statement (nested arbitrarily) that behavior is reasonable.  If
> we're someplace in a GRANT statement, or someplace in a CREATE
> STATEMENT where, say, a column name is expected, it's really not.

I played with this years ago, but readline does not really offer a 
good way to easily get what we want (the whole statement, chunked into 
nice bits to analyze). Of course at this point we should think about 
making things more generic so we can drop in whatever readline-alternative 
comes along in the future.

> Unfortunately, making the tab completion something other than
> incredibly stupid is likely to be an insane amount of work.

Insane amount of work? Check. Inredibly stupid? No, I think we've done 
pretty good given the limitations we have. You want to see incredibly 
stupid, see some of the *other* CLIs out there (hi, mysql! :)

- -- 
Greg Sabino Mullane g...@turnstep.com
End Point Corporation http://www.endpoint.com/
PGP Key: 0x14964AC8 201202101157
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----

iEYEAREDAAYFAk81TI4ACgkQvJuQZxSWSsivRQCfcze1WMq81rE+mtrOReHBQ6eV
SzEAn2JySDAoCokFkY/gtz//GqolVVm5
=d2LG
-----END PGP SIGNATURE-----



-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to