From: | Anthony <asotolongo(at)uci(dot)cu> |
---|---|
To: | Cristobal Alexis Ibarra Gonzalez <cristobaal(at)gmail(dot)com> |
Cc: | pgsql-es-ayuda(at)postgresql(dot)org |
Subject: | Re: Importar datos desde un archivo CSV a una tabla de Postgre via Terminal. |
Date: | 2011-05-22 23:18:11 |
Message-ID: | 4DD999B3.5070903@uci.cu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-es-ayuda |
existe el comando COPY que permite hacer lo que deseas, busca en la
documentacion vas a encontrar algo como esto
COPY --- copy data between a file and a table
Synopsis
COPY/|tablename|/ [ (/|column|/ [, ...] ) ]
FROM { '/|filename|/' | STDIN }
[ [ WITH ]
[ BINARY ]
[ OIDS ]
[ DELIMITER [ AS ] '/|delimiter|/' ]
[ NULL [ AS ] '/|null string|/' ]
[ CSV [ HEADER ]
[ QUOTE [ AS ] '/|quote|/' ]
[ ESCAPE [ AS ] '/|escape|/' ]
[ FORCE NOT NULL/|column|/ [, ...] ]
COPY {/|tablename|/ [ (/|column|/ [, ...] ) ] | (/|query|/ ) }
TO { '/|filename|/' | STDOUT }
[ [ WITH ]
[ BINARY ]
[ OIDS ]
[ DELIMITER [ AS ] '/|delimiter|/' ]
[ NULL [ AS ] '/|null string|/' ]
[ CSV [ HEADER ]
[ QUOTE [ AS ] '/|quote|/' ]
[ ESCAPE [ AS ] '/|escape|/' ]
[ FORCE QUOTE/|column|/ [, ...] ]
From | Date | Subject | |
---|---|---|---|
Next Message | Álvaro Hernández Tortosa | 2011-05-22 23:28:25 | Re: Importar datos desde un archivo CSV a una tabla de Postgre via Terminal. |
Previous Message | Cristobal Alexis Ibarra Gonzalez | 2011-05-22 23:06:59 | Importar datos desde un archivo CSV a una tabla de Postgre via Terminal. |