Re: Alternative to psql -c ? - Mailing list pgsql-general

From Christoph Berg
Subject Re: Alternative to psql -c ?
Date
Msg-id [email protected]
Whole thread Raw
In response to Alternative to psql -c ?  (James Le Cuirot <[email protected]>)
List pgsql-general
Re: James Le Cuirot 2014-06-25 <[email protected]>
> Hello,
>
> I've been using the Chef database cookbook and found it
> frustrating because it doesn't allow you to use peer
> authentication. The client process generally runs as root and
> connects to PostgreSQL using the Ruby pg gem.
>
> I have patched it to shell out to psql instead. This has the

No idea on the "psql -c" part, but I'd try using the pg gem, and use a
.pgpass file along with md5 authentication. If you set the PGHOST env
var (or PGUSER, PGSERVICE, ...), you don't even need to change any
code for that to work with the usual PG default configs.

Christoph
--
[email protected] | http://www.df7cb.de/


pgsql-general by date:

Previous
From: hubert depesz lubaczewski
Date:
Subject: Re: Alternative to psql -c ?
Next
From: Jerry Sievers
Date:
Subject: Re: Alternative to psql -c ?