pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Zac <zaccheob@inwind.it>
To: pgsql-sql@postgresql.org
Subject: Re: psql commandline
Date: Wed, 31 Aug 2005 15:19:39 +0200
Message-ID: <df4alh$19dk$1@news.hub.org> (raw)
In-Reply-To: <11603.1125492897@www18.gmx.net>
References: <200508311813.18420.lawgon@thenilgiris.com>
	<11603.1125492897@www18.gmx.net>

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 <lawgon@thenilgiris.com>
>>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
> 
> 



view thread (11+ messages)  latest in thread

Message-ID: <df4alh$19dk$1@news.hub.org>
Permalink:  ../df4alh$19dk$1@news.hub.org/
Also on:    postgresql.org/message-id/df4alh$19dk$1@news.hub.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: zaccheob@inwind.it
  Subject: Re: psql commandline
  In-Reply-To: <df4alh$19dk$1@news.hub.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox