pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feed From: T E Schmitz <mailreg@numerixtechnology.de>
To: pgsql-sql@postgresql.org
Subject: Re: import CSV file
Date: Wed, 14 Mar 2007 14:45:21 +0000
Message-ID: <45F80A81.3010900@numerixtechnology.de> (raw )
In-Reply-To: <a55915760703131848y47efff4fh928b1ee17e20b2cd@mail.gmail.com >
References: <45F70BC9.801@numerixtechnology.de >
<20070313182740.ef40e742.darcy@druid.net >
<45F73742.2080505@numerixtechnology.de >
<a55915760703131848y47efff4fh928b1ee17e20b2cd@mail.gmail.com >
Rodrigo De León wrote:
> On 3/13/07, T E Schmitz <mailreg@numerixtechnology.de> wrote:
>
>> This is pretty ingenious!
>> Just a few minor problems:
>> - how does COPY know which column is which?
>> - how do I specify DELIMITER as TAB?
>
>
> See:
> http://www.postgresql.org/docs/8.2/static/sql-copy.html
Thank you for the links. I had read of the manual entry for the COPY
command and I know that I need something like
psql -h lolek -U tes -d stockmarket -c "copy history from STDIN
DELIMITER AS TAB CSV" < /tmp/FTSE.csv
My problem is how to specify the tab character on the command line
seeing as the COPY command is already enclosed in quotes.
When creating CSV output I use -F $'\t' on Unix. However,
DELIMITER AS $'\t' doesn't work.
>> Also, it's nopt happy about the date format : 2007/02/09
>
> See:
> http://www.postgresql.org/docs/current/static/runtime-config-client.html#GUC-DATESTYLE
--
Regards,
Tarlika Elisabeth Schmitz
view thread (11+ messages) latest in thread
Message-ID: <45F80A81.3010900@numerixtechnology.de>
Permalink: ../45F80A81.3010900@numerixtechnology.de/
Also on: postgresql.org/message-id/45F80A81.3010900@numerixtechnology.de
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: mailreg@numerixtechnology.de
Subject: Re: import CSV file
In-Reply-To: <45F80A81.3010900@numerixtechnology.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox