Re: 7.0 psql, readline and history.

From: Jeffery Collins <collins(at)onyx-technologies(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: 7.0 psql, readline and history.
Date: 2000-05-17 12:33:43
Message-ID: 392291A7.BFE6127B@onyx-technologies.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard J Kuhns 2000-05-17 13:50:27 Re: Question about databases in alternate locations...
Previous Message Dragos Stoichita 2000-05-17 12:33:34 Re: Am I really stupid???