"Peter Kovacs" <[EMAIL PROTECTED]> writes:
> Gosh, it is working now -- now that I am connected to my local
> postgresql instance. I assume psql's behavior doesn't depend on the
> version/location/readline-support of backend, correct?

I just found that psql on my Fedora machine ignores ~/.inputrc,
just like you said.  Some poking around turned up the reason;

$ env | grep -i inp
INPUTRC=/etc/inputrc

Per the readline manual:

        Any user can customize programs that use Readline by
        putting commands in an "inputrc" file, conventionally in his home
        directory.  The name of this file is taken from the value of the
        environment variable `INPUTRC'.  If that variable is unset, the default
        is `~/.inputrc'.  If that file does not exist or cannot be read, the
        ultimate default is `/etc/inputrc'.

Further poking found this in /etc/profile:

if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
    INPUTRC=/etc/inputrc
fi

So the answer seems to be that if you create an ~/.inputrc that wasn't
there before, it won't work till you start a new shell, at least if
you've got a system that presets INPUTRC for you like this.

I find this pretty stupid, actually, since per the manual readline
can fall back to /etc/inputrc all by itself; all the /etc/profile code
is accomplishing is to screw up this corner case.  Off to file something
in bugzilla.

                        regards, tom lane

-- 
Sent via pgsql-admin mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Reply via email to