Re: Error Importing CSV File

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Error Importing CSV File
Дата
Msg-id 4586.1310753812@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Error Importing CSV File  (Bryan Nelson <shrek@shreks-place.com>)
Ответы Re: Error Importing CSV File
Список pgsql-general
Bryan Nelson <shrek@shreks-place.com> writes:
> Tom, rake is a rails command, also after doing a \d geo_data it does
> show that it's adding an id column before everything else. I'm
> guessing my best bet is going to be creating the table by hand as I
> have no idea how to tell it not to create the extra field.

No need to abandon your infrastructure; you just have to tell COPY what
columns to expect in the CSV file.

COPY geo_data(zip_code, latitude, longitude, city, state, county) FROM ...

            regards, tom lane

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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Error Importing CSV File
Следующее
От: Scott Ribe
Дата:
Сообщение: Re: Error Importing CSV File