Re: Poorly-thought-out handling of double variables in pgbench

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: PostgreSQL Developers <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: Poorly-thought-out handling of double variables in pgbench
Date: 2016-05-05 21:45:02
Message-ID: 15599.1462484702@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> writes:
>> A better answer, perhaps, would be to store double-valued variables in
>> double format to begin with, coercing to text only when and if the value
>> is interpolated into a string.

> Yep, but that was yet more changes for a limited benefit and would have
> increase the probability that the patch would have been rejected.

>> 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?

regards, tom lane

Attachment Content-Type Size
pgbench-real-numeric-variables.patch text/x-diff 15.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gavin Flower 2016-05-05 21:46:42 Re: Naming of new tsvector functions
Previous Message Greg Stark 2016-05-05 21:42:37 Re: Is pg_control file crashsafe?