Re: Newbie trying to load table with data...

Поиск
Список
Период
Сортировка
От Oliver Elphick
Тема Re: Newbie trying to load table with data...
Дата
Msg-id 1029273809.1353.630.camel@linda
обсуждение исходный текст
Ответ на Newbie trying to load table with data...  (Kurt Gunderson <kgunders@cbnlottery.com>)
Список pgsql-novice
On Tue, 2002-08-13 at 19:41, Kurt Gunderson wrote:
> Sorry guys, I am new to Postgresql and have exhausted my reading
> material.  I am trying to load a "k_device" table with records from an
> pipe-delimited ascii file ("/home/kurt/data/sql.device.d").  In psql, I
> get the following...

> <SECOND>
> test1=> \copy "k_device" from "/home/kurt/data/sql.device.d" with
> delimiters '|'
>
> \copy: parse error at 'delimiters'
> <\SECOND>
>
> and...
>
> <THIRD>
> test1=> \copy "k_device" from "/home/kurt/data/sql.device.d" using
> delimiters '|'
>
> "/home/kurt/data/sql.device.d": No such file or directory
> <\THIRD>
>
> What am I doing wrong?  Please help.

You're using the wrong kind of quotes.  The filepath must be in single
quotes:

  \copy k_device from '/home/kurt/data/sql.device.d' using delimiters '|'

--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight, UK
http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "Watch ye therefore, and pray always, that ye may be
      accounted worthy to escape all these things that shall
      come to pass, and to stand before the Son of man."
                               Luke 21:36


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Newbie trying to load table with data...
Следующее
От: Tom Lane
Дата:
Сообщение: Re: I need to know password for postgres