X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 2FC2BD72AA for ; Wed, 31 Aug 2005 10:17:43 -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 42099-03 for ; Wed, 31 Aug 2005 13:17:41 +0000 (GMT) Received: from floppy.pyrenet.fr (floppy.pyrenet.fr [194.116.145.2]) by svr1.postgresql.org (Postfix) with ESMTP id 2BA5FD6E3F for ; Wed, 31 Aug 2005 10:17:39 -0300 (ADT) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id 07DAC30956; Wed, 31 Aug 2005 15:17:43 +0200 (MET DST) From: Zac X-Newsgroups: pgsql.sql Subject: Re: psql commandline Date: Wed, 31 Aug 2005 15:19:39 +0200 Organization: Hub.Org Networking Services Lines: 42 Message-ID: References: <200508311813.18420.lawgon@thenilgiris.com> <11603.1125492897@www18.gmx.net> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@news.hub.org User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050716) X-Accept-Language: en-us, en In-Reply-To: <11603.1125492897@www18.gmx.net> To: pgsql-sql@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.032 required=5 tests=[AWL=0.032] X-Spam-Level: X-Archive-Number: 200508/302 X-Sequence-Number: 22530 Be quiet... it is not a db problem: your shell interprets "'" characters before sending them to psql so your query becomes UPDATE users SET pin=12345 WHERE login=admin; and column admin (not the literal 'admin') doesn't really exist! Try this: su - postgres -c "psql --dbname database --command \"UPDATE users SET pin=12345 WHERE login='admin';\"" > The error is : > > column "admin" doesn`t exist > > What the f... is that db doing? > > > >>--- Ursprüngliche Nachricht --- >>Von: Kenneth Gonsalves >>An: pgsql-sql@postgresql.org >>Betreff: Re: [SQL] psql commandline >>Datum: Wed, 31 Aug 2005 18:13:18 +0530 >> >>On Wednesday 31 Aug 2005 6:00 pm, dIGITx wrote: >> >>>su - postgres -c 'psql --dbname database --command "UPDATE users >>>SET pin=12345 WHERE login='admin';"' >> >>works for me - what is the error you are getting? >> >>-- >>regards >>kg >> >>http://www.livejournal.com/users/lawgon >>tally ho! http://avsap.org.in >>ಇಂಡ್ಲಿನಕ್ಸ வாழ்க! >> >>---------------------------(end of broadcast)--------------------------- >>TIP 6: explain analyze is your friend > >