Re: Windows v readline

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Windows v readline
Дата
Msg-id d68ab455-ecbe-e90a-014f-c6a872575b8a@2ndquadrant.com
обсуждение исходный текст
Ответ на Windows v readline  (Andrew Dunstan <andrew.dunstan@2ndquadrant.com>)
Ответы Re: Windows v readline  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Justin Pryzby
Дата:
Сообщение: comment regarding double timestamps; and, infinite timestamps and NaN
Следующее
От: Dilip Kumar
Дата:
Сообщение: Re: PATCH: logical_work_mem and logical streaming of largein-progress transactions