psql + libedit command history truncation (was: psql history vs. dearmor (pgcrypto))
От | Josh Kupershmidt |
---|---|
Тема | psql + libedit command history truncation (was: psql history vs. dearmor (pgcrypto)) |
Дата | |
Msg-id | CAK3UJRGJSGOPDkwhkvQfcUnxZEoK5N3sizau0Ls4YwryyOfyJw@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: psql + libedit command history truncation (was: psql history vs.
dearmor (pgcrypto))
|
Список | pgsql-hackers |
On Mon, Nov 14, 2011 at 1:01 PM, Robert Haas <robertmhaas@gmail.com> wrote: > It looks like the problem is that the original has a blank line after > the line that says "Version: GnuPG v2.0.17 (GNU/Linux)", but when you > recall it from the query buffer, that extra blank line gets elided. > > The attached patch fixes it for me. I'm a little worried it might > cause a problem in some case I'm not thinking about, but I can't think > of any such case right this minute. (FYI, the patch does seem to fix the problem Tomas was complaining about.) But it reminded me of another issue. With OS X 10.6.8, and otool -L reporting that psql depends on libedit version 2.11.0, the up-arrow recall of Tomas' query gets truncated around here: 5I0/NTm+fFkB0McY9E2fAA [rest of the line missing] i.e. it's keeping roughly 1021 characters. I was about to just chalk that up to some limit in libedit's readline() implementation, but I can see in my ~/.psql_history file that the entire query is logged. Plus \e recalls the full query correctly. And if I up-arrow to recall the query, then do anything to modify that recalled query (such as typing a few characters at the end, then moving back or forth through the history), then subsequent recalls of the query work fine. So I'm not sure if this is a bug purely in libedit, or if there's something amiss in psql. I saw a possibly-related complaint about psql+libedit on Debian[1]. Anyone have a better guess about what's going on? Josh [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=603922
В списке pgsql-hackers по дате отправления: