From: | Stephen Frost <sfrost(at)snowman(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Functions with COPY |
Date: | 2003-11-28 17:07:03 |
Message-ID: | 20031128170703.GH24094@ns.snowman.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
* Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)us) wrote:
> Stephen Frost <sfrost(at)snowman(dot)net> writes:
> > Consider the following input data:
> > 1234,24.50,10-Jan-2003,10/1/03,10-01-2003,hiall
>
> > The interpretation for the numbers is:
> > 1234 =3D 12.34, 24.50 =3D 24.50
> > The interpretation for the dates is:
> > January 10th, 2003, October 1st, 2003, October 1st, 2003
>
> > I don't believe it's possible, currently, to correctly import this
> > data with copy. I'm not sure the date fields would even be accepted
> > as date fields.
> Nonsense.
[...]
> I think you'd have to do some preprocessing on the numeric inputs if you
> wanted implied decimal points inserted like that, but the dates look fine.
I guess my example was lacking, I'm sure there are cases where the
text->date casting will end up being wrong or some date style won't be
accepted. If the above was 'January 10th, 2003, October 1st, 2003,
January 1st, 2003', for example. Thinking back I think that might have
been the situation I was thinking about (conflicting mdy and dmy) and
would have made more sense as an example.
Stephen
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-11-28 17:13:36 | Re: about explain analyze |
Previous Message | Tom Lane | 2003-11-28 17:03:51 | Re: Encoding problem with 7.4 |