pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
i am getting error when i am using copy command
6+ messages / 5 participants
[nested] [flat]

* i am getting error when i am using copy command
@ 2006-05-03 05:31  Penchalaiah P. <penchalaiahp@infics.com>
  0 siblings, 3 replies; 6+ messages in thread

From: Penchalaiah P. @ 2006-05-03 05:31 UTC (permalink / raw)
  To: pgsql-sql

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.

 

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

* Re: i am getting error when i am using copy command
@ 2006-05-03 06:04  gourish singbal <gsingbal@zedo.com>
  parent: Penchalaiah P. <penchalaiahp@infics.com>
  2 siblings, 0 replies; 6+ messages in thread

From: gourish singbal @ 2006-05-03 06:04 UTC (permalink / raw)
  To: Penchalaiah P. <penchalaiahp@infics.com>; pgsql-sql


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 ----- 
  From: Penchalaiah P. 
  To: pgsql-sql@postgresql.org 
  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.

   

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

* Fw: i am getting error when i am using copy command
@ 2006-05-03 06:21  gourish singbal <gsingbal@zedo.com>
  0 siblings, 0 replies; 6+ messages in thread

From: gourish singbal @ 2006-05-03 06:21 UTC (permalink / raw)
  To: pgsql-sql


Penchal,

The ERROR u mentioned in your earlier email describes itself . It says your
"could not open file '/tmp/penchal.out'  for writing: no such file or directory.."

I used the same command you used :-
Copy <table_name> to '/tmp/filename.out'


So i suggest that u check if ur able to write/read files in /tmp folder.. 
also you can use /home/postgres folder ?.

NOTE: please do not send personnel email . email to group .

Regards,
Gourish Singbal
Software Engineer
ZEDO Inc - Customer-Fit Ad Serving Worldwide.
gourish@ZEDO.com
----- Original Message ----- 
From: Penchalaiah P. 
To: gourish singbal 
Sent: Wednesday, May 03, 2006 11:46 AM
Subject: RE: [SQL] i am getting error when i am using copy command


How can u copy .. Did u see wt error am I getting... tell me the syntax to create that copy commnad

 


--------------------------------------------------------------------------------

From: gourish singbal [mailto:gsingbal@zedo.com] 
Sent: Wednesday, May 03, 2006 11:34 AM
To: Penchalaiah P.; pgsql-sql@postgresql.org
Subject: Re: [SQL] i am getting error when i am using copy command

 

 

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

  From: Penchalaiah P. 

  To: pgsql-sql@postgresql.org 

  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.

   

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

* Re: i am getting error when i am using copy command
@ 2006-05-03 08:02  Markus Schaber <schabi@logix-tt.com>
  parent: Penchalaiah P. <penchalaiahp@infics.com>
  2 siblings, 1 reply; 6+ messages in thread

From: Markus Schaber @ 2006-05-03 08:02 UTC (permalink / raw)
  To: Penchalaiah P. <penchalaiahp@infics.com>; +Cc: pgsql-sql

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



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

* Re: i am getting error when i am using copy command
@ 2006-05-03 12:02  Andrew Sullivan <ajs@crankycanuck.ca>
  parent: Markus Schaber <schabi@logix-tt.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Andrew Sullivan @ 2006-05-03 12:02 UTC (permalink / raw)
  To: pgsql-sql

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



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

* Re: i am getting error when i am using copy command
@ 2006-05-03 13:12  Ben K. <bkim@coe.tamu.edu>
  parent: Penchalaiah P. <penchalaiahp@infics.com>
  2 siblings, 0 replies; 6+ messages in thread

From: Ben K. @ 2006-05-03 13:12 UTC (permalink / raw)
  To: Penchalaiah P. <penchalaiahp@infics.com>; +Cc: pgsql-sql

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



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


end of thread, other threads:[~2006-05-03 13:12 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-05-03 05:31 i am getting error when i am using copy command Penchalaiah P. <penchalaiahp@infics.com>
2006-05-03 06:04 ` gourish singbal <gsingbal@zedo.com>
2006-05-03 08:02 ` Markus Schaber <schabi@logix-tt.com>
2006-05-03 12:02   ` Andrew Sullivan <ajs@crankycanuck.ca>
2006-05-03 13:12 ` Ben K. <bkim@coe.tamu.edu>
2006-05-03 06:21 Fw: i am getting error when i am using copy command gourish singbal <gsingbal@zedo.com>

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