From: Tom Lane on
Jim Nasby <decibel(a)decibel.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?

regards, tom lane

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

From: Jim Nasby on
On Jan 13, 2010, at 9:32 PM, Tom Lane wrote:
> Jim Nasby <decibel(a)decibel.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.

decibel(a)platter.1[18:05]~/pgsql/HEAD:9%port installed readline|grep active
readline @6.0.000_2+darwin (active)
decibel(a)platter.1[18:05]~/pgsql/HEAD:10%uname -a
Darwin platter 10.2.0 Darwin Kernel Version 10.2.0: Tue Nov 3 10:37:10 PST 2009; root:xnu-1486.2.11~1/RELEASE_I386 i386
decibel(a)platter.1[18:05]~/pgsql/HEAD:11%

(Original thread is at http://archives.postgresql.org/pgsql-hackers/2010-01/msg01414.php; sorry it took so long to get back to this).
--
Jim C. Nasby, Database Architect jim(a)nasby.net
512.569.9461 (cell) http://jim.nasby.net



--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

From: Tom Lane on
Jim Nasby <decibel(a)decibel.org> writes:
> On Jan 13, 2010, at 9:32 PM, Tom Lane wrote:
>> Jim Nasby <decibel(a)decibel.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

--
Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers