Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 7B8119FB57B for ; Tue, 23 Jan 2007 08:02:06 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 18585-08 for ; Tue, 23 Jan 2007 08:01:57 -0400 (AST) X-Greylist: delayed 00:05:42.408811 by SQLgrey-1.7.4 Received: from www.herakles.homelinux.org (coco2.arach.net.au [203.34.16.107]) by postgresql.org (Postfix) with ESMTP id 26F349FB294 for ; Tue, 23 Jan 2007 08:02:01 -0400 (AST) Received: from mail.herakles.homelinux.org (unknown [192.168.7.254]) by www.herakles.homelinux.org (Postfix) with ESMTP id D554C5F533D for ; Tue, 23 Jan 2007 21:01:53 +0900 (WST) Received: from mail2.cds.merseine.nu (unknown [192.168.9.4]) by mail.herakles.homelinux.org (Postfix) with ESMTP id 9B9BE1EAF8 for ; Tue, 23 Jan 2007 21:02:10 +0900 (WST) Received: from [192.168.9.146] (Bilby.demo.lan [192.168.9.146]) by mail2.cds.merseine.nu (Postfix) with ESMTP id 53AB4CAC002 for ; Tue, 23 Jan 2007 21:01:46 +0900 (WST) Message-ID: <45B5F929.8040205@herakles.homelinux.org> Date: Tue, 23 Jan 2007 21:01:45 +0900 From: John Summerfield User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.7) Gecko/20061007 SeaMonkey/1.0.5 MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Re: How to query by column names References: <45B5F7D0.9080801@herakles.homelinux.org> In-Reply-To: <45B5F7D0.9080801@herakles.homelinux.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.161 tagged_above=0 required=5 tests=AWL, BAYES_50, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200701/113 X-Sequence-Number: 27265 John Summerfield wrote: > Jeff Frost wrote: >> On Tue, 23 Jan 2007, Josh Williams wrote: >> >>> From: Jeff Frost >>>> On Mon, 22 Jan 2007, Richard Ray wrote: >>> ... >>> >>> That's definitely part of it. I'm assuming the above is an abridged >>> example and the OP is doing something dynamic with the query. The >>> real trouble is Bash likes to expand the asterisk into a list of >>> every file in the current directory when you try to push the command >>> through a variable. So it's just a matter of finding a way to escape >>> the * > > Oh, good grief Charlie Brown: > > backslash it: > \* > > so: > echo select \* from whatsit | psql test Oh echo select \* from whatsit \; | psql test >