Re: [SQL] NEED HELP COPY TO DYNAMIC OUTPUT FILE

2009-08-31 Thread Yogi Dwianandono Rizkiadi
t(integer) OWNER TO postgres; -Original Message- From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org] On Behalf Of Pavel Stehule Sent: 30 Agustus 2009 22:56 To: Tom Lane Cc: Yogi Rizkiadi; pgsql-sql@postgresql.org Subject: Re: [SQL] NEED HELP COPY TO DYNAMIC OUTPUT

Re: [SQL] NEED HELP COPY TO DYNAMIC OUTPUT FILE

2009-08-30 Thread Pavel Stehule
2009/8/30 Tom Lane : > Pavel Stehule writes: >> COPY in plpgsql are not allowed. > > I think it will work if you use an EXECUTE. > >                        regards, tom lane > I didn't test it. regards Pavel Stehule -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes

Re: [SQL] NEED HELP COPY TO DYNAMIC OUTPUT FILE

2009-08-30 Thread Tom Lane
Pavel Stehule writes: > COPY in plpgsql are not allowed. I think it will work if you use an EXECUTE. regards, tom lane -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] NEED HELP COPY TO DYNAMIC OUTPUT FILE

2009-08-29 Thread Pavel Stehule
Hello COPY in plpgsql are not allowed. regards Pavel Stehule 2009/8/30 Yogi Rizkiadi : > Hi admin, i'm gie from indonesia > > i wanna ask you how to make a dynamic output file from command COPY TO ? > > i have tried this : > > BEGIN > i:=0; > j:=10; > WHILE i < j LOOP > COPY (SELECT * FROM count

[SQL] NEED HELP COPY TO DYNAMIC OUTPUT FILE

2009-08-29 Thread Yogi Rizkiadi
Hi admin, i'm gie from indonesia i wanna ask you how to make a dynamic output file from command COPY TO ? i have tried this : BEGIN i:=0; j:=10; WHILE i < j LOOP COPY (SELECT * FROM country) TO '/usr/proj/' || i || '.txt'; // need attention here END LOOP; RETURN; END