pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedpsql commandline
11+ messages / 5 participants
[nested] [flat]
* psql commandline
@ 2005-08-31 12:14 digit-x@gmx.net
0 siblings, 2 replies; 11+ messages in thread
From: digit-x@gmx.net @ 2005-08-31 12:14 UTC (permalink / raw)
To: pgsql-novice@postgresql.org
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';"'
--
5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail
+++ GMX - die erste Adresse für Mail, Message, More +++
^ permalink raw reply [nested|flat] 11+ messages in thread
* psql commandline
@ 2005-08-31 12:18 dIGITx <digit-x@gmx.net>
parent: digit-x@gmx.net
1 sibling, 1 reply; 11+ messages in thread
From: dIGITx @ 2005-08-31 12:18 UTC (permalink / raw)
To: pgsql-novice@postgresql.org
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';"'
--
GMX DSL = Maximale Leistung zum minimalen Preis!
2000 MB nur 2,99, Flatrate ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl
^ permalink raw reply [nested|flat] 11+ messages in thread
* psql commandline
@ 2005-08-31 12:30 dIGITx <digit-x@gmx.net>
parent: dIGITx <digit-x@gmx.net>
0 siblings, 1 reply; 11+ messages in thread
From: dIGITx @ 2005-08-31 12:30 UTC (permalink / raw)
To: pgsql-sql
Hi list
the following commandline query doesn`t work.....
su - postgres -c 'psql --dbname database --command "UPDATE users SET
pin=12345 WHERE login='admin';"'
Any idea why? please help...
--
GMX DSL = Maximale Leistung zum minimalen Preis!
2000 MB nur 2,99, Flatrate ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: psql commandline
@ 2005-08-31 12:43 Kenneth Gonsalves <lawgon@thenilgiris.com>
parent: dIGITx <digit-x@gmx.net>
0 siblings, 1 reply; 11+ messages in thread
From: Kenneth Gonsalves @ 2005-08-31 12:43 UTC (permalink / raw)
To: pgsql-sql
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
ಇಂಡ್ಲಿನಕ್ಸ வாழ்க!
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: psql commandline
@ 2005-08-31 12:54 digit-x@gmx.net
parent: Kenneth Gonsalves <lawgon@thenilgiris.com>
0 siblings, 2 replies; 11+ messages in thread
From: digit-x@gmx.net @ 2005-08-31 12:54 UTC (permalink / raw)
To: pgsql-sql
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
--
5 GB Mailbox, 50 FreeSMS http://www.gmx.net/de/go/promail
+++ GMX - die erste Adresse für Mail, Message, More +++
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: psql commandline
@ 2005-08-31 13:03 Kenneth Gonsalves <lawgon@thenilgiris.com>
parent: digit-x@gmx.net
1 sibling, 1 reply; 11+ messages in thread
From: Kenneth Gonsalves @ 2005-08-31 13:03 UTC (permalink / raw)
To: pgsql-sql
On Wednesday 31 Aug 2005 6:24 pm, digit-x@gmx.net wrote:
> The error is :
>
> column "admin" doesn`t exist
try \'admin\'
--
regards
kg
http://www.livejournal.com/users/lawgon
tally ho! http://avsap.org.in
ಇಂಡ್ಲಿನಕ್ಸ வாழ்க!
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: psql commandline
@ 2005-08-31 13:13 digit-x@gmx.net
parent: Kenneth Gonsalves <lawgon@thenilgiris.com>
0 siblings, 1 reply; 11+ messages in thread
From: digit-x@gmx.net @ 2005-08-31 13:13 UTC (permalink / raw)
To: pgsql-sql
Thx, but already did that.
After entering the statement that way my console hangs and only ctrl-d gets
it working again.
error shown than is:
unexpected EOF while looking for matchin '"'
bash: syntax error: unexpected end of file
> --- 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:33:57 +0530
>
> On Wednesday 31 Aug 2005 6:24 pm, digit-x@gmx.net wrote:
> > The error is :
> >
> > column "admin" doesn`t exist
>
> try \'admin\'
> --
> regards
> kg
>
> http://www.livejournal.com/users/lawgon
> tally ho! http://avsap.org.in
> ಇಂಡà³à²²à²¿à²¨à²•à³à²¸ வாழà¯à®•!
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match
--
Lust, ein paar Euro nebenbei zu verdienen? Ohne Kosten, ohne Risiko!
Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: psql commandline
@ 2005-08-31 13:19 Zac <zaccheob@inwind.it>
parent: digit-x@gmx.net
1 sibling, 1 reply; 11+ messages in thread
From: Zac @ 2005-08-31 13:19 UTC (permalink / raw)
To: pgsql-sql
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
>
>
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: psql commandline
@ 2005-08-31 13:25 Kenneth Gonsalves <lawgon@thenilgiris.com>
parent: digit-x@gmx.net
0 siblings, 0 replies; 11+ messages in thread
From: Kenneth Gonsalves @ 2005-08-31 13:25 UTC (permalink / raw)
To: pgsql-sql
On Wednesday 31 Aug 2005 6:43 pm, digit-x@gmx.net wrote:
> After entering the statement that way my console hangs and only
> ctrl-d gets it working again.
the problem is that the quotes round 'admin' are needed to tell psql
that this is a value - but i have no idea how to create the quotes
on the command line
--
regards
kg
http://www.livejournal.com/users/lawgon
tally ho! http://avsap.org.in
ಇಂಡ್ಲಿನಕ್ಸ வாழ்க!
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: psql commandline
@ 2005-08-31 13:29 Kenneth Gonsalves <lawgon@thenilgiris.com>
parent: Zac <zaccheob@inwind.it>
0 siblings, 0 replies; 11+ messages in thread
From: Kenneth Gonsalves @ 2005-08-31 13:29 UTC (permalink / raw)
To: pgsql-sql
On Wednesday 31 Aug 2005 6:49 pm, Zac wrote:
> su - postgres -c "psql --dbname database --command \"UPDATE users
> SET pin=12345 WHERE login='admin';\""
works - good thing to know
--
regards
kg
http://www.livejournal.com/users/lawgon
tally ho! http://avsap.org.in
ಇಂಡ್ಲಿನಕ್ಸ வாழ்க!
^ permalink raw reply [nested|flat] 11+ messages in thread
* Re: psql commandline
@ 2005-08-31 14:27 Charley L. Tiggs <ctiggs@xpressdocs.com>
parent: digit-x@gmx.net
1 sibling, 0 replies; 11+ messages in thread
From: Charley L. Tiggs @ 2005-08-31 14:27 UTC (permalink / raw)
To: pgsql-novice@postgresql.org
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
^ permalink raw reply [nested|flat] 11+ messages in thread
end of thread, other threads:[~2005-08-31 14:27 UTC | newest]
Thread overview: 11+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-08-31 12:14 psql commandline digit-x@gmx.net
2005-08-31 12:18 ` dIGITx <digit-x@gmx.net>
2005-08-31 12:30 ` dIGITx <digit-x@gmx.net>
2005-08-31 12:43 ` Kenneth Gonsalves <lawgon@thenilgiris.com>
2005-08-31 12:54 ` digit-x@gmx.net
2005-08-31 13:03 ` Kenneth Gonsalves <lawgon@thenilgiris.com>
2005-08-31 13:13 ` digit-x@gmx.net
2005-08-31 13:25 ` Kenneth Gonsalves <lawgon@thenilgiris.com>
2005-08-31 13:19 ` Zac <zaccheob@inwind.it>
2005-08-31 13:29 ` Kenneth Gonsalves <lawgon@thenilgiris.com>
2005-08-31 14:27 ` Charley L. Tiggs <ctiggs@xpressdocs.com>
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