pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedType Ahead Issue
2+ messages / 2 participants
[nested] [flat]
* Type Ahead Issue
@ 2012-03-07 18:42 Carlos Mennens <carlos.mennens@gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: Carlos Mennens @ 2012-03-07 18:42 UTC (permalink / raw)
To: pgsql-sql
I don't know if this is an issue with my client (Psql) or if it's
something I'm doing wrong but I've noticed this issue before and can't
figure it out. When I'm using the psql client, I really rely on the
tab / type ahead auto completion. When I run my command on one single
line, it works fine but when I break my line up into segments, it
doesn't understand what I'm trying to do:
ALTER TABLE meh ALTER C (if you press 'tab' after the 'c', psql knows
the only logical option is 'COLUMN'.
When I do the following, I don't get the same results:
ALTER TABLE meh
ALTER C (when I press 'tab' after 'C' to auto complete 'COLUMN', I get
the options only for 'COLLATION' or 'CONVERSION'. Why does it do this?
Am I missing something here? When the command is on one line, auto
complete works fine but when I break it up as show above in the 2nd
example, it acts like 'COLUMN' isn't even a valid option but if I
manually type the word 'COLUMN' and finish the command, it works. Why
is this acting this way?
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Type Ahead Issue
@ 2012-03-07 20:37 Tom Lane <tgl@sss.pgh.pa.us>
parent: Carlos Mennens <carlos.mennens@gmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2012-03-07 20:37 UTC (permalink / raw)
To: Carlos Mennens <carlos.mennens@gmail.com>; +Cc: pgsql-sql
Carlos Mennens <carlos.mennens@gmail.com> writes:
> Am I missing something here? When the command is on one line, auto
> complete works fine but when I break it up as show above in the 2nd
> example, it acts like 'COLUMN' isn't even a valid option but if I
> manually type the word 'COLUMN' and finish the command, it works.
Yeah, the autocompletion logic can only "see" the current line of input,
so in your second example it has no idea that this is an ALTER TABLE
command. My recollection is that there's no very nice way around that
given the limitations of the readline callback interface, though maybe
if somebody got ambitious they could improve it.
regards, tom lane
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2012-03-07 20:37 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-03-07 18:42 Type Ahead Issue Carlos Mennens <carlos.mennens@gmail.com>
2012-03-07 20:37 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox