Re: Odd cruft in .psql_history in HEAD

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jim Nasby <decibel(at)decibel(dot)org>
Cc: "pgsql-hackers(at)postgresql(dot)org Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Odd cruft in .psql_history in HEAD
Date: 2010-02-11 02:47:15
Message-ID: 27703.1265856435@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jim Nasby <decibel(at)decibel(dot)org> writes:
> On Jan 13, 2010, at 9:32 PM, Tom Lane wrote:
>> Jim Nasby <decibel(at)decibel(dot)org> writes:
>>> I noticed odd stuff showing up when I fired up an 8.3 psql after using psql in HEAD. It shows up in .psql_history as well:
>>
>> Platform? readline version?

> This is on snow leopard. FWIW it's still doing it with today's HEAD.

Oh. On OSX the regular readline (really libedit) library likes to put
strange stuff into history files --- it turns spaces, backslashes,
and I don't know what else into backslash-octal escape sequences.
It manages to reverse the transformation just fine on read though.

What it looks like to me is that you've started linking psql with
some other version of readline that doesn't follow that convention,
and accordingly shows you strange things from the history file.
When/if you go back to libedit, it likely won't like the history
entries the other library made.

Short answer: stick to one readline library.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-02-11 03:02:12 Re: [PATCH] Output configuration status after ./configure run.
Previous Message Andres Freund 2010-02-11 02:27:30 Re: [HACKERS] Re: Faster CREATE DATABASE by delaying fsync (was 8.4.1 ubuntu karmic slow createdb)