I am using Postgresql 9.1. I know that COPY is used to export data as csv.But COPY creates file in server end. I need to create a file in client end.My application uses php.Is there any tool for it?