Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Databases - Practical PostgreSQL
Previous Page Home Next Page

The Readline and History Libraries

The psql client supports some of the same command-tracking features that the bash shell supports; namely, reverse-i-search, tab completion, and command history (command history is stored in /home/ [username] /.psql_ history ). These features are all available because psql support the readline library, which provide these functions to bash.

If the configure script finds the readline library, reverse-i-search, tab completion and command history should be automatically installed when you compile PostgreSQL. If psql does not support tab-completion, history, or reverse-i-search (history search), it may be because you either have the library files and/or header files installed into a non-standard directory. If this is the case, and you wish to reconfigure psql to use the readline and history features, your first task is to locate the library header files. (The filenames are: libreadline.a , readline.h , and history.h ).

Once you know where the library and header files are stored on your filesystem, tell the PostgreSQL configure script where they are by using the following flags: --with-includes= [.h file locations] , and --with-libs=[ lib file location ] . After reconfiguration, remake the psql binary, and the features should become available. See the Section called Step 3: Configuring the Source Tree in Chapter 2" in Chapter 2 for more on the configuration process of PostgreSQL.

Databases - Practical PostgreSQL
Previous Page Home Next Page

 
 
  Published under the terms of the Open Publication License Design by Interspire