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 15:09:09 +0000
Message-ID: <45F81015.20101@numerixtechnology.de> (raw)
In-Reply-To: <45F80A81.3010900@numerixtechnology.de>
References: <45F70BC9.801@numerixtechnology.de>
	<20070313182740.ef40e742.darcy@druid.net>
	<45F73742.2080505@numerixtechnology.de>
	<a55915760703131848y47efff4fh928b1ee17e20b2cd@mail.gmail.com>
	<45F80A81.3010900@numerixtechnology.de>

T E Schmitz wrote:
> 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 

"copy history from STDIN DELIMITER AS '\t' CSV"
is the answer

>>> Also, it's nopt happy about the date format : 2007/02/09

The correct delimiter solved my date problem, too.

-- 


Regards,

Tarlika Elisabeth Schmitz



view thread (11+ messages)  latest in thread

Message-ID: <45F81015.20101@numerixtechnology.de>
Permalink:  ../45F81015.20101@numerixtechnology.de/
Also on:    postgresql.org/message-id/45F81015.20101@numerixtechnology.de

 · 

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: <45F81015.20101@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