Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

postgres on windows command history and autocomplete

Status
Not open for further replies.

kirilisa

Programmer
Aug 9, 2005
3
AU
I just installed cygwin on my Windows XP machine. Cygwin works as it should, but when I run postgres within my cygwin window, I cannot get autocomplete and command history. Autocomplete etc works fine in the cygwin sheel, but when I am within postgres, it doesn't. Any thoughts? This is driving me mad.
 
Sounds like postgresql was compiled without libreadline support. Did you compile it yourself? If so, do a ./configure --help and look for something related to --enable-readline or similar.

Try this. Find your actual psql binary (below is where Ubuntu Hoary has it on my system):
[tt]
[root@ubuntu:~]# ldd /usr/lib/postgresql/bin/psql | grep readline
libreadline.so.4 => /lib/libreadline.so.4 (0x44e55000)
[/tt]
If you don't get anything, then your binary wasn't compiled with readline support. You can either look for packaged binaries with readline support compiled in, or compile postgresql from source yourself. That's up to you.

HTH!

----
JBR
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top