Re: Looking for postgres equivalent of mysqlimport

Поиск
Список
Период
Сортировка
Искать
От
M. Bastin
Тема
Re: Looking for postgres equivalent of mysqlimport
Дата
Msg-id
a06110411bd7094f1d488@[192.168.0.243]
Ответ на
Список
Дерево обсуждения
Looking for postgres equivalent of mysqlimport Sean Davis <sdavis2@mail.nih.gov>
Re: Looking for postgres equivalent of mysqlimport "M. Bastin" <marcbastin@mindspring.com>
Re: Looking for postgres equivalent of mysqlimport Sean Davis <sdavis2@mail.nih.gov>
Re: Looking for postgres equivalent of mysqlimport "M. Bastin" <marcbastin@mindspring.com>
Re: Looking for postgres equivalent of mysqlimport Sean Davis <sdavis2@mail.nih.gov>
Re: Looking for postgres equivalent of mysqlimport "M. Bastin" <marcbastin@mindspring.com>
Re: Looking for postgres equivalent of mysqlimport Sean Davis <sdavis2@mail.nih.gov>
At 9:13 AM -0400 9/17/04, Sean Davis wrote:
>I am looking for the rough equivalent of:
>
>mysqlimport -L -h  -r --fields-terminated-by=',' -u -p
>--fields-enclosed-by='"' genekeydb *csv >report
>
>In particular, I have '"' enclosed fields.

As far as I know there's nothing to determine enclosed fields with 
postgresql and you'll have to trim these '"' off after the import.

For the import, what you're looking for is COPY TO/FROM ...

Here's the documentation on COPY:


If this is a one time operation that you don't need to program into 
your solution you can easily do it with Eduphant from any Win or Mac 
client:  
In Eduphant, click the "stdin" button to select the file you want to 
import, then type the appropriate COPY command and execute it.

General caveat on imports: make sure you don't mix up text encodings!

Cheers,

Marc
В списке pgsql-novice по дате отправления
От: Sean Davis
Дата:
От: Sean Davis
Дата:
FAQ