Re: COPY permissions problem - Windows XP - Mailing list pgadmin-support
From | Nolen, Terry |
---|---|
Subject | Re: COPY permissions problem - Windows XP |
Date | |
Msg-id | 5A54B96160B52743A7F71ABD4170A64A03556C45@sghdqms02.Global.ad.sabre.com Whole thread Raw |
In response to | COPY permissions problem - Windows XP ("Nolen, Terry" <Terry.Nolen@sabre.com>) |
Responses |
Re: COPY permissions problem - Windows XP
|
List | pgadmin-support |
<div class="Section1"><p class="MsoPlainText"><font face="Courier New" size="2"><span style="font-size: 10.0pt">Jim, </span></font><p class="MsoPlainText"><font face="Courier New" size="2"><span style="font-size: 10.0pt">First of all, thanks for your fast response. I'm doing a benchmark and your quick turn around will be noted in myfindings.</span></font><p class="MsoPlainText"><font face="Courier New" size="2"><span style="font-size: 10.0pt"> </span></font><p class="MsoPlainText"><font face="Courier New" size="2"><span style="font-size: 10.0pt">I'm trying to use the COPY command. I've tried executing it using pgadmin and pgsql and receive the same messageabout no read permissions. Here is the syntax?</span></font><p class="MsoPlainText"><font face="Courier New" size="2"><spanstyle="font-size: 10.0pt"> </span></font><p class="MsoPlainText"><font face="Courier New" size="2"><span style="font-size: 10.0pt">COPY as_benchmark.midt FROM 'C:/postgres_data/midt_short.csv' WITH CSV</span></font><p class="MsoPlainText"><fontface="Courier New" size="2"><span style="font-size: 10.0pt"> </span></font><p class="MsoPlainText"><font face="Courier New" size="2"><span style="font-size: 10.0pt">Here is the error I receive.</span></font><p class="MsoPlainText"><b><font face="Courier New" size="2"><span style="font-size:10.0pt;font-weight:bold">ERROR: could not open file "c:/postgres_data/midt_short.csv" for reading: Permissiondenied</span></font></b><p class="MsoPlainText"><font face="Courier New" size="2"><span style="font-size: 10.0pt"> </span></font><p class="MsoPlainText"><font face="Courier New" size="2"><span style="font-size: 10.0pt">I understand that postgres must have access, but how do I make sure it is granted in Windows?</span></font><p class="MsoPlainText"><fontface="Courier New" size="2"><span style="font-size: 10.0pt"> </span></font><p class="MsoPlainText"><font face="Courier New" size="2"><span style="font-size: 10.0pt">Fyi...the use of "/" or "\\" in Windows could use some documentation explaining the acceptable ways to use them.</span></font><pclass="MsoPlainText"><font face="Courier New" size="2"><span style="font-size: 10.0pt"> </span></font><p class="MsoPlainText"><font face="Courier New" size="2"><span style="font-size: 10.0pt">Thx again,</span></font><p class="MsoPlainText"><font face="Courier New" size="2"><span style="font-size: 10.0pt">Terry Nolen</span></font><p class="MsoPlainText"><font face="Courier New" size="2"><span style="font-size: 10.0pt"> </span></font><p class="MsoPlainText"><font face="Courier New" size="2"><span style="font-size: 10.0pt">-----Original Message-----<br /> From: Jim C. Nasby [mailto:decibel@decibel.org] <br /> Sent: Wednesday, December21, 2005 7:10 PM<br /> To: Nolen, Terry<br /> Cc: pgadmin-support@postgresql.org<br /> Subject: Re: [pgadmin-support]COPY permissions problem - Windows XP</span></font><p class="MsoPlainText"><font face="Courier New" size="2"><spanstyle="font-size: 10.0pt"> </span></font><p class="MsoPlainText"><font face="Courier New" size="2"><span style="font-size: 10.0pt">On Wed, Dec 21, 2005 at 04:32:17PM -0600, Nolen, Terry wrote:</span></font><p class="MsoPlainText"><font face="CourierNew" size="2"><span style="font-size: 10.0pt">> I'm new to postgresql and I'm trying to test the copy command with a csv</span></font><p class="MsoPlainText"><fontface="Courier New" size="2"><span style="font-size: 10.0pt">> file. I keep getting an error which states that I don't have read</span></font><p class="MsoPlainText"><fontface="Courier New" size="2"><span style="font-size: 10.0pt">> permissions.</span></font><p class="MsoPlainText"><font face="Courier New" size="2"><span style="font-size: 10.0pt">> </span></font><p class="MsoPlainText"><font face="Courier New" size="2"><span style="font-size: 10.0pt">> My database is owned by postgres, and I'm signed in as postgres. The</span></font><p class="MsoPlainText"><fontface="Courier New" size="2"><span style="font-size: 10.0pt">> table that I'm placing the data into has a different owner. I've tried</span></font><p class="MsoPlainText"><fontface="Courier New" size="2"><span style="font-size: 10.0pt">> changing privileges in windows to allow all access to everyone on this</span></font><p class="MsoPlainText"><fontface="Courier New" size="2"><span style="font-size: 10.0pt">> machine access. I've even shared the machine with external users. I've</span></font><p class="MsoPlainText"><fontface="Courier New" size="2"><span style="font-size: 10.0pt">> move the file to different directorys and created a tablespace with my</span></font><p class="MsoPlainText"><fontface="Courier New" size="2"><span style="font-size: 10.0pt">> new table in it, into the postgres data directory.</span></font><p class="MsoPlainText"><font face="CourierNew" size="2"><span style="font-size: 10.0pt">> </span></font><p class="MsoPlainText"><font face="Courier New" size="2"><span style="font-size: 10.0pt">> I see this type of error on many boards, but they tend to be with a</span></font><p class="MsoPlainText"><fontface="Courier New" size="2"><span style="font-size: 10.0pt">> flavor of unix. I'm really not getting the premise behind what is going</span></font><p class="MsoPlainText"><fontface="Courier New" size="2"><span style="font-size: 10.0pt">> on and why. Could you please assist?</span></font><p class="MsoPlainText"><font face="Courier New" size="2"><spanstyle="font-size: 10.0pt"> </span></font><p class="MsoPlainText"><font face="Courier New" size="2"><span style="font-size: 10.0pt">We need to know exactly what command you're trying to run, if it's in</span></font><p class="MsoPlainText"><fontface="Courier New" size="2"><span style="font-size: 10.0pt">psql or something else, and the exact error message.</span></font><p class="MsoPlainText"><font face="Courier New"size="2"><span style="font-size: 10.0pt">-- </span></font><p class="MsoPlainText"><font face="Courier New" size="2"><span style="font-size: 10.0pt">Jim C. Nasby, Database Architect decibel@decibel.org </span></font><p class="MsoPlainText"><font face="CourierNew" size="2"><span style="font-size: 10.0pt">Give your computer some brain candy! www.distributed.net Team #1828</span></font><p class="MsoPlainText"><font face="CourierNew" size="2"><span style="font-size: 10.0pt"> </span></font><p class="MsoPlainText"><font face="Courier New" size="2"><span style="font-size: 10.0pt">Windows: "Where do you want to go today?"</span></font><p class="MsoPlainText"><font face="Courier New" size="2"><spanstyle="font-size: 10.0pt">Linux: "Where do you want to go tomorrow?"</span></font><p class="MsoPlainText"><font face="Courier New" size="2"><spanstyle="font-size: 10.0pt">FreeBSD: "Are you guys coming, or what?"</span></font></div>
pgadmin-support by date: