| From: | Stef <svb(at)ucs(dot)co(dot)za> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | pgsql-admin(at)postgresql(dot)org |
| Subject: | Re: Bad dumps... |
| Date: | 2004-07-13 15:07:57 |
| Message-ID: | 20040713170757.41dfc99b@svb.ucs.co.za |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-admin |
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(at)p0 postgres]# pg_dump p0 -U postgres -t text_test > text_test.sql
[root(at)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(at)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(at)p0 postgres]#
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2004-07-13 15:40:12 | Re: Bad dumps... |
| Previous Message | Tom Lane | 2004-07-13 14:29:44 | Re: Point in Time Recovery |