Thread: i am getting error when i am using copy command

i am getting error when i am using copy command

From
"Penchalaiah P."
Date:
<div class="Section1"><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial">Hi ..</span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial"> </span></font><p class="MsoNormal" style="margin-left:.5in;text-indent:-.25in;mso-list:l0 level1
lfo1"><fontface="Arial" size="2"><span style="font-size:10.0pt;font-family:Arial"><span style="mso-list:Ignore">1)<font
face="TimesNew Roman" size="1"><span style="font:7.0pt "Times New Roman"">      
</span></font></span></span></font><fontface="Arial" size="2"><span style="font-size:10.0pt;font-family:Arial">I
createdone table</span></font><p class="MsoNormal" style="margin-left:.5in;text-indent:-.25in;mso-list:l0 level1
lfo1"><fontface="Arial Black" size="2"><span style="font-size:10.0pt;font-family:"Arial Black""><span
style="mso-list:Ignore">2)<fontface="Times New Roman" size="1"><span style="font:7.0pt "Times New Roman"">    
</span></font></span></span></font><fontface="Arial Black" size="2"><span style="font-size:10.0pt;font-family:"Arial
Black"">Createtable penchal(id integer, name varchar(12),age integer);</span></font><p class="MsoNormal"
style="margin-left:.5in;text-indent:-.25in;mso-list:l0level1 lfo1"><font face="Arial" size="2"><span
style="font-size:10.0pt;font-family:Arial"><spanstyle="mso-list:Ignore">3)<font face="Times New Roman" size="1"><span
style="font:7.0pt"Times New Roman"">       </span></font></span></span></font><font face="Arial" size="2"><span
style="font-size:10.0pt;font-family:Arial">ThenI inserted some values into this table………</span></font><p
class="MsoNormal"style="margin-left:.5in;text-indent:-.25in;mso-list:l0 level1 lfo1"><font face="Arial Black"
size="2"><spanstyle="font-size:10.0pt;font-family:"Arial Black""><span style="mso-list:Ignore">4)<font face="Times New
Roman"size="1"><span style="font:7.0pt "Times New Roman"">     </span></font></span></span></font><font face="Arial
Black"size="2"><span style="font-size:10.0pt;font-family:"Arial Black"">Insert into penchal
values(1,’reddy’,2);</span></font><pclass="MsoNormal" style="margin-left:.5in;text-indent:-.25in;mso-list:l0 level1
lfo1"><fontface="Arial" size="2"><span style="font-size:10.0pt;font-family:Arial"><span style="mso-list:Ignore">5)<font
face="TimesNew Roman" size="1"><span style="font:7.0pt "Times New Roman"">      
</span></font></span></span></font><fontface="Arial" size="2"><span style="font-size:10.0pt;font-family:Arial">Select *
frompenchal ; I used this statement to display the values in a table</span></font><p class="MsoNormal"
style="margin-left:.5in;text-indent:-.25in;mso-list:l0level1 lfo1"><font face="Arial" size="2"><span
style="font-size:10.0pt;font-family:Arial"><spanstyle="mso-list:Ignore">6)<font face="Times New Roman" size="1"><span
style="font:7.0pt"Times New Roman"">       </span></font></span></span></font><font face="Arial" size="2"><span
style="font-size:10.0pt;font-family:Arial">FinalyI want to use </span></font><font face="Arial Black" size="2"><span
style="font-size:
10.0pt;font-family:"Arial Black"">copy ….</span></font><font face="Arial" size="2"><span
style="font-size:10.0pt;font-family:Arial"></span></font><pclass="MsoNormal"
style="margin-left:.5in;text-indent:-.25in;mso-list:l0level1 lfo1"><font face="Arial" size="2"><span
style="font-size:10.0pt;font-family:Arial"><spanstyle="mso-list:Ignore">7)<font face="Times New Roman" size="1"><span
style="font:7.0pt"Times New Roman"">       </span></font></span></span></font><font face="Arial" size="2"><span
style="font-size:10.0pt;font-family:Arial">ButI am getting error when I am using this copy statement</span></font><p
class="MsoNormal"style="margin-left:.25in"><font face="Arial" size="2"><span
style="font-size:10.0pt;font-family:Arial"> </span></font><pclass="MsoNormal" style="margin-left:.25in"><font
face="ArialBlack" size="2"><span style="font-size:10.0pt;font-family:"Arial Black"">Copy penchal to
‘/tmp/penchal.out’</span></font><pclass="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt; 
font-family:Arial">When I am using this statement I am getting error is :   could not open file </span></font><font
face="ArialBlack" size="2"><span style="font-size:10.0pt;font-family:"Arial Black"">‘/tmp/penchal.out’ 
</span></font><fontface="Arial" size="2"><span style="font-size:10.0pt;font-family: 
Arial">for writing: no such file or directory..</span></font><p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:10.0pt;
font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial"> May I know y I am getting this error…….. pls any one can help me for this..</span></font><p
class="MsoNormal"style="mso-margin-top-alt:auto;margin-bottom:5.0pt"><b><font color="navy" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;
color:navy;font-weight:bold">Thanks  &  Regards</span></font><font color="navy"><span
style="color:navy"></span></font></b><pclass="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:5.0pt"><b><font
color="navy"face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma; 
color:navy;font-weight:bold">Penchal reddy </span></font></b><b><font color="red" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;
color:red;font-weight:bold">|</span></font></b><b><font color="navy" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:navy;
font-weight:bold"> Software Engineer           </span></font><font color="navy"><span
style="color:navy"></span></font></b><pclass="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:5.0pt"><b><font
color="navy"face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma; 
color:navy;font-weight:bold">Infinite Computer Solutions </span></font></b><b><font color="red" face="Tahoma"
size="1"><spanstyle="font-size:8.0pt;font-family:Tahoma; 
color:red;font-weight:bold">|</span></font></b><b><font color="navy" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:navy;
font-weight:bold"> Exciting Times…Infinite Possibilities... </span></font><font color="navy"><span
style="color:navy"></span></font></b><pclass="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:5.0pt"><b><font
color="navy"face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma; 
color:navy;font-weight:bold">SEI-CMMI level 5 </span></font></b><b><font color="red" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;
color:red;font-weight:bold">| </span></font></b><b><font color="black" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:black;
font-weight:bold">ISO 9001:2000</span></font><font color="navy"><span style="color:navy"></span></font></b><p
class="MsoNormal"style="mso-margin-top-alt:auto;margin-bottom:5.0pt"><b><font color="navy" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;
color:navy;font-weight:bold">IT SERVICES </span></font></b><b><font color="red" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;
color:red;font-weight:bold">|</span></font></b><b><font color="navy" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:navy;
font-weight:bold">
BPO                                                                                                                                                                          
</span></font><fontcolor="navy"><span style="color:navy"></span></font></b><p class="MsoNormal"
style="mso-margin-top-alt:auto;margin-bottom:5.0pt"><b><fontcolor="navy" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;
color:navy;font-weight:bold">Telecom </span></font></b><b><font color="red" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;
color:red;font-weight:bold">|</span></font></b><b><font color="navy" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:navy;
font-weight:bold"> </span></font></b><b><font color="black" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:black;font-weight:bold">Finance</span></font></b><b><font color="red"
face="Tahoma"size="1"><span style="font-size: 
8.0pt;font-family:Tahoma;color:red;font-weight:bold">|</span></font></b><b><font color="navy" face="Tahoma"
size="1"><spanstyle="font-size:8.0pt;font-family:Tahoma; 
color:navy;font-weight:bold"> </span></font></b><b><font color="black" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:black;
font-weight:bold">Healthcare </span></font></b><b><font color="red" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:red;
font-weight:bold">| </span></font></b><b><font color="black" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:black;font-weight:bold">Manufacturing</span></font></b><b><font
color="red"face="Tahoma" size="1"><span style="font-size: 
8.0pt;font-family:Tahoma;color:red;font-weight:bold">|</span></font></b><b><font color="navy" face="Tahoma"
size="1"><spanstyle="font-size:8.0pt;font-family:Tahoma; 
color:navy;font-weight:bold"> </span></font></b><b><font color="black" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:black;
font-weight:bold">Energy & Utilities </span></font></b><b><font color="red" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;
color:red;font-weight:bold">|</span></font></b><b><font color="navy" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:navy;
font-weight:bold"> </span></font></b><b><font color="black" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:black;font-weight:bold">Retail& Distribution
</span></font></b><b><fontcolor="red" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:red;font-weight:bold">|</span></font></b><b><fontcolor="navy"
face="Tahoma"size="1"><span style="font-size:8.0pt;font-family:Tahoma; 
color:navy;font-weight:bold"> </span></font></b><b><font color="black" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:black;
font-weight:bold">Government                                                        </span></font><font
color="navy"><spanstyle="color:navy"></span></font></b><p class="MsoNormal"
style="mso-margin-top-alt:auto;margin-bottom:5.0pt"><b><fontcolor="navy" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;
color:navy;font-weight:bold">Tel +91-80-4133-0000(Ext:503)</span></font></b><b><font color="red" face="Tahoma"
size="1"><spanstyle="font-size:8.0pt;font-family:Tahoma; 
color:red;font-weight:bold">|</span></font></b><b><font color="navy" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:navy;
font-weight:bold"> Fax  +91-80-51930009 </span></font></b><b><font color="red" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;
color:red;font-weight:bold">|</span></font></b><b><font color="navy" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:navy;
font-weight:bold"> Cell No  +91-9886774209</span></font></b><b><font color="red" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;
color:red;font-weight:bold">|</span></font></b><b><font color="navy" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:navy;
font-weight:bold">www.infics.com</span></font></b><b><font color="black" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:black;
font-weight:bold">          </span></font><font color="navy"><span style="color:navy"></span></font></b><p
class="MsoNormal"style="mso-margin-top-alt:auto;margin-bottom:5.0pt"><b><font color="gray" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;
color:gray;font-weight:bold">Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and/
orits Customers and is intended for use only by the individual or entity to which it is addressed, and may contain
informationthat is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended
recipientor it appears that this mail has been forwarded to you without proper authority, you are notified that any use
ordissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately
at</span></font></b><b><fontcolor="black" face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma; 
color:black;font-weight:bold"> </span></font></b><b><u><font color="gray" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:gray;
font-weight:bold">info.in@infics.com </span></font></u></b><b><font color="gray" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;
color:gray;font-weight:bold">and delete this mail from your records.</span></font><font color="navy"><span
style="color:navy"></span></font></b><pclass="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 
12.0pt"> </span></font></div>

Re: i am getting error when i am using copy command

From
Markus Schaber
Date:
Hi, Penchalaiah,

Penchalaiah P. wrote:

> Copy penchal to ‘/tmp/penchal.out’
> 
> When I am using this statement I am getting error is :   could not open
> file ‘/tmp/penchal.out’  for writing: no such file or directory..

It seems that the /tmp directory is missing from your system.

This can have two causes, IMHO: You either have a _totally broken_
un*x[1] installation, or you run on Windows or another platform that has
different file naming conventions.


HTH,
Markus



[1] un*x is a shortcut for all unixoid operating systems, including BSD,
Linux and even MacOS X.

-- 
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org


Re: i am getting error when i am using copy command

From
Andrew Sullivan
Date:
On Wed, May 03, 2006 at 10:02:37AM +0200, Markus Schaber wrote:

> > file ?/tmp/penchal.out?  for writing: no such file or directory..
> 
> It seems that the /tmp directory is missing from your system.

Right.  And notice that the "your system" here is the _server_, not
the machine you're running psql from.  If you want local files, you
need to use \copy instead.

A

-- 
Andrew Sullivan  | ajs@crankycanuck.ca
It is above all style through which power defers to reason.    --J. Robert Oppenheimer


Re: i am getting error when i am using copy command

From
"Ben K."
Date:
> file '/tmp/penchal.out'  for writing: no such file or directory..

_IF_ you're on linux it could be due to selinux. setenforce 0 might solve 
the problem tempoarily. I would assume there should've been some existing 
discussion threads. (setenforce 1 afterwards.)

Regards,

Ben K.


Re: i am getting error when i am using copy command

From
"gourish singbal"
Date:
 
Penchal,
 
 
Is /tmp folder present and is the postgres user having read/write file permissions in /tmp folder.
I was successfully able to copy a table to a file in /tmp folder on my machine .
 
Regards,
Gourish Singbal
Software Engineer
ZEDO Inc - Customer-Fit Ad Serving Worldwide.
gourish@ZEDO.com
----- Original Message -----
Sent: Wednesday, May 03, 2006 11:01 AM
Subject: [SQL] i am getting error when i am using copy command

Hi ..

 

1)       I created one table

2)     Create table penchal(id integer, name varchar(12),age integer);

3)       Then I inserted some values into this table………

4)     Insert into penchal values(1,’reddy’,2);

5)       Select * from penchal ; I used this statement to display the values in a table

6)       Finaly I want to use copy ….

7)       But I am getting error when I am using this copy statement

 

Copy penchal to ‘/tmp/penchal.out’

When I am using this statement I am getting error is :   could not open file ‘/tmp/penchal.out’  for writing: no such file or directory..

 

 May I know y I am getting this error…….. pls any one can help me for this..

Thanks  &  Regards

Penchal reddy | Software Engineer           

Infinite Computer Solutions | Exciting Times…Infinite Possibilities...

SEI-CMMI level 5 | ISO 9001:2000

IT SERVICES | BPO                                                                                                                                                                          

Telecom | Finance | Healthcare | Manufacturing | Energy & Utilities | Retail & Distribution | Government                                                       

Tel +91-80-4133-0000(Ext:503)| Fax  +91-80-51930009 | Cell No  +91-9886774209|www.infics.com          

Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and/ or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at info.in@infics.com and delete this mail from your records.