Re: Functions with COPY

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: Functions with COPY
Дата
Msg-id 20031128170703.GH24094@ns.snowman.net
обсуждение исходный текст
Ответ на Re: Functions with COPY  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Functions with COPY
Список pgsql-hackers
* Tom Lane (tgl@sss.pgh.pa.us) wrote:
> Stephen Frost <sfrost@snowman.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

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Encoding problem with 7.4
Следующее
От: Tom Lane
Дата:
Сообщение: Re: about explain analyze