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 1322142391-sup-2339@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:35:36 +0200 2011:
>
> > Do you suggest that we should reconsider?
>
> I guess my feeling is that if we're going to have URLs, we ought to
> try to adhere to the same conventions that are used for pretty much
> every other service that supports URLs.  user:pw@host:port is widely
> supported by multiple protocols, so I think we would need a very good
> reason to decide to go off in a completely different direction.  It
> would be nice to be compatible with whatever JDBC does (link?) but I'm
> not prepared to put that ahead of general good design.

What JDBC supports is rather weird and far from being ideal: http://jdbc.postgresql.org/documentation/head/connect.html

The problem with supporting multiple syntaxes, IMO is that it makes libpq compatible in only one direction: from
particularforeign syntax to libpq, but not from libqp to any other particular foreign syntax.  So when you see psql -d
<URL>you wouldn't know if you can copy that URL to JDBC or any other connection interface parameter, unless you check
thedocs thoroughly. 

--
Alex


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Time bug with small years
Next
From: Alvaro Herrera
Date:
Subject: Re: Notes on implementing URI syntax for libpq