Recalling previous commands at the PSQL prompt

Started by Gnoh, Chee Sengover 27 years ago3 messages
#1Gnoh, Chee Seng
csgnoh@intergraph.com.sg

Hi All,

I am new to PostgreSQL. I was wondering if there is a way to recall
previous commands at the PSQL prompt, this would save me the hassle of
typing the same SQL commands again. Thanks in advance.

Best Regards,

Chee Seng
(csgnoh@intergraph.com.sg)

#2Maarten Boekhold
maartenb@dutepp0.et.tudelft.nl
In reply to: Gnoh, Chee Seng (#1)
Re: [GENERAL] Recalling previous commands at the PSQL prompt

On Mon, 20 Jul 1998, Gnoh, Chee Seng wrote:

Hi All,

I am new to PostgreSQL. I was wondering if there is a way to recall
previous commands at the PSQL prompt, this would save me the hassle of
typing the same SQL commands again. Thanks in advance.

Use the up-arrow. If that doesn't work, you probably haven't got
libreadline/libhistory installed, or they are installed in an unusual
place where configure couldn't find them.

Maarten

_____________________________________________________________________________
| TU Delft, The Netherlands, Faculty of Information Technology and Systems |
| Department of Electrical Engineering |
| Computer Architecture and Digital Technique section |
| M.Boekhold@et.tudelft.nl |
-----------------------------------------------------------------------------

#3Gene Selkov, Jr.
selkovjr@mcs.anl.gov
In reply to: Maarten Boekhold (#2)
Re: [GENERAL] Recalling previous commands at the PSQL prompt

Maarten Boekhold wrote:

On Mon, 20 Jul 1998, Gnoh, Chee Seng wrote:

Hi All,

I am new to PostgreSQL. I was wondering if there is a way to recall
previous commands at the PSQL prompt, this would save me the hassle of
typing the same SQL commands again. Thanks in advance.

Use the up-arrow. If that doesn't work, you probably haven't got
libreadline/libhistory installed, or they are installed in an unusual
place where configure couldn't find them.

How about giving psql command history a longer life, like bash does it
(.bash_history)?

Gene