Re: Windows v readline

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: 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 13:28:09
Message-ID: 30337.1577712489@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> writes:
> On 2019-09-29 22:55, Andrew Dunstan wrote:
>> 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.

What do you mean by "patching those out" --- you removed all of
tab-complete's external variable assignments? That would certainly
disable tab completion, at a minimum.

> 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.

I wonder if readline was confused about the terminal type, or if it
decided that the input file was not-a-tty for some reason.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-12-30 14:05:24 Re: comment regarding double timestamps; and, infinite timestamps and NaN
Previous Message Tomas Vondra 2019-12-30 13:16:07 Re: [HACKERS] Block level parallel vacuum