Re: Notes on implementing URI syntax for libpq

From: Alexander Shulgin <ash(at)commandprompt(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Notes on implementing URI syntax for libpq
Date: 2011-11-26 19:46:32
Message-ID: 1322336273-sup-4163@moon
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)host:port/database?param1=val1&param2=val2&param3=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. "!(at)#$%^",) it should be percent-encoded, like:

postgresql://user:!%40#$%^@/

Reasonable?

--
Alex

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dimitri Fontaine 2011-11-26 19:50:46 Re: why do we need two snapshots per query?
Previous Message Tom Lane 2011-11-26 19:43:36 GiST range-contained-by searches versus empty ranges