Re: simple COPY FROM issue

Поиск
Список
Период
Сортировка
От Sam Mason
Тема Re: simple COPY FROM issue
Дата
Msg-id 20081113181354.GU2459@frubble.xen.chris-lamb.co.uk
обсуждение исходный текст
Ответ на Re: simple COPY FROM issue  ("Kevin Duffy" <KD@wrinvestments.com>)
Список 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

В списке pgsql-general по дате отправления:

Предыдущее
От: Christian Schröder
Дата:
Сообщение: Re: Database recovery
Следующее
От: "Scott Marlowe"
Дата:
Сообщение: Re: sort_mem param of postgresql.conf