Cannot dump/restore text value \N
| От | Manfred Koizar |
|---|---|
| Тема | Cannot dump/restore text value \N |
| Дата | |
| Msg-id | ie51ovcl0gcmj5rs4v692hqb317nrh6jpm@email.aon.at обсуждение исходный текст |
| Ответы |
Re: Cannot dump/restore text value \N
|
| Список | pgsql-hackers |
To be clear, this is not about \N as the default external
representation for NULL, I'm talking about a string consisting of the
two characters backslash and uppercase-N.
CREATE TABLE nonu (tx text NOT NULL);
INSERT INTO nonu VALUES ('\\N');
SELECT * FROM nonu;
COPY nonu TO stdout;
This correctly gives:
\\N
Now try to feed that back into the table:
DELETE FROM nonu;
COPY nonu FROM stdin;
\\N
\.
ERROR: copy: line 1, CopyFrom: Fail to add null value in not null
attribute tx
lost synchronization with server, resetting connection
This happened with 7.3.4, while trying to restore a 1.3 GB dump :-(
ERROR: copy: line 809051, CopyFrom: Fail to add null value in not
null attribute text
FATAL: Socket command type 0 unknown
The bug is still in 7.4Beta3; didn't test with Beta 4 yet.
ServusManfred
В списке pgsql-hackers по дате отправления: