X-Original-To: pgsql-docs-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id CE73DD72AA for ; Thu, 13 Oct 2005 18:26:58 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 18936-03 for ; Thu, 13 Oct 2005 21:26:54 +0000 (GMT) Received: from fetter.org (dsl092-188-065.sfo1.dsl.speakeasy.net [66.92.188.65]) by svr1.postgresql.org (Postfix) with ESMTP id DE629D87BF for ; Thu, 13 Oct 2005 18:26:55 -0300 (ADT) Received: from fetter.org (localhost.localdomain [127.0.0.1]) by fetter.org (8.13.4/8.12.10) with ESMTP id j9DLQtWr005844; Thu, 13 Oct 2005 14:26:55 -0700 Received: (from shackle@localhost) by fetter.org (8.13.4/8.13.4/Submit) id j9DLQtdY005843; Thu, 13 Oct 2005 14:26:55 -0700 Date: Thu, 13 Oct 2005 14:26:55 -0700 From: David Fetter To: Neil Conway Cc: Bruce Momjian , PostgreSQL Docs Subject: Re: COPY example for partial tables Message-ID: <20051013212655.GC4489@fetter.org> References: <200510121455.j9CEtHt10423@candle.pha.pa.us> <1129176531.8718.70.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1129176531.8718.70.camel@localhost.localdomain> User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.067 required=5 tests=[AWL=0.017, FORGED_RCVD_HELO=0.05] X-Spam-Level: X-Archive-Number: 200510/41 X-Sequence-Number: 3286 On Thu, Oct 13, 2005 at 12:08:51AM -0400, Neil Conway wrote: > On Wed, 2005-12-10 at 10:55 -0400, Bruce Momjian wrote: > > > > + To copy into a file just the countries whose names start with 'A' > > + using a temporary table which is automatically deleted: > > + > > + > > + BEGIN; > > + CREATE TEMP TABLE a_list_COUNTRIES AS > > + SELECT * FROM country WHERE country_name LIKE 'A%'; > > + COPY a_list_countries TO '/usr1/proj/bray/sql/a_list_countries.copy'; > > + ROLLBACK; > > + > > + > > The capitalization of "a_list_countries" is inconsistent -- both > references should all be in lowercase, IMO. Good catch :) Cheers, D -- David Fetter david@fetter.org http://fetter.org/ phone: +1 510 893 6100 mobile: +1 415 235 3778 Remember to vote!