Re: [HACKERS] pgbench - allow to store select results into variables
Вложения
В списке pgsql-hackers по дате отправления:
| От | Alvaro Herrera |
|---|---|
| Тема | Re: [HACKERS] pgbench - allow to store select results into variables |
| Дата | |
| Msg-id | 201901092300.lmmnu2abxmuq@alvherre.pgsql обсуждение |
| Ответ на | Re: [HACKERS] pgbench - allow to store select results intovariables (Fabien COELHO <coelho@cri.ensmp.fr>) |
| Ответы |
Re: [HACKERS] pgbench - allow to store select results intovariables
|
| Список | pgsql-hackers |
Here are my proposed final changes. I noticed that you were allocating the prefixes for all cases even when there were no cset/gset in the command; I changed it to delay the allocation until needed. I also noticed you were skipping the Meta enum dance for no good reason; added that makes conditionals simpler. The read_response routine seemed misplaced and I gave it a name in a style closer to the rest of the pgbench code. Also, you were missing to free the ->lines pqexpbuffer when the command is discarded. I grant that the free_command() stuff might be bogus since it's only tested with a command that's barely initialized, but it seems better to make it bogus in this way (fixable if we ever extend its use) than to forever leak memory silently. I didn't test this beyond running "make check". -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера