Re: Libpq functions & string to obtain connection parameters - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Libpq functions & string to obtain connection parameters
Date
Msg-id c4c73a15-8ee0-ad94-6399-13f84ac0b964@aklaver.com
Whole thread Raw
In response to Re: Libpq functions & string to obtain connection parameters  (arnaud gaboury <arnaud.gaboury@gmail.com>)
Responses Re: Libpq functions & string to obtain connection parameters  (arnaud gaboury <arnaud.gaboury@gmail.com>)
List pgsql-general
On 10/07/2016 06:42 AM, arnaud gaboury wrote:
>
>

>
> Honestly not so much, as it is a nearly perfect Copy/past of postgresql
> official doc[0].
> My postgresql socket is in the usual place:
>  /run/postgresql/.s.PGSQL.5432=
> So no need to specify it. But for the rest, I am still not sure of my URI
>
> [0]https://www.postgresql.org/docs/9.5/static/libpq-connect.html
>
>

Aah, just remembered you wanted username and password, so:

psql postgresql://aklaver:pwd@/test?connect_timeout=10

4408 pts/1    S+     0:00 psql postgresql://aklaver:pwd@/test?connect_timeout=10
4409 ?        Ss     0:00 postgres: aklaver test [local] idle


--
Adrian Klaver
adrian.klaver@aklaver.com


pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Libpq functions & string to obtain connection parameters
Next
From: arnaud gaboury
Date:
Subject: Re: Libpq functions & string to obtain connection parameters