Re: loading data from flat text file
От | Ron Peterson |
---|---|
Тема | Re: loading data from flat text file |
Дата | |
Msg-id | 392A9161.98C21E42@yellowbank.com обсуждение исходный текст |
Ответ на | RE: loading data from flat text file ("Voitenko, Denis" <dvoitenko@qode.com>) |
Ответы |
Re: loading data from flat text file
|
Список | pgsql-general |
> "Voitenko, Denis" wrote: > > So I am almost there, except my data is formated as follows: > > "chunk1","chunk2","chunk3" > > how would I tell COPY that my data is encapsulated in " and separated > by , ? Furthermore, I did not find a manual on the COPY command. > Anyone? In /usr/local/pgsql/doc (assuming that's where you installed PostgreSQL) you will find a good deal of html format documentation. From the docs: COPY [ BINARY ] table [ WITH OIDS ] FROM { 'filename' | stdin } [ [USING] DELIMITERS 'delimiter' ] [ WITH NULL AS 'null string' ] COPY [ BINARY ] table [ WITH OIDS ] TO { 'filename' | stdout } [ [USING] DELIMITERS 'delimiter' ] [ WITH NULL AS 'null string' ] Basically, you just need to specify the delimiters. Bruce Momjian is also in the process of writing a book on PostgreSQL. You can download a snapshot of its current state from http://www.postgresql.org/docs/awbook.html. -Ron-
В списке pgsql-general по дате отправления: