From: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL Developers <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | Re: Poorly-thought-out handling of double variables in pgbench |
Date: | 2016-05-06 07:14:01 |
Message-ID: | alpine.DEB.2.10.1605060842120.30701@sto |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hello Tom,
>>> That's probably a bigger change than we want to be putting in right now,
>>> though I'm a bit tempted to go try it.
>
>> I definitely agree that the text variable solution is pretty ugly, but it
>> was the minimum change solution, and I do not have much time available.
>
> Well, I felt like doing some minor hacking, so I went and adjusted the
> code to work this way. I'm pretty happy with the result, what do you
> think?
This is a definite improvement.
I like the lazyness between string & numeric forms, and for sorting, that
is what was needed doing to have something clean.
Applied on head, it works for me.
While testing the patch I found a minor preexisting (mine...) bug: when
string-scanning doubles, whether the whole string is consumed or not is
not checked. This means that -D x=0one is interpreted as double 0.
I came up with the attached check, but maybe there is a cleaner way to do
that.
--
Fabien.
Attachment | Content-Type | Size |
---|---|---|
pgbench-scan-double.patch | text/x-diff | 520 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Langote | 2016-05-06 07:26:35 | Comment typo in _readExtensibleNode() |
Previous Message | Jeff Janes | 2016-05-06 06:51:42 | Re: Initial release notes created for 9.6 |