Re: NEED HELP COPY TO DYNAMIC OUTPUT FILE - Mailing list pgsql-sql

From Pavel Stehule
Subject Re: NEED HELP COPY TO DYNAMIC OUTPUT FILE
Date
Msg-id 162867790908292351g14087219r970576b9006fb91b@mail.gmail.com
Whole thread Raw
In response to NEED HELP COPY TO DYNAMIC OUTPUT FILE  (Yogi Rizkiadi <gie05tech@yahoo.co.id>)
Responses Re: NEED HELP COPY TO DYNAMIC OUTPUT FILE
List pgsql-sql
Hello

COPY in plpgsql are not allowed.

regards
Pavel Stehule

2009/8/30 Yogi Rizkiadi <gie05tech@yahoo.co.id>:
> 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
>
> but it seems getting wrong, so what the right syntax's ?
>
> Sorry for my bad english and thanks in advance
>
>
> ________________________________
> Dapatkan alamat Email baru Anda!
> Dapatkan nama yang selalu Anda inginkan sebelum diambil orang lain!


pgsql-sql by date:

Previous
From: Yogi Rizkiadi
Date:
Subject: NEED HELP COPY TO DYNAMIC OUTPUT FILE
Next
From: Tom Lane
Date:
Subject: Re: NEED HELP COPY TO DYNAMIC OUTPUT FILE