"I. B." <i.bre@live.com> writes:
> How to fix this?
As long as you keep on showing us wrappers, and not the code that
actually does the work, we're going to remain in the dark. What
you have shown us just copies data from point A to point B, and
it looks like it would be fine if the source data conforms to
PG's expectations. But the problem is presumably that the source
data *doesn't* conform to those expectations.
regards, tom lane