From: Stef <svb@ucs.co.za>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-admin@postgresql.org
Subject: Re: Bad dumps...
Date: Tue, 13 Jul 2004 17:07:57 +0200
Message-ID: <20040713170757.41dfc99b@svb.ucs.co.za> (raw)
In-Reply-To: <15686.1089728676@sss.pgh.pa.us>
References: <5.1.0.14.0.20040709093611.05621ea0@mailserver.dmr.co.uk>
<20040709095738.5738334f@svb.ucs.co.za>
<5.1.0.14.0.20040709093611.05621ea0@mailserver.dmr.co.uk>
<5.1.0.14.0.20040709122158.055ac630@mailserver.dmr.co.uk>
<20040709161641.3e164d8f@svb.ucs.co.za>
<1089429340.10763.10.camel@localhost.localdomain>
<20040712095203.333c8aa2@svb.ucs.co.za>
<20040713124000.49a556a0@svb.ucs.co.za>
<15686.1089728676@sss.pgh.pa.us>
Tom Lane mentioned :
=> This is demonstrably not so. You might have trouble with data coming
=> from somewhere else, if the source doesn't understand the quoting rules
=> for COPY data. But I can dump and restore a table containing '\N' and
=> variants of that without any trouble.
Here's what I did to recreate the problem :
=# create table text_test ( id text NOT NULL);
CREATE TABLE
=# INSERT INTO text_test values ('\\N');
INSERT 37302671 1
=# \q
[root@p0 postgres]# pg_dump p0 -U postgres -t text_test > text_test.sql
[root@p0 postgres]# psql p0 -U postgres
Welcome to psql 7.3.4, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit
=# drop table text_test ;
DROP TABLE
=# \q
[root@p0 postgres]# cat text_test.sql | psql p0 -U postgres
You are now connected as new user postgres.
SET
CREATE TABLE
ERROR: copy: line 1, CopyFrom: Fail to add null value in not null attribute id
lost synchronization with server, resetting connection
[root@p0 postgres]#
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: svb@ucs.co.za, tgl@sss.pgh.pa.us
Subject: Re: Bad dumps...
In-Reply-To: <20040713170757.41dfc99b@svb.ucs.co.za>
References: <5.1.0.14.0.20040709093611.05621ea0@mailserver.dmr.co.uk> <20040709095738.5738334f@svb.ucs.co.za> <5.1.0.14.0.20040709122158.055ac630@mailserver.dmr.co.uk> <20040709161641.3e164d8f@svb.ucs.co.za> <1089429340.10763.10.camel@localhost.localdomain> <20040712095203.333c8aa2@svb.ucs.co.za> <20040713124000.49a556a0@svb.ucs.co.za> <15686.1089728676@sss.pgh.pa.us> <20040713170757.41dfc99b@svb.ucs.co.za>
* 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