Re: psql commandline - Mailing list pgsql-novice

From Charley L. Tiggs
Subject Re: psql commandline
Date
Msg-id 8710B74B-8EC1-4C24-8F63-6F1F5B88BADB@xpressdocs.com
Whole thread Raw
In response to psql commandline  (digit-x@gmx.net)
List pgsql-novice
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

pgsql-novice by date:

Previous
From: digit-x@gmx.net
Date:
Subject: psql commandline
Next
From: Bruno Wolff III
Date:
Subject: Re: Sorting Challenge