Обсуждение: Odd cruft in .psql_history in HEAD
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: decibel@platter.1[20:32]~:5%tail -n 2 .psql_history \134df+\040tools.raise_exception \df+ tools.raise_exception decibel@platter.1[20:35]~:6% (last entry is from the 8.3 psql) -- Jim C. Nasby, Database Architect jim@nasby.net 512.569.9461 (cell) http://jim.nasby.net
Jim Nasby <decibel@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
On Jan 13, 2010, at 9:32 PM, Tom Lane wrote: > Jim Nasby <decibel@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@platter.1[18:05]~/pgsql/HEAD:9%port installed readline|grep active readline @6.0.000_2+darwin (active) decibel@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@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 backto this). -- Jim C. Nasby, Database Architect jim@nasby.net 512.569.9461 (cell) http://jim.nasby.net
Jim Nasby <decibel@decibel.org> writes: > On Jan 13, 2010, at 9:32 PM, Tom Lane wrote: >> Jim Nasby <decibel@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 aswell: >> >> 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