Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id F32119FB793 for ; Wed, 14 Mar 2007 12:09:32 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 16071-03 for ; Wed, 14 Mar 2007 12:09:22 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from zebedee.cranntara.net (zebedee.cranntara.net [91.186.7.79]) by postgresql.org (Postfix) with ESMTP id B29369FB97D for ; Wed, 14 Mar 2007 12:09:22 -0300 (ADT) Received: from dial-dynamic-62-69-37-154.surfdial.murphx.net ([62.69.37.154] helo=bolek.coachhouse) by zebedee.cranntara.net with esmtpsa (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.62) (envelope-from ) id 1HRV6M-0002de-PB for pgsql-sql@postgresql.org; Wed, 14 Mar 2007 15:09:19 +0000 Received: from [192.168.0.32] (helo=[192.168.0.32]) by bolek.coachhouse with esmtp (Exim 4.50) id 1HRV6D-0004xu-K4 for pgsql-sql@postgresql.org; Wed, 14 Mar 2007 15:09:09 +0000 Message-ID: <45F81015.20101@numerixtechnology.de> Date: Wed, 14 Mar 2007 15:09:09 +0000 From: T E Schmitz Reply-To: pgsql-sql@postgresql.org User-Agent: Debian Thunderbird 1.0.7 (X11/20051017) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Re: import CSV file References: <45F70BC9.801@numerixtechnology.de> <20070313182740.ef40e742.darcy@druid.net> <45F73742.2080505@numerixtechnology.de> <45F80A81.3010900@numerixtechnology.de> In-Reply-To: <45F80A81.3010900@numerixtechnology.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/196 X-Sequence-Number: 27834 T E Schmitz wrote: > Rodrigo De León wrote: > >> On 3/13/07, T E Schmitz 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