X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 9496CD1B53E for ; Wed, 10 Sep 2003 16:58:49 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 27569-10 for ; Wed, 10 Sep 2003 13:58:17 -0300 (ADT) Received: from djinn.gene.com (djinn-open.gene.com [192.12.78.2]) by svr1.postgresql.org (Postfix) with ESMTP id 1BA94D1BB7C for ; Wed, 10 Sep 2003 12:17:51 -0300 (ADT) Received: from tallac.gene.com (tallac.gene.com [128.137.116.213]) by djinn.gene.com (8.12.9/8.12.9) with ESMTP id h8AFHWDe110257; Wed, 10 Sep 2003 08:17:32 -0700 (PDT) Received: by tallac.gene.com (Postfix, from userid 13922) id F36494B2B3; Wed, 10 Sep 2003 08:17:31 -0700 (PDT) Subject: Re: Export to file From: Reece Hart To: Marvin Cc: "pgsql-admin@postgresql.org" In-Reply-To: <3F5DFCA5.000006.00924@guaj215desa> References: <3F5DFCA5.000006.00924@guaj215desa> Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: Genentech, Inc. Message-Id: <1063207051.2448.80.camel@tallac> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.4 Date: Wed, 10 Sep 2003 08:17:31 -0700 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/174 X-Sequence-Number: 10262 On Tue, 2003-09-09 at 09:15, Marvin wrote: > > There is a way to export the result > of a query into an external DBF or TXT table? > I often do something like this: $ psql -At -c 'select ... where ...' This is so handy, that I have a (bash) shell alias for it: $ alias csbq='psql -UPUBLIC -dcsb -At -c' then $ csbq 'select ...' -Reece -- Reece Hart, Ph.D. rkh@gene.com, http://www.gene.com/ Genentech, Inc. 650/225-6133 (voice), -5389 (fax) Bioinformatics and Protein Engineering 1 DNA Way, MS-93 http://www.in-machina.com/~reece/ South San Francisco, CA 94080-4990 reece@in-machina.com, GPG: 0x25EC91A0