Re: Implicit casts to array types

Поиск
Список
Период
Сортировка
От joshua
Тема Re: Implicit casts to array types
Дата
Msg-id 1355500350372-5736596.post@n5.nabble.com
обсуждение исходный текст
Ответ на Re: Implicit casts to array types  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Implicit casts to array types
Re: Implicit casts to array types
Список pgsql-general
Tom-
My apologies, I'm still somewhat new to this. Specifically, I'm dealing with
COPY FROM CSV. I had assumed that since a csv is essentially a pile of text
and COPY FROM is smart enough to interpret all sorts of csv entries into
postgresql data types that if I wanted to allow a nonstandard conversion,
I'd have to define some sort of cast to allow COPY FROM to interpret, say
...,green,... as {'green}.

Merlin-
I could set this up to use a staging table, but honestly, given our systems,
it'd be easier for me to change all of our source csv's to simply read
...,{abc},... instead of ...,abc,... than to change our code base to use a
series of staging tables (we will be using brackets in the future; this is
more of a backwards compatibility issue). Especially since it currently
doesn't have to inspect the target data type of columns we load up, it
simply allows the COPY FROM command to do all of the interpreting which
brings me back to my original point. :)



--
View this message in context:
http://postgresql.1045698.n5.nabble.com/Implicit-casts-to-array-types-tp5736582p5736596.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Problem starting PG-9.2 on non-default port
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: Implicit casts to array types