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 8FE61D83D8 for ; Thu, 13 Oct 2005 01:09:37 -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 65430-05 for ; Thu, 13 Oct 2005 04:09:31 +0000 (GMT) Received: from mailbox.samurai.com (mailbox.samurai.com [205.207.28.82]) by svr1.postgresql.org (Postfix) with ESMTP id 5E5A1D834C for ; Thu, 13 Oct 2005 01:09:31 -0300 (ADT) Received: from localhost (mailbox.samurai.com [205.207.28.82]) by mailbox.samurai.com (Postfix) with ESMTP id 38D6A239850; Thu, 13 Oct 2005 00:09:31 -0400 (EDT) Received: from mailbox.samurai.com ([205.207.28.82]) by localhost (mailbox.samurai.com [205.207.28.82]) (amavisd-new, port 10024) with LMTP id 74586-01; Thu, 13 Oct 2005 00:09:26 -0400 (EDT) Received: from [192.168.1.103] (d226-86-55.home.cgocable.net [24.226.86.55]) by mailbox.samurai.com (Postfix) with ESMTP id 38EF32398C8; Thu, 13 Oct 2005 00:08:26 -0400 (EDT) Subject: Re: COPY example for partial tables From: Neil Conway To: Bruce Momjian Cc: David Fetter , PostgreSQL Docs In-Reply-To: <200510121455.j9CEtHt10423@candle.pha.pa.us> References: <200510121455.j9CEtHt10423@candle.pha.pa.us> Content-Type: text/plain Date: Thu, 13 Oct 2005 00:08:51 -0400 Message-Id: <1129176531.8718.70.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.4.1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at mailbox.samurai.com X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 required=5 tests=[none] X-Spam-Level: X-Archive-Number: 200510/33 X-Sequence-Number: 3278 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. -Neil