Re: Notes on implementing URI syntax for libpq - Mailing list pgsql-hackers

From Alexander Shulgin
Subject Re: Notes on implementing URI syntax for libpq
Date
Msg-id 1322336273-sup-4163@moon
Whole thread Raw
In response to Re: Notes on implementing URI syntax for libpq  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Notes on implementing URI syntax for libpq
List pgsql-hackers
Excerpts from Robert Haas's message of Thu Nov 24 15:59:08 +0200 2011:
>
> I think we could do something like:
>
> postgresql://user:pw@host:port/database?param1=val1¶m2=val2¶m3=val3&...

I wonder if this should be allowed syntax (i.e. specify a user, but connect locally, so leave 'host' to be an empty
string):
 postgresql://user@/

Furthermore, if we want to connect locally, but to a non-default port:
 postgresql://user@:5433/

I would also think that if one is to specify the password in the URI, and the password happen to contain the @-sign
(e.g."!@#$%^",) it should be percent-encoded, like: 
 postgresql://user:!%40#$%^@/

Reasonable?

--
Alex


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: GiST range-contained-by searches versus empty ranges
Next
From: Dimitri Fontaine
Date:
Subject: Re: why do we need two snapshots per query?