dbTalk Databases Forums  

Re: Can you help solve restore problem?

comp.databases.postgresql.general comp.databases.postgresql.general


Discuss Re: Can you help solve restore problem? in the comp.databases.postgresql.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Tom Lane
 
Posts: n/a

Default Re: Can you help solve restore problem? - 11-23-2004 , 01:37 PM






Ennio-Sr <nasr.laili (AT) tin (DOT) it> writes:
Quote:
This is an extract of the dump file:

CREATE TABLE "dep_tit" (
"cod_rif" character(3),
"titolo" character varying(20),
"quantity" integer,
"costo_med_fisc" double precision,
"data_rif" date,
"ultima_quot" double precision,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
"data_ult_q" date
);

COPY dep_tit (cod_rif, titolo, quantity, costo_med_fisc, data_rif,
ultima_quot, data_ult_q) FROM stdin;
1 Tit. a 100 3.9112 2004-07-23 - -
2 Tit. b 100 4.78 2004-07-23 - -
[...] ^^^^^^ ^^^^^^
It's pretty much impossible to believe that that's what came out of
pg_dump originally, because "-" definitely isn't a possible output value
for either double precision or date. The best theory I can come up with
is that those columns were actually NULL in the source database, and
that something somewhere along the line munged the "\N" null markers into
"-". Does this theory seem to you to hold any water? Has the dump file
been subjected to any indignities like being emailed or copied onto/off
of a Windows machine?

If that is the correct analysis then the easiest fix is probably to edit
the COPY commands to add WITH NULL AS '-' (this assumes that you don't
have any fields where '-' would actually be the value).

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.