Re: invalid input syntax for type bytea

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Janning Vygen <vygen(at)gmx(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: invalid input syntax for type bytea
Date: 2005-04-04 15:36:24
Message-ID: 26287.1112628984@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Janning Vygen <vygen(at)gmx(dot)de> writes:
> i have a databse in postgresql 7.4 with some pdf files in a bytea column.

> everything works fine but sometimes when i dump and restore i get

> psql:../tmp/dump.sql:704022: ERROR: invalid input syntax for type bytea
> CONTEXT: COPY dk_dokument, line 127, column dk_content:
> "%PDF-1.4\015%\342\343\317\323\015\01220 0 obj\015<< \015/Linearized 1
> \015/O 22 \015/H [ 660 209 ] \..."

You might look into whether your handling of the dump file is perfectly
clean --- is there any possibility of newline transformations getting
applied to it, for example? AFAICS the above cannot happen if the
identical data dumped out by pg_dump is reloaded.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Wes 2005-04-04 15:38:56 Re: Vacuum time degrading
Previous Message Andrew Dunstan 2005-04-04 15:36:10 Re: [HACKERS] plPHP in core?