Re: Review: query result history in psql
От | ian link |
---|---|
Тема | Re: Review: query result history in psql |
Дата | |
Msg-id | CAOOwM5+KW2bktDr0e0Tm7uSkAEk3VDCGuF_tBNkm2pw7mFM1Yw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Review: query result history in psql (Pavel Stehule <pavel.stehule@gmail.com>) |
Ответы |
Re: Review: query result history in psql
|
Список | pgsql-hackers |
<div dir="ltr">No worries! :)</div><div class="gmail_extra"><br /><br /><div class="gmail_quote">On Fri, Jun 28, 2013 at12:20 AM, Pavel Stehule <span dir="ltr"><<a href="mailto:pavel.stehule@gmail.com" target="_blank">pavel.stehule@gmail.com</a>></span>wrote:<br /><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px#ccc solid;padding-left:1ex">Hello<br /><br /> It's look like my bug - wrong compilation<br /><br />I am sorry<br /><br /> Pavel<br /><br /> 2013/6/28 ian link <<a href="mailto:ian@ilink.io">ian@ilink.io</a>>:<br/><div class="HOEnZb"><div class="h5">> I just applied the patch toa clean branch from the latest master. I<br /> > couldn't get a segfault from using the new feature. Could you providea<br /> > little more info to reproduce the segfault? Thanks<br /> ><br /> ><br /> > On Thu, Jun 27, 2013at 11:28 PM, Pavel Stehule <<a href="mailto:pavel.stehule@gmail.com">pavel.stehule@gmail.com</a>><br /> > wrote:<br/> >><br /> >> Hello<br /> >><br /> >> after patching I god segfault<br /> >><br />>> Program terminated with signal 11, Segmentation fault.<br /> >> #0 0x0805aab4 in get_prompt (status=PROMPT_READY)at prompt.c:98<br /> >> 98 for (p = prompt_string;<br /> >> Missing separatedebuginfos, 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 0x0805786a in MainLoop (source=0xc45440) at mainloop.c:134<br /> >> #2 0x0805a68d inmain (argc=2, argv=0xbfcf2894) at startup.c:336<br /> >><br /> >> Regards<br /> >><br /> >> PavelStehule<br /> >><br /> >> 2013/6/28 ian link <<a href="mailto:ian@ilink.io">ian@ilink.io</a>>:<br/> >> >> It's better to post a review as a reply to the messagewhich contains<br /> >> >> the patch.<br /> >> ><br /> >> > Sorry about that, I didnot have the email in my inbox and couldn't<br /> >> > figure<br /> >> > out how to use the old messageID to send a reply. Here is the thread:<br /> >> ><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<br /> >> >>require<br /> >> >> by the COPY TEXT 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<br /> >> > in<br /> >>> my opinion.<br /> >> ><br /> >> >> Some mathematical toolkits, like Matlab or Mathematica,automatically<br /> >> >> set<br /> >> >> a variable called 'ans' (short for "answer")containing the result of<br /> >> >> the<br /> >> >> last operation. I was trying to emulateexactly this behaviour.<br /> >> ><br /> >> ><br /> >> > I've actually been using Matlablately, which must be why the name made<br /> >> > sense to me intuitively. I don't know if this is the bestname, however.<br /> >> > It<br /> >> > kind of assumes that our users use Matlab/Octave/Mathematica.Maybe<br /> >> > '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<br/> >> > actually<br /> >> > a very neat way of doing it. Sorry I did not realize that at first.<br/> >> ><br /> >> >> I was considering such a behaviour. But since the feature is turned off<br/> >> >> by<br /> >> >> default, I decided that whoever is using it, is aware of cost. Instead<br/> >> >> of<br /> >> >> truncating the history automatically (which could lead to a nasty<br/> >> >> surprise),<br /> >> >> I decided to equip the user with \ansclean , a command erasingthe<br /> >> >> history.<br /> >> >> I believe that it is better to let the user decide whenhistory should<br /> >> >> 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<br/> >> > (at<br /> >> > some point in the future) the discussion should probably be re-visited.<br/> >> ><br /> >> >> This is my first submitted patch, so I can't really comment on the<br/> >> >> process. But if you could add the author's email to CC, the message<br /> >> >> wouldbe<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<br /> >> >> scan<br /> >>>> the list more carefully...<br /> >> ><br /> >> > My fault, I definitely should have CC'dyou.<br /> >> ><br /> >> > As for the patch, I made a new version of the latest one you provided in<br/> >> > the<br /> >> > original thread. Let me know if anything breaks, but it compiles fine on<br/> >> > my<br /> >> > box. Thanks for the feedback!<br /> >> ><br /> >> > Ian<br/> >> ><br /> >> ><br /> >> > --<br /> >> > Sent via pgsql-hackers mailing list(<a href="mailto:pgsql-hackers@postgresql.org">pgsql-hackers@postgresql.org</a>)<br /> >> > To make changesto your subscription:<br /> >> > <a href="http://www.postgresql.org/mailpref/pgsql-hackers" target="_blank">http://www.postgresql.org/mailpref/pgsql-hackers</a><br/> >> ><br /> ><br /> ><br /></div></div></blockquote></div><br/></div>
В списке pgsql-hackers по дате отправления: