Re: DB alias ? - Mailing list pgsql-general

From Adrian Klaver
Subject Re: DB alias ?
Date
Msg-id 532F8CD2.9040606@aklaver.com
Whole thread Raw
In response to Re: DB alias ?  (Tim Uckun <timuckun@gmail.com>)
List pgsql-general
On 03/23/2014 06:22 PM, Tim Uckun wrote:
> How can this be combined with other commands. For example pgsql doesn't
> like this
>
> psql service=test1 -d test_database -c "some command"

But it would like this:

http://www.postgresql.org/docs/9.3/static/app-psql.html

"An alternative way to specify connection parameters is in a conninfo
string or a URI, which is used instead of a database name. This
mechanism give you very wide control over the connection. For example:

$ psql "service=myservice sslmode=require"

"

>
> the PGSERVICE=test1 psql blah blah works but seems cumbersome.  Why
> isn't there a psql --service=blah option?
>
>
>
>



--
Adrian Klaver
adrian.klaver@aklaver.com


pgsql-general by date:

Previous
From: Tim Uckun
Date:
Subject: Re: DB alias ?
Next
From: Craig Ringer
Date:
Subject: Do we have a range of SQLSTATE codes assigned for custom use?