pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Hotmail <crajac66@hotmail.com>
To: Pgsql-admin <pgsql-admin@lists.postgresql.org>
Subject: Re: PostgreSQL JDBC Driver ERROR: invalid byte sequence for encoding "UTF8": 0x00 on Select stmt
Date: Tue, 11 Aug 2020 10:33:05 +0200
Message-ID: <cf4966960fa6b5511535d5bc6ff4bf6c405b6d4e.camel@cybertec.at> (raw)
In-Reply-To: <BYAPR06MB40234072A979C934FC1E5754D7460@BYAPR06MB4023.namprd06.prod.outlook.com>
References: <33086f4b-dacc-466e-a085-830b62cdd18a@Spark>
	<BYAPR06MB40234072A979C934FC1E5754D7460@BYAPR06MB4023.namprd06.prod.outlook.com>

On Sat, 2020-08-08 at 03:59 -0600, Hotmail wrote:
> We migrated data from Oracle to postgres using oracle_fdw without seeing any invalid byte
>  sequence for encoding "UTF8": 0x00 errors. The data transfer from Oracle to Postgres using
>  oracle_fdw completed successfully without any errors.
> 
> After we started our application using Postgres as the new data source we are consistently
>  seeing "invalid byte sequence for encoding "UTF8": 0x00 errors" once or twice a minute on
>  a basic select statement like this:
> 
> Select * from <table> where <col1>=‘foo’ and <col2>=‘foo2’;
> 
> Not all queries fail just some. We can select * from the table in question from psql without
>  any invalid byte sequence errors (A problem with the jdbc client maybe?)

oracle_fdw will complain about zero bytes, so odds are that your PostgreSQL database is fine.
This is confirmed by the face that "SELECT * FROM atable" works in PostgreSQL.

I can see two options:

1. The statement that causes the errors is actually a different statement, for
   example an INSERT.

2. 'foo' and 'foo2' contain zero bytes.

Yours,
Laurenz Albe






view thread (4+ messages)

Message-ID: <cf4966960fa6b5511535d5bc6ff4bf6c405b6d4e.camel@cybertec.at>
Permalink:  ../cf4966960fa6b5511535d5bc6ff4bf6c405b6d4e.camel@cybertec.at/
Also on:    postgresql.org/message-id/cf4966960fa6b5511535d5bc6ff4bf6c405b6d4e.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 using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: laurenz.albe@cybertec.at, crajac66@hotmail.com, pgsql-admin@lists.postgresql.org
  Subject: Re: PostgreSQL JDBC Driver ERROR: invalid byte sequence for encoding "UTF8": 0x00 on Select stmt
  In-Reply-To: <cf4966960fa6b5511535d5bc6ff4bf6c405b6d4e.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