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 2CC5BD82EE for ; Thu, 13 Oct 2005 11:45:09 -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 16293-10 for ; Thu, 13 Oct 2005 14:45:02 +0000 (GMT) Received: from candle.pha.pa.us (candle.pha.pa.us [64.139.89.126]) by svr1.postgresql.org (Postfix) with ESMTP id 19F1AD82F6 for ; Thu, 13 Oct 2005 11:45:04 -0300 (ADT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.11.6) id j9DEj9605226; Thu, 13 Oct 2005 10:45:09 -0400 (EDT) From: Bruce Momjian Message-Id: <200510131445.j9DEj9605226@candle.pha.pa.us> Subject: Re: COPY example for partial tables In-Reply-To: <1129176531.8718.70.camel@localhost.localdomain> To: Neil Conway Date: Thu, 13 Oct 2005 10:45:09 -0400 (EDT) Cc: David Fetter , PostgreSQL Docs X-Mailer: ELM [version 2.4ME+ PL121 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.013 required=5 tests=[AWL=0.013] X-Spam-Level: X-Archive-Number: 200510/34 X-Sequence-Number: 3279 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. > Fixed. Thanks. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073