Re: Bad dumps... - Mailing list pgsql-admin

From Stef
Subject Re: Bad dumps...
Date
Msg-id 20040713124000.49a556a0@svb.ucs.co.za
Whole thread Raw
In response to Re: Bad dumps...  (Stef <svb@ucs.co.za>)
Responses Re: Bad dumps...  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-admin
I found that it was actually a '\\N' value only that causes
dumps to dump successfully, but fail on import (When using COPY),
because both '\N' and '\\N' are seen as null by the COPY statement.
I just happened to have '\\N' values in my NOT NULL text field.
I now manually use this dump command :
pg_dump  | sed 's:\\\\N:¬:g' | gzip > dump.gz

and do the reverse sed to restore.

Stef mentioned :
=> mike g mentioned :
=> => That could be a bug.  How are you dumping the data?  pg_dump?  Select
=> => query?  How are you restoring the data?  psql?
=>
=> Dumping:
=> pg_dump -Ft | gzip > dump.tgz
=>
=> Restoring:
=> zcat dump.tgz | pg_restore -Ft |psql
=> OR
=> tar xvfz dump.tgz
=> perl -pi -e 's/\$\$PATH\$\$/$ENV{PWD}/g' restore.sql
=> psql -f restore.sql
=>
=> Both these methods, produce the same result.
=>

Attachment

pgsql-admin by date:

Previous
From: Simon Riggs
Date:
Subject: Re: are there ways for 'idle timeout'?
Next
From: Bruno Wolff III
Date:
Subject: Re: Slony NG