2009/8/4 Tom Lane <tgl@sss.pgh.pa.us>:
> BTW, there's no rule saying you have to fix that strictly within
> to_char(). It might make more sense to have numeric.c export a
> function that is like numeric_out but produces e-style output.
> Your choice as the patch writer, but keep it in mind ...
>
Ah, thanks for the suggestion. I think you're right, numeric.c would
be a nice place for this code. Going directly from the guts of a
NumericVar to a scientific notation seems more elegant than performing
cut-and-paste style surgery on the string from numeric_out().
It does require a bit more effort and headspace than I was expecting.
I'm still keen to do it, but my "next day or so" timeframe may not be
so realistic. It's looking more like "by the end of the week".
Cheers,
BJ