Re: [GENERAL] pgbench not setting scale size correctly? - Mailing list pgsql-patches

From Tom Lane
Subject Re: [GENERAL] pgbench not setting scale size correctly?
Date
Msg-id 13891.1210344515@sss.pgh.pa.us
Whole thread Raw
In response to Re: [GENERAL] pgbench not setting scale size correctly?  (Greg Smith <gsmith@gregsmith.com>)
List pgsql-patches
Greg Smith <gsmith@gregsmith.com> writes:
> Turns out it wasn't so contorted.  Updated patch attached that only warns
> in the exact cases where the setting is ignored, and the warning says how
> it's actually setting the scale.

It looks like the code could do with some refactoring.  AFAICS
scale is stored into all the :scale variables at lines 1671-1691
(although not if you only have one client !?) only to be done over
again at lines 1746-1763 (though not if ttype != 3).  Wasteful,
confusing, and there's a case where it fails to be done at all.
Sigh ...

            regards, tom lane

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] [NOVICE] encoding problems
Next
From: Simon Riggs
Date:
Subject: Re: Verified fix for Bug 4137