From: Charley L. Tiggs <ctiggs@xpressdocs.com>
To: pgsql-novice@postgresql.org
Subject: Re: psql commandline
Date: Wed, 31 Aug 2005 09:27:22 -0500
Message-ID: <8710B74B-8EC1-4C24-8F63-6F1F5B88BADB@xpressdocs.com> (raw)
In-Reply-To: <18268.1125490446@www18.gmx.net>
References: <18268.1125490446@www18.gmx.net>
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
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: ctiggs@xpressdocs.com, pgsql-novice@postgresql.org
Subject: Re: psql commandline
In-Reply-To: <8710B74B-8EC1-4C24-8F63-6F1F5B88BADB@xpressdocs.com>
* 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