Re: [GENERAL] Copy command to handle view for my export requirement

2011-08-11 Thread Andreas Kretschmer
Siva Palanisamy siv...@hcl.com wrote: Hi All, I understand that copy and \copy commands in PostgreSQL work only for tables. I want it to export the data from varies tables. Instead, I can create a view for the list of tables. Can the copy or \copy commands be utilized to operate on

Re: [GENERAL] Copy command to handle view for my export requirement

2011-08-11 Thread Siva Palanisamy
-general-ow...@postgresql.org] On Behalf Of Andreas Kretschmer Sent: Thursday, August 11, 2011 2:23 PM To: pgsql-general@postgresql.org Subject: Re: [GENERAL] Copy command to handle view for my export requirement Siva Palanisamy siv...@hcl.com wrote: Hi All, I understand that copy and \copy

Re: [GENERAL] Copy command to handle view for my export requirement

2011-08-11 Thread Siva Palanisamy
@postgresql.org Subject: Re: [GENERAL] Copy command to handle view for my export requirement Hi Andreas, I tried the command as below. It failed. Please correct me. \copy (select * from view1) to '/sample.csv' delimiters ',' csv header; ERROR: \copy: parse error at select Thanks and Regards, Siva

Re: [GENERAL] Copy command to handle view for my export requirement

2011-08-11 Thread Raghavendra
...@postgresql.org [mailto: pgsql-general-ow...@postgresql.org] On Behalf Of Andreas Kretschmer Sent: Thursday, August 11, 2011 2:23 PM To: pgsql-general@postgresql.org Subject: Re: [GENERAL] Copy command to handle view for my export requirement Siva Palanisamy siv...@hcl.com wrote: Hi All, I

Re: [GENERAL] Copy command to handle view for my export requirement

2011-08-11 Thread Boszormenyi Zoltan
...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Siva Palanisamy Sent: Thursday, August 11, 2011 4:48 PM To: Andreas Kretschmer; pgsql-general@postgresql.org Subject: Re: [GENERAL] Copy command to handle view for my export requirement Hi Andreas, I tried the command as below

Re: [GENERAL] Copy command to handle view for my export requirement

2011-08-11 Thread Siva Palanisamy
Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Boszormenyi Zoltan Sent: Thursday, August 11, 2011 5:11 PM To: pgsql-general@postgresql.org Subject: Re: [GENERAL] Copy command to handle view for my export requirement Hi, COPY (SELECT

Re: [GENERAL] Copy command to handle view for my export requirement

2011-08-11 Thread Raghavendra
COMMAND: copy (select * from employee) to 'C:/emp.csv' ERROR: could not open file C:/emp.csv for writing: Permission denied ** Error ** ERROR: could not open file C:/emp.csv for writing: Permission denied SQL state: 42501 COMMAND: \copy (select * from employee) to

Re: [GENERAL] Copy command to handle view for my export requirement

2011-08-11 Thread Craig Ringer
On 11/08/2011 7:56 PM, Siva Palanisamy wrote: FYI, I am using PostgreSQL 8.1.4. Argh, ogod why?!?!?! That version is *totally* unsupported on Windows. Not only that, but you're running an ancient point-release - you are missing *19* patch releases worth of bug fixes. The latest

Re: [GENERAL] Copy command to handle view for my export requirement

2011-08-11 Thread Raghavendra
You are not using psql. \copy is a psql command. I don't think it's supported by PgAdmin III, though I could be wrong. Right, '\copy' is not supported in PgAdmin III. --Raghav