Re: COPY from CSV, passing in default value?

Поиск
Список
Период
Сортировка
От Armand Turpel
Тема Re: COPY from CSV, passing in default value?
Дата
Msg-id 4FB475E5.8090108@gmail.com
обсуждение исходный текст
Ответ на Re: COPY from CSV, passing in default value?  (adebarros <adebarros@gmail.com>)
Список pgsql-general
A more elegant way is to include the create table and copy into a
function and pass the default values to this function.

Am 17/05/2012 03:35, schrieb adebarros:
> Hi, Ben,
>
> Thanks for the suggestion. I do realize I could create the default value for
> the column; however, I probably should have specified that in this scenario
> I would want to supply several different values for the county (or any other
> missing field) during import. i.e., if I first imported a CSV with data for
> Cumberland County and then later another CSV for Putnam County.
>
> In any event, the solution from Francois does the trick.
>
> Thanks again!
>
> --
> View this message in context:
http://postgresql.1045698.n5.nabble.com/COPY-from-CSV-passing-in-default-value-tp5708672p5708990.html
> Sent from the PostgreSQL - general mailing list archive at Nabble.com.
>


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

Предыдущее
От: adebarros
Дата:
Сообщение: Re: COPY from CSV, passing in default value?
Следующее
От: Sumit Raja
Дата:
Сообщение: Re: Postgres 9.0 Streaming Replication and Load Balancing?