Re: ERROR: COPY escape must be a single one-byte character (multi-delimiter appears to work on Postgres 9.0 but does not on Postgres 9.2)

From: Nicolas Paris <nicolas(dot)paris(at)riseup(dot)net>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: ERROR: COPY escape must be a single one-byte character (multi-delimiter appears to work on Postgres 9.0 but does not on Postgres 9.2)
Date: 2019-11-16 22:18:50
Message-ID: 20191116221850.szovsutqkqx2uu5m@riseup.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> I am unable to edit this Talend job, as it's very old and we do not have the
> source code for the job anymore. I am unable to see what the actual delimiter

Compiled talend jobs produce jars file with java .class files in which
the SQL statements are in plain text. You should be at least able to get
the copy statement (which is plain text SQL), and also being able to
modify it.

On Wed, Nov 13, 2019 at 07:40:59PM -0500, Brandon Ragland wrote:
> Hello,
>
> I have a Talend enterprise job that loads data into a PostgreSQL database via
> the COPY command. When migrating to a new server this command fails with the
> following error message: org.postgresql.util.PSQLException:ERROR: COPY escape
> must be a single one-byte character
>
> The thing is, I looked over the documentation for both Postgres 9.0 and 9.2.
> Both documentations say that multi-byte delimiters are not allowed. So I'm very
> confused on why this job works perfectly on Postgres 9.0 but not on 9.2.
>
> I am unable to edit this Talend job, as it's very old and we do not have the
> source code for the job anymore. I am unable to see what the actual delimiter
> is. I am also unable to see exactly how the COPY command is being run, such as
> whether it's pushing directly to the server via the Postgres driver, or if it's
> created a temporary CSV file somewhere and then loading the data into the
> server. I believe the reason we have multi byte delimiters setup is due to the
> use of various special characters in a few of the columns for multiple tables.
>
> I am not aware of any edits to the source code of the old 9.0 Postgres server.
>
> The reason we are migrating servers is due to the end of life for CentOS 5. The
> new server runs CentOS 7. I believe that both servers are using the default
> Postgres versions that come in the default CentOS repositories. I know for sure
> that the CentOS 7 server is indeed running the default Postgres version, as I
> installed it myself through yum.
>
> Any help would be greatly appreciated.
>
> Also, is there a way to copy the old Postgres server, dependencies, and
> executables to our new server, in case the source was modified?
>
> Brandon Ragland
> Software Engineer
> BREAKFRONT SOFTWARE
> Office: 704.688.4085 | Mobile: 240.608.9701 | Fax: 704.973.0607

--
nicolas

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Devrim Gündüz 2019-11-17 01:39:43 Re: pg12 rc1 on CentOS8 depend python2
Previous Message Thomas Munro 2019-11-16 22:06:38 Re: here does postgres take its timezone information from?