Re: psql lacking clearerr()

Поиск
Список
Период
Сортировка
От Kyotaro Horiguchi
Тема Re: psql lacking clearerr()
Дата
Msg-id 20210325.153110.1482787543470546391.horikyota.ntt@gmail.com
обсуждение исходный текст
Ответ на psql lacking clearerr()  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Ответы Re: psql lacking clearerr()  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-hackers
At Wed, 24 Mar 2021 11:11:41 -0300, Alvaro Herrera <alvherre@alvh.no-ip.org> wrote in 
> psql seems to never call clearerr() on its output file.  So if it gets
> an error while printing a result, it'll show
> 
> could not print result table: Success
> 
> after each and every result, even though the output file isn't in error
> state anymore.
> 
> It seems that the simplest fix is just to do clearerr() at the start of
> printTable(), as in the attached.
> 
> I haven't been able to find a good reproducer.  Sometimes doing C-s C-c
> does it, but I'm not sure it is fully reproducible.

That worked for me:p  And the following steps always raises that error.

postgres=# select 1; (just to let it into history).
postgres=# C-s -> C-p -> C-m -> C-c
postgres=# select 1;
...
could not print result table: Success

And actually the patch works and the location looks like appropriate.

By the way, I think errno is not set when f* functions fail so anyway
isn't %m in the messages is useless?

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



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

Предыдущее
От: Masahiko Sawada
Дата:
Сообщение: Re: Replication slot stats misgivings
Следующее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: [CLOBBER_CACHE]Server crashed with segfault 11 while executing clusterdb