Re: DB alias ?

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Tim Uckun <timuckun(at)gmail(dot)com>, Guillaume Lelarge <guillaume(at)lelarge(dot)info>
Cc: Shridhar Daithankar <ghodechhap(at)ghodechhap(dot)net>, pgsql-general <pgsql-general(at)postgresql(dot)org>, "Gauthier, Dave" <dave(dot)gauthier(at)intel(dot)com>, Rob Sargent <robjsargent(at)gmail(dot)com>
Subject: Re: DB alias ?
Date: 2014-03-24 01:39:30
Message-ID: 532F8CD2.9040606@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Craig Ringer 2014-03-24 01:42:20 Do we have a range of SQLSTATE codes assigned for custom use?
Previous Message Tim Uckun 2014-03-24 01:22:13 Re: DB alias ?