X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id D714B11F6557 for ; Thu, 6 Apr 2006 18:39:36 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 41763-06 for ; Thu, 6 Apr 2006 18:39:32 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from presinet.com (mail.presinet.com [209.53.156.1]) by postgresql.org (Postfix) with ESMTP id 3A07711F6554 for ; Thu, 6 Apr 2006 18:39:33 -0300 (ADT) Received: from [10.10.1.151] ([10.10.1.151]) by presinet.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 6 Apr 2006 14:37:57 -0700 Message-ID: <44358AA0.7000201@presinet.com> Date: Thu, 06 Apr 2006 14:39:44 -0700 From: Bricklen Anderson User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Owen Jacobson CC: pgsql-sql@postgresql.org Subject: Re: Query from shell References: <144D12D7DD4EC04F99241498BB4EEDCC28843E@nelson.osl.com> In-Reply-To: <144D12D7DD4EC04F99241498BB4EEDCC28843E@nelson.osl.com> Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 06 Apr 2006 21:37:57.0078 (UTC) FILETIME=[5E828F60:01C659C2] X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0 required=5 tests=[none] X-Spam-Score: 0 X-Spam-Level: X-Archive-Number: 200604/48 X-Sequence-Number: 24857 Owen Jacobson wrote: > Judith wrote: > > >> Hi every body, somebody can show me hot to execute a >>query from a shell > > > echo QUERY HERE | psql databasename > > Or, if you want to run several queries, run psql and run your queries there. > or psql -d -c "your query here"