Re: Review: query result history in psql

Поиск
Список
Период
Сортировка
От ian link
Тема Re: Review: query result history in psql
Дата
Msg-id CAOOwM5L3hA1vU0k6uiZoe647hiSvw6tBx=70o64TTuHHVX1Gog@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Review: query result history in psql  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: Review: query result history in psql  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
<div dir="ltr">I just applied the patch to a clean branch from the latest master. I couldn't get a segfault from using
thenew feature. Could you provide a little more info to reproduce the segfault? Thanks</div><div
class="gmail_extra"><br/><br /><div class="gmail_quote">On Thu, Jun 27, 2013 at 11:28 PM, Pavel Stehule <span
dir="ltr"><<ahref="mailto:pavel.stehule@gmail.com" target="_blank">pavel.stehule@gmail.com</a>></span> wrote:<br
/><blockquoteclass="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> Hello<br /><br
/>after patching I god segfault<br /><br /> Program terminated with signal 11, Segmentation fault.<br /> #0  0x0805aab4
inget_prompt (status=PROMPT_READY) at prompt.c:98<br /> 98              for (p = prompt_string;<br /> Missing separate
debuginfos,use: debuginfo-install glibc-2.13-2.i686<br /> ncurses-libs-5.7-9.20100703.fc14.i686
readline-6.1-2.fc14.i386<br/> (gdb) bt<br /> #0  0x0805aab4 in get_prompt (status=PROMPT_READY) at prompt.c:98<br /> #1
 0x0805786ain MainLoop (source=0xc45440) at mainloop.c:134<br /> #2  0x0805a68d in main (argc=2, argv=0xbfcf2894) at
startup.c:336<br/><br /> Regards<br /><br /> Pavel Stehule<br /><br /> 2013/6/28 ian link <<a
href="mailto:ian@ilink.io">ian@ilink.io</a>>:<br/><div class="HOEnZb"><div class="h5">>> It's better to post a
reviewas a reply to the message which contains<br /> >> the patch.<br /> ><br /> > Sorry about that, I did
nothave the email in my inbox and couldn't figure<br /> > out how to use the old message ID to send a reply. Here is
thethread:<br /> > <a
href="http://www.postgresql.org/message-id/flat/CAEcSYXJRi++T3pevDyzAWH2yGx7kG9ZrhX8KAWtP1fXV3H02vw@mail.gmail.com#CAEcSYXJRi++T3pevDyzAWH2yGx7kG9ZrhX8KAWtP1fXV3H02vw@mail.gmail.com"
target="_blank">http://www.postgresql.org/message-id/flat/CAEcSYXJRi++T3pevDyzAWH2yGx7kG9ZrhX8KAWtP1fXV3H02vw@mail.gmail.com#CAEcSYXJRi++T3pevDyzAWH2yGx7kG9ZrhX8KAWtP1fXV3H02vw@mail.gmail.com</a><br
/>><br /> >> The 'EscapeForCopy' was meant to mean 'Escape string in a format require<br /> >> by the
COPYTEXT format', so 'copy' in the name refers to the escaping<br /> >> format, not the action performed by the
function.<br/> ><br /> ><br /> > I see, that makes sense now. Keep it as you see fit, it's not a big deal
in<br/> > my opinion.<br /> ><br /> >>  Some mathematical toolkits, like Matlab or Mathematica,
automaticallyset<br /> >> a variable called 'ans' (short for "answer") containing the result of the<br />
>>last operation. I was trying to emulate exactly this behaviour.<br /> ><br /> ><br /> > I've actually
beenusing Matlab lately, which must be why the name made<br /> > sense to me intuitively. I don't know if this is
thebest name, however. It<br /> > kind of assumes that our users use Matlab/Octave/Mathematica. Maybe 'qhist'<br />
>or 'hist' or something?<br /> ><br /> >> The history is not erased. The history is always stored in the
client's<br/> >> memory.<br /> ><br /> > Ah, I did not pick up on that. Thank you for explaining it! That's
actually<br/> > a very neat way of doing it. Sorry I did not realize that at first.<br /> ><br /> >> I was
consideringsuch a behaviour. But since the feature is turned off by<br /> >> default, I decided that whoever is
usingit, is aware of cost. Instead of<br /> >> truncating the history automatically (which could lead to a nasty
surprise),<br/> >> I decided to equip the user with \ansclean , a command erasing the history.<br /> >> I
believethat it is better to let the user decide when history should be<br /> >> erased, instead of doing it
automatically.<br/> ><br /> ><br /> > I think you are correct. However, if we turn on the feature by default
(at<br/> > some point in the future) the discussion should probably be re-visited.<br /> ><br /> >> This is
 myfirst submitted patch, so I can't really comment on the<br /> >> process. But if you could add the author's
emailto CC, the message would be<br /> >> much easier to spot. I replied after two days only because I missed
the<br/> >> message in the flood of other pgsql-hacker messages. I think I need to scan<br /> >> the list
morecarefully...<br /> ><br /> > My fault, I definitely should have CC'd you.<br /> ><br /> > As for the
patch,I made a new version of the latest one you provided in the<br /> > original thread. Let me know if anything
breaks,but it compiles fine on my<br /> > box. Thanks for the feedback!<br /> ><br /> > Ian<br /> ><br />
><br/></div></div><span class="HOEnZb"><font color="#888888">> --<br /> > Sent via pgsql-hackers mailing list
(<ahref="mailto:pgsql-hackers@postgresql.org">pgsql-hackers@postgresql.org</a>)<br /> > To make changes to your
subscription:<br/> > <a href="http://www.postgresql.org/mailpref/pgsql-hackers"
target="_blank">http://www.postgresql.org/mailpref/pgsql-hackers</a><br/> ><br
/></font></span></blockquote></div><br/></div> 

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: Review: query result history in psql
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: Review: query result history in psql