Newbie trying to load table with data...

From: Kurt Gunderson <kgunders(at)cbnlottery(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Newbie trying to load table with data...
Date: 2002-08-13 18:41:55
Message-ID: 3D5952F3.5090805@cbnlottery.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

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...

<FIRST>
test1=> COPY k_device FROM '/home/kurt/data/sql.device.d' USING
DELIMITERS '|';

ERROR: You must have Postgres superuser privilege to do a COPY directly
to or from a file. Anyone can COPY to stdout or from stdin. Psql's
\copy command also works for anyone.
<\FIRST>

Okay so I am not the postgres superuser (nor can I ever be) so I try the
\copy command and 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.

K.

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Chris Clifton 2002-08-13 20:19:32 unsubscribe
Previous Message Chad Thompson 2002-08-12 19:35:15 Distinct On