Karel Zak <zakkr(at)zf(dot)jcu(dot)cz> writes:
> Yes, you're right. It strange, but NUM_S missing there. The conversion
> from string to number is less stable part of formatting.c...
> The patch is in the attachment.
This patch causes the regression tests to fail. I think you need to
consider the to_char() side of it more carefully.
regards, tom lane