Jonathon Batson <jonathon(at)octahedron(dot)com(dot)au> writes:
> So there are regular characters in the datname field but where are they?.
> And yet there is a name when doing the following query names are in the
> result.
Based on that, I'd venture that you had a carriage return at the end of
the broken names.
regards, tom lane