Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id D458F9FB385 for ; Tue, 13 Mar 2007 20:50:47 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 59589-01-7 for ; Tue, 13 Mar 2007 20:50:36 -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 7C90B9FB6A8 for ; Tue, 13 Mar 2007 20:50:41 -0300 (ADT) Received: from dial-dynamic-62-69-36-139.surfdial.murphx.net ([62.69.36.139] helo=bolek.coachhouse) by zebedee.cranntara.net with esmtpsa (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.62) (envelope-from ) id 1HRGl8-00027Z-Op; Tue, 13 Mar 2007 23:50:37 +0000 Received: from [192.168.0.32] (helo=[192.168.0.32]) by bolek.coachhouse with esmtp (Exim 4.50) id 1HRGjT-0003oH-Gn; Tue, 13 Mar 2007 23:48:43 +0000 Message-ID: <45F7385B.7090901@numerixtechnology.de> Date: Tue, 13 Mar 2007 23:48:43 +0000 From: T E Schmitz Reply-To: mailreg@numerixtechnology.de User-Agent: Debian Thunderbird 1.0.7 (X11/20051017) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jure Kodzoman CC: pgsql-sql@postgresql.org Subject: Re: import CSV file References: <45F70BC9.801@numerixtechnology.de> <1173825351.5564.2.camel@localhost.localdomain> In-Reply-To: <1173825351.5564.2.camel@localhost.localdomain> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200703/187 X-Sequence-Number: 27825 Jure Kodzoman wrote: > On Tue, 2007-03-13 at 20:38 +0000, T E Schmitz wrote: > >>I am trying to batch-load a tab-separated CSV file: >> >>psql -h lolek -U tes -d stockmarket -c "copy history from >>'/tmp/FTSE.csv' CSV"; >> >>ERROR: could not open file "/tmp/FTSE.csv" for reading: No such file or >>directory >> >>The file exists. Do I need to escape the quotes? >> > > > Try setting the permissions chmod a+r /tmp/FTSE.csv > The problem was indeed that COPY was expecting the file on the server. -- Regards, Tarlika Elisabeth Schmitz