Re: log bind parameter values on error

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: log bind parameter values on error
Дата
Msg-id 20190918205853.GA21408@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: log bind parameter values on error  (Alexey Bashtanov <bashtanov@imap.cc>)
Ответы Re: log bind parameter values on error  (Andres Freund <andres@anarazel.de>)
Re: log bind parameter values on error  (Alexey Bashtanov <bashtanov@imap.cc>)
Список pgsql-hackers
Nice patch, thanks.

I didn't like abusing testlibpq3.c for your new stuff, so I moved it off
to a new file testlibpq5.c.  I cleaned up a few other cosmetics things
about this -- v10 attached.  I eventually noticed that this patch fails
to initialize each param's textValue to NULL, which probably explains
why you have to be so careful about only setting hasTextValues after the
whole loop.  That seems a bit too trusting; I think it would be better
to set all these to NULL in makeParamList instead of leaving the memory
undefined.  One way would be to have a for() look in makeParamList that
nullifies the member; another would be to use palloc0().

A third possibility is to inspect each caller of makeParamList and have
them all set textValue to NULL to each parameter.

I'm marking this waiting on author.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Вложения

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

Предыдущее
От: Nikolay Shaplov
Дата:
Сообщение: Re: [PATCH] src/test/modules/dummy_index -- way to test reloptions from inside of access method
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Define jsonpath functions as stable