From: | Martín Marqués <martin(dot)marques(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | pg_dump problems |
Date: | 2011-03-23 12:33:00 |
Message-ID: | AANLkTinjOO5_6xupQ=UakBdUnU2NKcgJG8b_YzuoZejS@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi all,
I'm having problems with pg_dump, apparently, from one of our servers.
The scenario is like this. I tried today to dump a DB from our
production server to load on our development server and got some
errors, which I show below.
Production server:
SELECT version();
version
-----------------------------------------------------------------------------------------------
PostgreSQL 8.3.14 on i486-pc-linux-gnu, compiled by GCC gcc-4.3.real
(Debian 4.3.2-1.1) 4.3.2
Development server:
SELECT version();
version
-----------------------------------------------------------------------------------------------------
PostgreSQL 8.4.7 on i486-pc-linux-gnu, compiled by GCC gcc-4.4.real
(Debian 4.4.5-10) 4.4.5, 32-bit
Anyway, the problem is in the output of the pg_dump in the production server:
$ pg_dump -V
pg_dump (PostgreSQL) 8.3.14
The first error looks like related to encoding of bytea:
ERROR: sintaxis de entrada no válida para tipo bytea
CONTEXTO: COPY novedades_fotos, línea 23, columna foto:
«\377\330\377\340\000\020JFIF\000\001\002\001\000H\000H\000\000\377\355\020\006Photoshop
3.0\0008BIM\...»
But more strange is what comes later:
ERROR: la sintaxis de entrada no es válida para integer: «954516ILa
educación superior en el sector aducativo del mercosur»
CONTEXTO: COPY objeto_datos_rep, línea 1627732, columna codiobjeto:
«954516ILa educación superior en el sector aducativo del mercosur»
Checking that register in the production DB I get this:
SELECT * from objeto_datos_rep where codigo = 2357634;
codigo | codiobjeto | descripcion
| tcampo
---------+------------+-----------------------------------------------------------+--------
2357634 | 954516 | La educación superior en el sector aducativo
del mercosur | 5
So, why didn't pg_dump add the tabs between 954516 and "La educación..."?
Right now I'm trying to do dump with INSERTs instead of COPY command
to see what happens.
--
Martín Marqués
select 'martin.marques' || '@' || 'gmail.com'
DBA, Programador, Administrador
From | Date | Subject | |
---|---|---|---|
Next Message | Vick Khera | 2011-03-23 12:40:42 | Re: pg_dump problems |
Previous Message | salah jubeh | 2011-03-23 12:18:12 | General question |