Can you help solve restore problem?

Поиск
Список
Период
Сортировка
От Ennio-Sr
Тема Can you help solve restore problem?
Дата
Msg-id 20041123182505.GA1601@Ennio-(Sr)@WouldBe-ei.hnet
обсуждение исходный текст
Ответы Re: Can you help solve restore problem?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hi all!
Trying to restore one of my db on PG-7.4.3 (on Debian-Sarge):

$ psql finanza < finanza.out

I get:
---------
[...]
ERROR:  invalid input syntax for type double precision: "-"
CONTEXT:  COPY dep_tit, line 1, column ultima_quot: "-"
ERROR:  invalid input syntax for type double precision: "-"
CONTEXT:  COPY gar_tit, line 1, column ultima_quot: "-"
 setval
--------
      6
(1 row)
---------

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    -    -
[...]                                                ^^^^^^   ^^^^^^
\.
----------------

As far as I can understand, the hyphen '-' is not double precision, so
PG is complaining; the question is: is there a way to get around the
problem? How can I avoid dropping those cols and reconstructing them
manually on the restored db?

Thanks for your attention.
    Ennio

--
[Perche' usare Win$ozz (dico io) se ..."anche uno sciocco sa farlo.   \\?//
 Fa' qualche cosa di cui non sei capace!"  (diceva Henry Miller) ]    (°|°)
[Why use Win$ozz (I say) if ... "even a fool can do that.              )=(
 Do something you aren't good at!" (as Henry Miller used to say) ]

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faqs/FAQ.html

В списке pgsql-general по дате отправления:

Предыдущее
От: "Gary L. Burnore"
Дата:
Сообщение: Re: Rogue cmsg (was Google (was RFD: comp.databases.postgresql.*))
Следующее
От: "Krause, Lewis"
Дата:
Сообщение: I need to add a column to a table