From: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
---|---|
To: | Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Windows v readline |
Date: | 2019-12-30 09:08:47 |
Message-ID: | d68ab455-ecbe-e90a-014f-c6a872575b8a@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2019-09-29 22:55, Andrew Dunstan wrote:
>
> The configure code currently has this:
>
>
> # readline on MinGW has problems with backslashes in psql and other bugs.
> # This is particularly a problem with non-US code pages.
> # Therefore disable its use until we understand the cause. 2004-07-20
> if test "$PORTNAME" = "win32"; then
> if test "$with_readline" = yes; then
> AC_MSG_WARN([*** Readline does not work on MinGW --- disabling])
> with_readline=no
> fi
> fi
>
>
> 2004 is a very long time ago. Has anyone looked at this more recently?
> It would certainly be nice to have readline-enabled psql on Windows if
> possible.
I tried this out. First, it doesn't build, because readline doesn't do
the dllimport/dllexport dance on global variables, so all references to
rl_* global variables in tab-complete.c fail (similar to [0]). After
patching those out, it builds, but it doesn't work. It doesn't print a
prompt, keys don't do anything sensible. I can enter SQL commands and
get results back, but the readline part doesn't do anything sensible AFAICT.
Perhaps I did something wrong. You can still use readline without
global variables, but it seems like a serious restriction and makes me
wonder whether this has actually ever been used before. It's curious
that MSYS2 ships a readline build for mingw. Is there other software
that uses it on Windows?
[0]:
https://www.postgresql.org/message-id/001101c3eb6a$3b275500$f800a8c0@kuczek.pl
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Dilip Kumar | 2019-12-30 09:40:47 | Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions |
Previous Message | Justin Pryzby | 2019-12-30 07:47:21 | comment regarding double timestamps; and, infinite timestamps and NaN |