Re: Import German Number Format - Mailing list pgsql-general

From A. Kretschmer
Subject Re: Import German Number Format
Date
Msg-id 20081002135100.GG20230@a-kretschmer.de
Whole thread Raw
In response to Import German Number Format  ("Tim Semmelhaack" <semmelhaack@gmail.com>)
List pgsql-general
am  Thu, dem 02.10.2008, um 15:35:44 +0200 mailte Tim Semmelhaack folgendes:
> Hello,
>
> I have to import a huge number of data sets of data sets with "Copy from".
>
> The numbers are formatted with decimal comma ',' (as usual in Germany)
> instead of the decimal point '.'
>
> When I try to import this data Postgres crashes, so I think I have to


PostgreSQL crashed? I disbelieve this, you got an error, right?


> change a parameter with SET? Does anybody know which parameter I have
> to change?

There isn't such a parameter. Change your data, change the ',' to '.'.
Or load the data into a temp. table as text and use build-in-functions to
convert this text to numeric and fill your destination table.

I would use sed or such tools.


Andreas
--
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net

pgsql-general by date:

Previous
From: "Tim Semmelhaack"
Date:
Subject: Import German Number Format
Next
From: "Jonah H. Harris"
Date:
Subject: Re: Import German Number Format