Re: extend pgbench expressions with functions

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: extend pgbench expressions with functions
Дата
Msg-id CA+TgmoaiWPQrGnRCAWmQvd9rKr_j9vZ9BF6b3Cre76FYotdV3Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: extend pgbench expressions with functions  (Fabien COELHO <coelho@cri.ensmp.fr>)
Ответы Re: extend pgbench expressions with functions  (Fabien COELHO <coelho@cri.ensmp.fr>)
Список pgsql-hackers
On Wed, Mar 9, 2016 at 3:09 AM, Fabien COELHO <coelho@cri.ensmp.fr> wrote:
> I'm not sure what is "not acceptable" as it "totally breaks the error
> handling" in the above code.
>
> I assumed that you want to check that sscanf can read what sprintf generated
> when handling "\set". I'd guess that libc would be broken if it was the
> case. I've made pgbench check that it is not.

If the variable contains something that is not an integer, the
existing code will end up here:

fprintf(stderr, "invalid input syntax for integer: \"%s\"\n", str);

With your patch, you get different behavior depending on exactly how
the input is malformed.  I have a strong suspicion you're going to
tell me that this is another one of those cases where it's OK to make
the error handling worse than it is today, but I'm tired of arguing
that point.  I'm not going to commit it this way, and frankly, neither
is anyone else.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: multivariate statistics v14
Следующее
От: Gilles Darold
Дата:
Сообщение: Patch to implement pg_current_logfile() function