pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Kiran K V <kirankv.1982@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: ERROR: invalid byte sequence for encoding UTF8: 0x00
Date: Tue, 09 Jan 2024 16:13:28 +0100
Message-ID: <2f91c83c9529ad677091b3c167292eb5967bbb6e.camel@cybertec.at> (raw)
In-Reply-To: <CAGv0ivqrbg6qphPbU-YyKuAb31dVGRWrZC_R8Zdhj3TWbiB=GA@mail.gmail.com>
References: <CAGv0ivqrbg6qphPbU-YyKuAb31dVGRWrZC_R8Zdhj3TWbiB=GA@mail.gmail.com>

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





view thread (19+ messages)  latest in thread

Message-ID: <2f91c83c9529ad677091b3c167292eb5967bbb6e.camel@cybertec.at>
Permalink:  ../2f91c83c9529ad677091b3c167292eb5967bbb6e.camel@cybertec.at/
Also on:    postgresql.org/message-id/2f91c83c9529ad677091b3c167292eb5967bbb6e.camel@cybertec.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: laurenz.albe@cybertec.at, kirankv.1982@gmail.com
  Subject: Re: ERROR: invalid byte sequence for encoding UTF8: 0x00
  In-Reply-To: <2f91c83c9529ad677091b3c167292eb5967bbb6e.camel@cybertec.at>
  References: <CAGv0ivqrbg6qphPbU-YyKuAb31dVGRWrZC_R8Zdhj3TWbiB=GA@mail.gmail.com> <2f91c83c9529ad677091b3c167292eb5967bbb6e.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox