dbTalk Databases Forums  

[BUGS] BUG #1456: COPY FROM error

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #1456: COPY FROM error in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Pascal Van Puymbroeck
 
Posts: n/a

Default [BUGS] BUG #1456: COPY FROM error - 02-02-2005 , 11:28 PM







The following bug has been logged online:

Bug reference: 1456
Logged by: Pascal Van Puymbroeck
Email address: pascal.vanpuymbroeck (AT) zenonproductions (DOT) be
PostgreSQL version: 8.0.1
Operating system: Windows 2000
Description: COPY FROM error
Details:

The COPY table FROM command works fine as long as you use drives local to
the machine like c: or e: , but when you try to use the command with a
network drive mapped to o: for eaxmple, you get a 'could not open file for
reading: invalid argument' error.

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply With Quote
  #2  
Old   
Magnus Hagander
 
Posts: n/a

Default Re: [BUGS] BUG #1456: COPY FROM error - 02-03-2005 , 08:09 AM






Quote:
The following bug has been logged online:
=20
Bug reference: 1456
Logged by: Pascal Van Puymbroeck
Email address: pascal.vanpuymbroeck (AT) zenonproductions (DOT) be
PostgreSQL version: 8.0.1
Operating system: Windows 2000
Description: COPY FROM error
Details:=20
=20
The COPY table FROM command works fine as long as you use=20
drives local to the machine like c: or e: , but when you try=20
to use the command with a network drive mapped to o: for=20
eaxmple, you get a 'could not open file for
reading: invalid argument' error.
This is to be expected - the server runs with it's own user account, and
as such it won't have access to your profile with it's mapped drives.
Your solutions are:

*) Use an UNC mapped path (\\server\share\dir\file). This will require
either postgresql running as a domain account, or anonymous SMB (which
you *really* should have turned off)

*) use psql's \copy command. This one will write the file from the
client, and using your own windows account, so it shuold work fine with
mapped drives. This is what I'd recommend if you're doing one-off loads,
but it might be a bit trickier if you want it integrated in an app.


//Magnus

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.