Copy from : ERROR: date/time field value out of range

From: "David Tokmatchi" <david(dot)tokmatchi(at)gmail(dot)com>
To: pgsql-fr-generale(at)postgresql(dot)org
Subject: Copy from : ERROR: date/time field value out of range
Date: 2007-07-30 14:43:58
Message-ID: c50dbb0b0707300743o153a8302o146b728a5d20a4ef@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-fr-generale

Bonjour

J'utilise Copy pour charger les données depuis un fichier plat dans une
table dont voici la description :

Column | Type | Modifiers
-----------+-----------------------------+-----------
to_ref | bigint | not null
to_entity | character(40) | not null
to_date | timestamp without time zone | not null
to_time | timestamp without time zone | not null
to_occ | text |

La commande copy est la suivante :

copy toto from '/tmp/x.dat' delimiters '~'

dans mon fichier x.dat il y a les données suivants ( un million
d'enregistrement ):
...
3454495~TQKQD ~12.03.2007 00:00:00~01.01.1900 17:35:26~
3454496~HHKKF ~12.03.2007 00:00:00~01.01.1900 17:35:34~
3454497~BBIIL ~12.03.2007 00:00:00~01.01.1900 17:35:39~
3454501~IKKFFS ~12.03.2007 00:00:00~01.01.1900 17:43:16~
3454502~ADJUSTMENT ~12.03.2007 00:00:00~01.01.1900 17:44:33~
3454503~ADJUSTMENT ~12.03.2007 00:00:00~01.01.1900 17:46:16~
3454504~ADJUSTMENT ~12.03.2007 00:00:00~01.01.1900 17:47:52~
3454517~TFFFR ~13.03.2007 00:00:00~01.01.1900 08:53:20~
...

L'erreur est la suivante :
ERROR: date/time field value out of range: "13.03.2007 00:00:00"
HINT: Perhaps you need a different "datestyle" setting.
CONTEXT: COPY toto, line 89846, column to_date: "13.03.2007 00:00:00"

Pour info la ligne 89846 correspond a la dernière ligne de mes données.

Merci pour vos lumières

Responses

Browse pgsql-fr-generale by date

  From Date Subject
Next Message Jean-Christophe Arnu 2007-07-30 14:46:54 Re: Reponse lente de postgres
Previous Message Hajatiana RAHOLIARIJAONA 2007-07-30 14:23:35 Reponse lente de postgres