Re: [HACKERS] The number of character limitation of custom script on pgbench

2013-11-15 Thread Sawada Masahiko
On Wed, Nov 13, 2013 at 10:27 PM, Tom Lane t...@sss.pgh.pa.us wrote: Peter Eisentraut pete...@gmx.net writes: On 11/13/13, 6:18 AM, Sawada Masahiko wrote: The function of custom script of pgbench allows only BUFSIZ (i.g.,1024byte) or less as length of a SQL. So I'm thinking following

Re: [HACKERS] The number of character limitation of custom script on pgbench

2013-11-15 Thread Alvaro Herrera
Sawada Masahiko escribió: Yes, I also think #2 is good. I will implement the patch. I remember this was recently discussed in the spanish list. Please see this email: http://archives.postgresql.org/message-id/48589.192.168.207.54.1382570043.squir...@webmail.etecsa.cu -- Álvaro Herrera

Re: [HACKERS] The number of character limitation of custom script on pgbench

2013-11-15 Thread Tom Lane
Sawada Masahiko sawada.m...@gmail.com writes: I attached the patch which solves this problem, and have submitted to CF3. I changed how to get the SQL from custom script file. This needed a bit of work: - Use of strncat didn't seem particularly safe, or efficient. I changed it to explicitly

[HACKERS] The number of character limitation of custom script on pgbench

2013-11-13 Thread Sawada Masahiko
Hi all, The function of custom script of pgbench allows only BUFSIZ (i.g.,1024byte) or less as length of a SQL. I think that when we want to bench mark with long SQL then it will difficult. At that time even pgbench doesn't return ERROR. It will try to do query with the broken SQL. And user can

Re: [HACKERS] The number of character limitation of custom script on pgbench

2013-11-13 Thread Peter Eisentraut
On 11/13/13, 6:18 AM, Sawada Masahiko wrote: Hi all, The function of custom script of pgbench allows only BUFSIZ (i.g.,1024byte) or less as length of a SQL. I think that when we want to bench mark with long SQL then it will difficult. At that time even pgbench doesn't return ERROR. It

Re: [HACKERS] The number of character limitation of custom script on pgbench

2013-11-13 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: On 11/13/13, 6:18 AM, Sawada Masahiko wrote: The function of custom script of pgbench allows only BUFSIZ (i.g.,1024byte) or less as length of a SQL. So I'm thinking following solution. (1) to increase buffer size (2) to change to variable buffer size

Re: [HACKERS] The number of character limitation of custom script on pgbench

2013-11-13 Thread Sawada Masahiko
On Wed, Nov 13, 2013 at 10:27 PM, Tom Lane t...@sss.pgh.pa.us wrote: Peter Eisentraut pete...@gmx.net writes: On 11/13/13, 6:18 AM, Sawada Masahiko wrote: The function of custom script of pgbench allows only BUFSIZ (i.g.,1024byte) or less as length of a SQL. So I'm thinking following