X-Original-To: pgsql-novice-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 86A8AD84E1 for ; Wed, 31 Aug 2005 11:27:23 -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 56313-09 for ; Wed, 31 Aug 2005 14:27:20 +0000 (GMT) Received: from xpressdocs.com (mail.xpressdocs.com [68.116.137.5]) by svr1.postgresql.org (Postfix) with ESMTP id 89F45D7D1D for ; Wed, 31 Aug 2005 11:27:18 -0300 (ADT) Received: from [192.168.0.86] (HELO [192.168.0.86]) by xpressdocs.com (CommuniGate Pro SMTP 4.2.10) with ESMTP id 2909219 for pgsql-novice@postgresql.org; Wed, 31 Aug 2005 09:27:14 -0500 In-Reply-To: <18268.1125490446@www18.gmx.net> References: <18268.1125490446@www18.gmx.net> Mime-Version: 1.0 (Apple Message framework v733) X-Priority: 3 (Normal) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <8710B74B-8EC1-4C24-8F63-6F1F5B88BADB@xpressdocs.com> Content-Transfer-Encoding: 7bit From: "Charley L. Tiggs" Subject: Re: psql commandline Date: Wed, 31 Aug 2005 09:27:22 -0500 To: pgsql-novice@postgresql.org X-Mailer: Apple Mail (2.733) 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: 200508/283 X-Sequence-Number: 14304 On Aug 31, 2005, at 7:14 AM, digit-x@gmx.net wrote: > Hi list > > the following commandline query doesn`t work..... > why? please help > > su - postgres -c 'psql --dbname database --command "UPDATE users SET > pin=12345 WHERE login='admin';"' Here's easier syntax that you can use to execute your query from the command line: psql -c "UPDATE users SET pin=12345 WHERE login='admin'" database postgres