Figured it out (psql and Gnu readline) - Mailing list pgsql-general

From Erich
Subject Figured it out (psql and Gnu readline)
Date
Msg-id 200007122341.QAA16914@cyberpass.net
Whole thread Raw
In response to Re: psql and Gnu readline  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Figured it out (psql and Gnu readline)
List pgsql-general
With some helpful hints from various people, I figured out how to get
this to work, and now my life is more pleasant and meaningful.

Situation: Stock installation of OpenBSD 2.7, with PostgreSQL 7.0.2.
I installed postgres by downloading the source tar and compiling, not
by going through /usr/ports.

Anyway, I'm not sure if OpenBSD ships with readline or whatever, so I
downloaded the latest readline (4.1) and compiled and installed it.  I
then did ./configure in postgres, and recompiled psql, and it still
didn't have history.

Following some sugestions on this group, I figured out the problem.
First, there is no history.h with readline 4.1.  There's
readline/history.h.  So I modified Makefile.global to include that
file.  Also, I had to edit config.h, with several tweaks to various
defines.  I had to tell it that there is no history.h, but there is a
readline/history.h.  I had to put in that there is no history function
in libreadline, and it must also use libhistory.  Etc.

After doing all that, it worked beautifully.  I often have to do a
sequence of slighly varied inserts, etc, and this is much better.

Maybe for the next release, there should be better handling of gnu
readline 4.1?  Or maybe it should come with the package?  Just a
thought.

e


--
This message was my two cents worth.  Please deposit two cents into my
e-gold account by following this link:
http://rootworks.com/twocentsworth.cgi?102861
275A B627 1826 D627 ED35  B8DF 7DDE 4428 0F5C 4454

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Having a problem compiling plperl.
Next
From: Tom Lane
Date:
Subject: Re: Figured it out (psql and Gnu readline)