Re: COPY command - CSV files

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: COPY command - CSV files
Date: 2004-05-05 16:40:56
Message-ID: 40991918.9070800@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


It's been done already.

see http://developer.postgresql.org/todo.php and
http://developer.postgresql.org/docs/postgres/sql-copy.html

cheers

andrew

Umberto Zappi wrote:

> I wish modify COPY command for support of CSV files (dump/load files in
> CSV format).
> I think this option is very important from import data from spreedsheet
> as OpenOffice/calc or M$/excel.
> I have found this task in TODO list, also.
>
> I've begin my work, modify COPY syntax in:
>
> COPY tablename [ ( column [, ...] ) ]
> FROM { 'filename' | STDIN }
> [ [ WITH ]
> [ BINARY ]
> [ OIDS ]
> [ DELIMITER [ AS ] 'delimiter' ]
> [ [ OPTIONALLY ] ENCLOSED [ BY ] 'delimiter1' [ AND
> 'delimiter2' ] ]
> [ NULL [ AS ] 'null string' ] ]
>
> COPY tablename [ ( column [, ...] ) ]
> TO { 'filename' | STDOUT }
> [ [ WITH ]
> [ BINARY ]
> [ OIDS ]
> [ DELIMITER [ AS ] 'delimiter' ]
> [ ENCLOSED [ BY ] 'delimiter1' [ AND 'delimiter2' ] ]
> [ NULL [ AS ] 'null string' ] ]
>
> Syntax is like to control-file of Oracle's utility sql*load.
> Enclosed define the first and second delimiters (if are different)
> which surround each field.
> The delimiters may be optionally if keyword exists.
>
> At soon!
> Umberto Zappi.
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Gaetano Mendola 2004-05-05 16:44:16 Re: The features I'm waiting for.
Previous Message Gaetano Mendola 2004-05-05 16:38:31 Re: ALTER TABLE TODO items