Re: ERROR: invalid byte sequence for encoding UTF8: 0x00

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Kiran K V <kirankv(dot)1982(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: ERROR: invalid byte sequence for encoding UTF8: 0x00
Date: 2024-01-09 15:13:28
Message-ID: 2f91c83c9529ad677091b3c167292eb5967bbb6e.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 2024-01-09 at 17:48 +0530, Kiran K V wrote:
> I have a table with bytea column and trying to load the data using copy command.
> But Copy command is failing with
> "ERROR: invalid byte sequence for encoding UTF8: 0x00.
> Why postgresql is failing to load when data contains 0x00.
> How to resolve this error ? any workaround to load the data with 0x00 values ?

This is not about loading data into a "bytea", but into a "text", "varchar" or
"char" column. Check again.

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2024-01-09 15:48:28 Re: ERROR: invalid byte sequence for encoding UTF8: 0x00
Previous Message jian he 2024-01-09 14:38:00 Re: postgresql custom variable in pg_settings table