Thread: psql history buffer.

psql history buffer.

From
Nigel Tamplin
Date:
Hi,

I have compiled postgres on a few different Linux boxes (all Red Hat
i386).

My question is regarding the psql program, on some of the machines
up/down cursor lets me scroll back and forth through the history buffer,
on other machines this luxury is gone and an up cursor results in.

template1=> select date('now');     date
----------
01-01-2000
(1 row)

template1=> ^[[A


Why is this?

Are there any libraries required by pgsql that maybe are present on some
machines and not others hence the different behaviour?

Thanks,

Nigel Tamplin.


Re: [HACKERS] psql history buffer.

From
Tom Lane
Date:
Nigel Tamplin <nigel@metica.com> writes:
> Are there any libraries required by pgsql that maybe are present on some
> machines and not others hence the different behaviour?

Precisely.  If the GNU readline library is not present when psql is
configured/built, you don't get history.

IIRC, some people have been burnt because they have installed
libreadline.a (or .so), but not readline.h.  You need both, or
configure will decide to omit the feature.
        regards, tom lane