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