Re: Review: query result history in psql

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: Review: query result history in psql
Дата
Msg-id CAFj8pRDfMsW5qnzFitbO3Kw3n4gDkxYP9u72o4ihAUm8LT++dw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Review: query result history in psql  (ian link <ian@ilink.io>)
Ответы Re: Review: query result history in psql  (ian link <ian@ilink.io>)
Список pgsql-hackers
Hello

after patching I god segfault

Program terminated with signal 11, Segmentation fault.
#0  0x0805aab4 in get_prompt (status=PROMPT_READY) at prompt.c:98
98        for (p = prompt_string;
Missing separate debuginfos, use: debuginfo-install glibc-2.13-2.i686
ncurses-libs-5.7-9.20100703.fc14.i686 readline-6.1-2.fc14.i386
(gdb) bt
#0  0x0805aab4 in get_prompt (status=PROMPT_READY) at prompt.c:98
#1  0x0805786a in MainLoop (source=0xc45440) at mainloop.c:134
#2  0x0805a68d in main (argc=2, argv=0xbfcf2894) at startup.c:336

Regards

Pavel Stehule

2013/6/28 ian link <ian@ilink.io>:
>> It's better to post a review as a reply to the message which contains
>> the patch.
>
> Sorry about that, I did not have the email in my inbox and couldn't figure
> out how to use the old message ID to send a reply. Here is the thread:
>
http://www.postgresql.org/message-id/flat/CAEcSYXJRi++T3pevDyzAWH2yGx7kG9ZrhX8KAWtP1fXV3H02vw@mail.gmail.com#CAEcSYXJRi++T3pevDyzAWH2yGx7kG9ZrhX8KAWtP1fXV3H02vw@mail.gmail.com
>
>> The 'EscapeForCopy' was meant to mean 'Escape string in a format require
>> by the COPY TEXT format', so 'copy' in the name refers to the escaping
>> format, not the action performed by the function.
>
>
> I see, that makes sense now. Keep it as you see fit, it's not a big deal in
> my opinion.
>
>>  Some mathematical toolkits, like Matlab or Mathematica, automatically set
>> a variable called 'ans' (short for "answer") containing the result of the
>> last operation. I was trying to emulate exactly this behaviour.
>
>
> I've actually been using Matlab lately, which must be why the name made
> sense to me intuitively. I don't know if this is the best name, however. It
> kind of assumes that our users use Matlab/Octave/Mathematica. Maybe 'qhist'
> or 'hist' or something?
>
>> The history is not erased. The history is always stored in the client's
>> memory.
>
> Ah, I did not pick up on that. Thank you for explaining it! That's actually
> a very neat way of doing it. Sorry I did not realize that at first.
>
>> I was considering such a behaviour. But since the feature is turned off by
>> default, I decided that whoever is using it, is aware of cost. Instead of
>> truncating the history automatically (which could lead to a nasty surprise),
>> I decided to equip the user with \ansclean , a command erasing the history.
>> I believe that it is better to let the user decide when history should be
>> erased, instead of doing it automatically.
>
>
> I think you are correct. However, if we turn on the feature by default (at
> some point in the future) the discussion should probably be re-visited.
>
>> This is  my first submitted patch, so I can't really comment on the
>> process. But if you could add the author's email to CC, the message would be
>> much easier to spot. I replied after two days only because I missed the
>> message in the flood of other pgsql-hacker messages. I think I need to scan
>> the list more carefully...
>
> My fault, I definitely should have CC'd you.
>
> As for the patch, I made a new version of the latest one you provided in the
> original thread. Let me know if anything breaks, but it compiles fine on my
> box. Thanks for the feedback!
>
> Ian
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>



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

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