Re: simple COPY FROM issue

From: Sam Mason <sam(at)samason(dot)me(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: simple COPY FROM issue
Date: 2008-11-13 18:13:54
Message-ID: 20081113181354.GU2459@frubble.xen.chris-lamb.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Nov 13, 2008 at 10:18:56AM -0500, Kevin Duffy wrote:
> This worked where E: is on the database server
> copy imagineoptions
> from 'E:\\ORGDAT~1\\data\\xxxPositions\\20081112_Options.csv'
> DELIMITERS ',' CSV ;
>
>
> This does not work fileprint-01 is a different server.
> copy imagineoptions
> from
> \\fileprint-01\Company\xxx\Benchmarking\xxxPositions\20081112_Options.cs
> v
> DELIMITERS ',' CSV ;

Is this exactly what you entered? if it is, you're missing quotes and
escaping. You probably want something more similar to this:

COPY imagineoptions
FROM E'\\\\fileprint-01\\Company\\xxx\\Benchmarking\\xxxPositions\20081112_Options.csv'
WITH CSV;

> So the COPY FROM command in Postgres can not handle a URL

Postgres doesn't handle URL's, but that's not what you entered. At
most, you entered a UNC path (I believe, it's been a *long* time since I
had to deal with these under windows) and not a URL. UNC paths always
used to be handled transparently by the operating system and didn't need
any special handling from normal processes, e.g. a Postgres server.

If you could enter the command exactly as you entered it and also
include the response back from the server that may help to narrow things
down a bit.

Sam

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2008-11-13 18:15:18 Re: sort_mem param of postgresql.conf
Previous Message Tom Lane 2008-11-13 17:47:08 Re: still gin index creation takes forever