no history in psql on OpenBSD

From: "Denis A(dot) Doroshenko" <d(dot)doroshenko(at)omnitel(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: no history in psql on OpenBSD
Date: 2000-11-15 15:32:16
Message-ID: 20001115173216.P26746@comrade.omnitel.lan
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

hello,

i use PostgreSQL on OpenBSD (various systems, including 2.5-2.8 beta)
and like it much. one thing, i have to make hand changes to source
(namely to src/bin/psql/input.h) to make _existing in system_ readline's
history working... the point is that for OpenBSD autconf finds and
defines HAVE_READLINE_READLINE_H and HAVE_LIBREADLINE and
HAVE_HISTORY_IN_READLINE, but there's no history.h in the system, thus
HAVE_READLINE_HISTORY_H nor HAVE_HISTORY_H aren't defined. So,
USE_HISTORY doesn't gets defined. Wouldn't it be good to patch the
input.h with something like:

--- input.h.orig Wed Nov 15 17:24:15 2000
+++ input.h Wed Nov 15 17:25:28 2000
@@ -27,11 +27,10 @@
#if defined(HAVE_LIBHISTORY) || (defined(HAVE_LIBREADLINE) && defined(HAVE_HISTORY_IN_READLINE))
#if defined(HAVE_READLINE_HISTORY_H)
#include <readline/history.h>
-#define USE_HISTORY 1
#elif defined(HAVE_HISTORY_H)
#include <history.h>
-#define USE_HISTORY 1
#endif
+#define USE_HISTORY 1
#endif

char *gets_interactive(char *prompt);

works fine for me... and seems to be logical :-)

--
Denis A. Doroshenko -- VAS/IN group engineer .-. _|_ |
[Omnitel Ltd., T.Sevcenkos st. 25, Vilnius, Lithuania] | | _ _ _ .| _ |
[Phone: +370 9863207 E-mail: d(dot)doroshenko(at)omnitel(dot)net] |_|| | || |||(/_|_

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Eckermann 2000-11-15 16:11:39 String substitution with "translate" function
Previous Message mlw 2000-11-15 14:05:19 Re: [HACKERS] Re: PHPBuilder article -- Postgres vs MySQL