Re: invalid UTF-8 byte sequence detected

From: mike <mike(at)thegodshalls(dot)com>
To: Wes <wespvp(at)syntegra(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: invalid UTF-8 byte sequence detected
Date: 2006-03-16 05:42:52
Message-ID: 1142487772.6426.4.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

If you don't care to store those characters then maybe you should change
the database character set to use SQL_ASCII instead of UTF-8. I believe
ASCII will quietly discard those characters when converting from UTF-8.

Mike

On Wed, 2006-03-15 at 23:20 -0600, Wes wrote:
> Based on a couple of other posts, I think I'm out of luck, but I'm hoping
> something might have changed recently.
>
> I'm loading a very high volume of data with COPY using libpq - about 100+
> million rows per day. The problem is that the COPY sometimes aborts with
>
> invalid UTF-8 byte sequence detected
>
> I'd prefer not to add to the overhead by pre-validating every string, since
> PostgreSQL validates it already. Is there a way to get the server to
> replace invalid characters with something like blank instead of generating a
> fatal error?
>
> Wes
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Wes 2006-03-16 06:01:53 Re: invalid UTF-8 byte sequence detected
Previous Message zagman 2006-03-16 05:28:41 How do I make a timestamp column default to current time