Re: [HACKERS] pgbench - allow to store select results into variables - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: [HACKERS] pgbench - allow to store select results into variables
Date
Msg-id 20181116223611.4rfeofjxbkou75yx@alvherre.pgsql
Whole thread Raw
In response to Re: [HACKERS] pgbench - allow to store select results intovariables  (Fabien COELHO <coelho@cri.ensmp.fr>)
Responses Re: [HACKERS] pgbench - allow to store select results intovariables  (Fabien COELHO <coelho@cri.ensmp.fr>)
List pgsql-hackers
I think this patch's Command->lines would benefit from using PQExpBuffer
(or maybe StringInfo?) for the command string instead of open-coding
string manipulation and allocation.

I'm not sure that Command->first_line is really all that useful.  It
seems we go to a lot of trouble to keep it up to date.  Isn't it easier
to chop Command->lines at the first newline when it is needed?

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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #15449: file_fdw using program cause exit code error when using LIMIT
Next
From: Thomas Munro
Date:
Subject: Re: Refactoring the checkpointer's fsync request queue