Skip site navigation (1) Skip section navigation (2)

Re: psql & readline & win32

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Magnus Hagander <mha(at)sollentuna(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: psql & readline & win32
Date: 2006-01-01 23:51:37
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers

Magnus Hagander wrote:

>Considering we have a fix, I think we need to re-enable readline on win32, and document this. However, there are a couple of things to decide on first:
>1) Should it be made default? As it requires you to include this file to work, perhaps it should be set to non-default and specifically require a --with-readline? Also depends on th eanswers of a couple of questions below, I think.

Good work.

It should be the default - if we find readline we should use it. I guess 
that means the installer would need to ship the readline DLL, along with 
all the other third party DLLs it ships.

>2) Should we ship a file of standard bindings. We're not going to get it complete, but we could get some of the most common ones in europe at least (in sweden, this would for example include "\(at)£${[]}~|"). Which would help people a lot.

Yes we should, at least for Windows - put it in share along with other 
samples, maybe.

>3) How should the inputrc file be loaded. By default, you have to type SET INPUTRC="\some\where\inputrc" before you launch psql. But we could just as easily add:
>#if defined(WIN32) && defined(USE_READLINE)
>   rl_read_init_file(our_path_to_inputrc);
>to psql, making that step a whole lot easier. Especially for people who launch psql from the startmenu, and can't specify program-specific env vars.

if user has $HOME/inputrc
  load $HOME/inputrc
elsif exists $SYSTEMCONFIG/inputrc
  load $SYSTEMCONFIG/inputrc

Since inputrc is meant to service many applications, we shouldn't try to 
bypass that.



>4) Can we ship linked with readline in the installer? If not, can we ship a readline-linked binary at all, or just the source? Considering readline drags along the GPL, and not just the LGPL. (We can link either statically (default) or dynamically (separate package) to readline without problems, from what I can tell)

This has been debated ad nauseam in the past. The consensus, bar a few 
people with more advanced paranoia than I suffer from, is that we can ;-)



In response to


pgsql-hackers by date

Next:From: Bruce MomjianDate: 2006-01-02 00:55:15
Subject: Re: Checks for command string
Previous:From: Robert TreatDate: 2006-01-01 23:50:57
Subject: Re: Add a "Known Issues" section

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group