| От | 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
Re: log bind parameter values on error |
| Список | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера