Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id A7FA89FB2A2 for ; Mon, 22 Jan 2007 21:25:39 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 44556-07 for ; Mon, 22 Jan 2007 21:25:36 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from itspmx2.state.ms.us (itspmx2.state.ms.us [205.144.224.112]) by postgresql.org (Postfix) with ESMTP id B62589FA31A for ; Mon, 22 Jan 2007 21:25:36 -0400 (AST) Received: from rray.drdc.mstc.ms.gov ([10.3.192.2]) by itspmx2.state.ms.us (8.13.4/8.13.4) with ESMTP id l0N1PNRS024372 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 22 Jan 2007 19:25:28 -0600 (CST) Received: from rray.drdc.mstc.ms.gov (localhost.localdomain [127.0.0.1]) by rray.drdc.mstc.ms.gov (8.13.8/8.13.6) with ESMTP id l0N1PMV6013361 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 22 Jan 2007 19:25:22 -0600 Received: from localhost (rray@localhost) by rray.drdc.mstc.ms.gov (8.13.8/8.13.8/Submit) with ESMTP id l0N1PMae013358; Mon, 22 Jan 2007 19:25:22 -0600 X-Authentication-Warning: rray.drdc.mstc.ms.gov: rray owned process doing -bs Date: Mon, 22 Jan 2007 19:25:22 -0600 (CST) From: Richard Ray X-X-Sender: rray@rray.drdc.mstc.ms.gov To: Jeff Frost cc: pgsql-sql@postgresql.org Subject: Re: How to query by column names In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/108 X-Sequence-Number: 27260 On Mon, 22 Jan 2007, Jeff Frost wrote: > So why are you avoiding "SELECT * FROM t1;" ? > I was affeared that if I brought my total ignorance to light I would be band from the list but here goes. I work in UNIX/Linux environments. It's my habit to record my scripts. A simple example: #!/bin/bash CMD="psql -d test \"select * from t1\"" echo $CMD >> my_log eval $CMD | while read x; do do_something_with_x done In this example * expands to all files in the current working directory. I was attempting to get around this by enumerating the table attributes.