Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VdnqX-0008Ec-1c for pgsql-bugs@arkaria.postgresql.org; Tue, 05 Nov 2013 21:07:33 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VdnqW-0002bi-Bt for pgsql-bugs@arkaria.postgresql.org; Tue, 05 Nov 2013 21:07:32 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vdnd8-0001ZZ-8k for pgsql-bugs@postgresql.org; Tue, 05 Nov 2013 20:53:42 +0000 Received: from mahout.postgresql.org ([2001:4800:7903:4::123]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vdnd5-0003Qd-8c for pgsql-bugs@postgresql.org; Tue, 05 Nov 2013 20:53:41 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by mahout.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vdnd4-0006lH-19 for pgsql-bugs@postgresql.org; Tue, 05 Nov 2013 20:53:38 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.80) (envelope-from ) id 1Vdncy-0002HS-7a for pgsql-bugs@postgresql.org; Tue, 05 Nov 2013 20:53:32 +0000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: BUG #8577: pg_dump custom format exported dump can't be imported again To: pgsql-bugs@postgresql.org From: dominik@dominikdorn.com Message-Id: Date: Tue, 05 Nov 2013 20:53:32 +0000 X-Pg-Spam-Score: -0.0 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org The following bug has been logged on the website: Bug reference: 8577 Logged by: Dominik Dorn Email address: dominik@dominikdorn.com PostgreSQL version: 9.1.10 Operating system: Ubuntu x64 Description: Hi, I ran into an issue trying to restore a custom dump from postgresql 9.1.10 from one machine into postgresql 9.1.10 on my CI machine. For some reason, pg_dump inserts an entry with null values into the dump (even for the primary key). The commands I used are: pg_dump -Fc -f dump.sql mydatabase (on the source machine) pg_restore -e -d mydatabase_2013_11_05 dump.sql The error I get is: pg_restore: [archiver (db)] Error while PROCESSING TOC: pg_restore: [archiver (db)] Error from TOC entry 3370; 0 61665 TABLE DATA lytartist lyriks pg_restore: [archiver (db)] COPY failed for table "lytartist": ERROR: null value in column "nartistnr" violates not-null constraint CONTEXT: COPY lytartist, line 21841: "\N \N \N \N \N \N \N \N \N \N \N" pg_restore: [archiver] worker process failed: exit code 1 the table in question looks like this: lyriks=> \d lyriks.lytartist Table "lyriks.lytartist" Column | Type | Modifiers ----------------+-----------------------------+--------------------------------------------------------------- nartistnr | integer | not null default nextval('lytartist_nartistnr_seq'::regclass) sartist | character varying(250) | not null default ''::character varying nartistnralias | integer | nstatusnr | integer | not null default 1660 ntypenr | integer | not null default 510 surl | character varying(250) | not null default ''::character varying nlabelnr | integer | nusernr | integer | not null default 0 dnow | timestamp without time zone | not null ssoundex | character varying(250) | surlname | character varying(100) | Of course, querying for the entry with a NULL PK results in no results on the source machine. Please help! Thanks, Dominik -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs