Unix Technical Forum

Tab-completion feature ?

This is a discussion on Tab-completion feature ? within the pgsql Hackers forums, part of the PostgreSQL category; --> Hi All, I observed an a bit strange behaviour of the Tab-completion in postgres 8.0.1 I have the following ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-11-2008, 03:21 AM
Sergey E. Koposov
 
Posts: n/a
Default Tab-completion feature ?

Hi All,

I observed an a bit strange behaviour of the Tab-completion in postgres
8.0.1

I have the following command

leda=# ALTER TABLE any_table RENAME TO

After the "TO" there is one space and the cursor is after that space
I press tab and I get

leda=# ALTER TABLE any_table RENAME TO TO

I understand that this is a bit stupid and not very useful example, but
still this is probably not an expected behaviour.

With Best Regards,
Sergey

PS In Postgres 7.4.6 there is no such problem.

------------------------------------------------------------
Sergey E. Koposov
Sternberg Astronomical Institute, Moscow University (Russia)
Max-Planck Institute for Astronomy (Germany)
Internet: math@sai.msu.ru, http://lnfm1.sai.msu.su/~math/



---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-11-2008, 03:22 AM
Greg Sabino Mullane
 
Posts: n/a
Default Re: Tab-completion feature ?


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


> After the "TO" there is one space and the cursor is after that space
> I press tab and I get
>
> leda=# ALTER TABLE any_table RENAME TO TO


What is happening is that psql is simply assuming that the first "TO"
may be the name of a column you are about to rename. It's the same
as:

ALTER TABLE any_table RENAME mycolumn TO

We can probably have the tab-completion code call up a list of column
names for comparison: not sure if is worth the trouble though.

- --
Greg Sabino Mullane greg@turnstep.com
PGP Key: 0x14964AC8 200504101714
http://biglumber.com/x/web?pk=2529DF...9B906714964AC8

-----BEGIN PGP SIGNATURE-----

iD8DBQFCWZc7vJuQZxSWSsgRAoPiAKCVQHa2swRy6/jGzKGJplVv7je1mACg2Z6J
hJ8eSYiss3LDHsBQLBWrBJc=
=jjYQ
-----END PGP SIGNATURE-----



---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:27 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com