Re: Import csv - Mailing list pgsql-general

From Patrick Nelson
Subject Re: Import csv
Date
Msg-id 4165C48DE9A0D211B6400800095C585F172DE5@WASHINGTON
Whole thread Raw
In response to Import csv  (Patrick Nelson <pnelson@neatech.com>)
List pgsql-general
terry@greatgulfhomes.com wrote:
----------------->>>>
devtest2=# \h copy
Command:     COPY
Description: copy data between files and tables
Syntax:
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' ]

Hence

COPY t1 FROM '<filename>' USING DELIMITERS ',';
----------------->>>>

Didn't even think of the psql \h copy... DOH!  Feel like a tard!  Anyway
thanks!

pgsql-general by date:

Previous
From: "Roderick A. Anderson"
Date:
Subject: Re: Advice on geolocation
Next
From: Janning Vygen
Date:
Subject: Re: plpgsql: function throws error on second call!