Re: 7.0 psql, readline and history. - Mailing list pgsql-general

From Jeffery Collins
Subject Re: 7.0 psql, readline and history.
Date
Msg-id 392291A7.BFE6127B@onyx-technologies.com
Whole thread Raw
In response to 7.0 psql, readline and history.  (Jeffery Collins <collins@onyx-technologies.com>)
Responses Re: 7.0 psql, readline and history.
List pgsql-general
Peter Eisentraut wrote:

> On Tue, 16 May 2000, Jeffery Collins wrote:
>
> > It *appears* to me that 7.0 requires readline version 4.1 in order for
> > the readline history features to work, whereas 6.5.3 was happy with an
> > earlier version.
>
> That can't be it because I run something at or near 2.5 and it works fine.

Wanna' bet? Perhaps I had an even older version?  I do know that updating my
version "fixed" the problem.

>
>
> Readline support is enabled if all of the following are true:
>
> 1) #include <readline.h> or #include <readline/readline.h> works.
>
> 2) libreadline.a can be linked against.
>
> Now to history. History is enabled if and only if the following are true:
>
> 1) #include <history.h> or #include <readline/history.h> works.
>
> Failure modes: see above
>
> Check: HAVE_HISTORY_H or HAVE_READLINE_HISTORY_H
>
> 2) One of the following is true (checked in that order):
>
> a) the function "using_history" is defined in libreadline
>
> b) libhistory.a can be linked against
>

The problem, as I attempted to explain in my original message [but must have
failed :-(], is not with readline, but with readline's history features.

Using your check list, the failure was because it couldn't find history.h
(either one).  I am not certain which version of readline I had installed,
but evidently it didn't contain a history.h file, although it did have a
"using_history" entry point in libreadline.a.  The previous version of
postgresql must have had slightly different rules to determine whether or not
to support readline w/ history because it worked in that version.

When I installed the latest version (4.1.1)of readline, which contains a
readline/history.h file, history started working.

I don't know alot about the readline library, but perhaps it would be
sufficient to check for the presence of "using_history" in the library and
not bother to check for the presence of history.h?

Jeff



pgsql-general by date:

Previous
From: Jeffery Collins
Date:
Subject: Re: 7.0 psql, readline and history.
Next
From: Richard J Kuhns
Date:
Subject: Re: Question about databases in alternate locations...