pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
using psql copy command
3+ messages / 2 participants
[nested] [flat]

* using psql copy command
@ 2004-11-08 23:44 David Bear <David.Bear@asu.edu>
  2004-11-09 00:01 ` Re: using psql copy command Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 3+ messages in thread

From: David Bear @ 2004-11-08 23:44 UTC (permalink / raw)
  To: postgresql@moroni.pp.asu.edu; pgsql-admin

I'm getting fairly frustrated here. I'm trying to populate a table
using psql copy command. The file lives in the client machine where
psql is running, not on the back end. I assume from the readings that
I can you the \copy command to get to data in my clients file system.
Yet, its not working.. Here are  the commands:

iddwb@moroni:~/data/copp/dev/npcenter> ls -l
total 231
-rw-r--r--    1 3117  iddwb  88979 2004-11-08 16:32 contactName.txt
-rw-------    1 3117  iddwb  145024 2004-11-08 16:09 tblContactNames.txt

iddwb@moroni:~/data/copp/dev/npcenter> 
psql -p 5432 -h localhost npcenter -U david

npcenter=> \copy "contactName" from "/home/iddwb/data/copp/dev/npcenter/contact
Name.txt"
"/home/iddwb/data/copp/dev/npcenter/contactName.txt": No such file or
directory

npcenter=> \copy "contactName" from "./contactName.txt" 
"./contactName.txt": No such file or directory
npcenter=>

I must be missing something very obvious.. Help...

-- 
David Bear
phone: 	480-965-8257
fax: 	480-965-9189
College of Public Programs/ASU
Wilson Hall 232
Tempe, AZ 85287-0803
 "Beware the IP portfolio, everyone will be suspect of trespassing"



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: using psql copy command
  2004-11-08 23:44 using psql copy command David Bear <David.Bear@asu.edu>
@ 2004-11-09 00:01 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2004-11-09 00:01 UTC (permalink / raw)
  To: David.Bear@asu.edu; +Cc: postgresql@moroni.pp.asu.edu; pgsql-admin

David Bear <David.Bear@asu.edu> writes:
> npcenter=> \copy "contactName" from "/home/iddwb/data/copp/dev/npcenter/contactName.txt"
> "/home/iddwb/data/copp/dev/npcenter/contactName.txt": No such file or
> directory

> I must be missing something very obvious.. Help...

Use single quotes, or none at all, around the filename.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* using psql \copy command
@ 2004-11-08 23:47 David Bear <David.Bear@asu.edu>
  0 siblings, 0 replies; 3+ messages in thread

From: David Bear @ 2004-11-08 23:47 UTC (permalink / raw)
  To: pgsql-admin


I'm getting fairly frustrated here. I'm trying to populate a table
using psql copy command. The file lives in the client machine where
psql is running, not on the back end. I assume from the readings that
I can you the \copy command to get to data in my clients file system.
Yet, its not working.. Here are  the commands:

iddwb@moroni:~/data/copp/dev/npcenter> ls -l
total 231
-rw-r--r--    1 3117  iddwb  88979 2004-11-08 16:32 contactName.txt
-rw-------    1 3117  iddwb  145024 2004-11-08 16:09 tblContactNames.txt

iddwb@moroni:~/data/copp/dev/npcenter> 
psql -p 5432 -h localhost npcenter -U david

npcenter=> \copy "contactName" from "/home/iddwb/data/copp/dev/npcenter/contact
Name.txt"
"/home/iddwb/data/copp/dev/npcenter/contactName.txt": No such file or
directory

npcenter=> \copy "contactName" from "./contactName.txt" 
"./contactName.txt": No such file or directory
npcenter=>

I must be missing something very obvious.. Help...

-- 
David Bear
phone: 	480-965-8257
fax: 	480-965-9189
College of Public Programs/ASU
Wilson Hall 232
Tempe, AZ 85287-0803
 "Beware the IP portfolio, everyone will be suspect of trespassing"




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2004-11-09 00:01 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-11-08 23:44 using psql copy command David Bear <David.Bear@asu.edu>
2004-11-09 00:01 ` Tom Lane <tgl@sss.pgh.pa.us>
2004-11-08 23:47 using psql \copy command David Bear <David.Bear@asu.edu>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox