Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id D7B259FA49D for ; Wed, 27 Dec 2006 16:19:31 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 70056-07 for ; Wed, 27 Dec 2006 16:19:24 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from wolff.to (wolff.to [66.93.197.194]) by postgresql.org (Postfix) with SMTP id AFF0F9FA492 for ; Wed, 27 Dec 2006 16:19:26 -0400 (AST) Received: (qmail 14649 invoked by uid 500); 27 Dec 2006 20:20:27 -0000 Date: Wed, 27 Dec 2006 14:20:27 -0600 From: Bruno Wolff III To: Enrico Cc: pgsql-admin@postgresql.org Subject: Re: Dump and Query Message-ID: <20061227202027.GA10295@wolff.to> Mail-Followup-To: Bruno Wolff III , Enrico , pgsql-admin@postgresql.org References: <20061227140530.094fc4d3.scotty@linuxtime.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061227140530.094fc4d3.scotty@linuxtime.it> User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/341 X-Sequence-Number: 24133 On Wed, Dec 27, 2006 at 14:05:30 +0100, Enrico wrote: > Is there any way to make a dump from a query? > > For example if my query is: > > select field1,field2 from table > > Does it exist a shell command like pg_dump --QUERY myquery -f myfile? In 8.2 you can use a query with the COPY command. Depending on what you are really doing, that might be a solution for you.