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 1322117507-sup-1179@moon
Whole thread Raw
In response to Re: Notes on implementing URI syntax for libpq  (Florian Weimer <fweimer@bfk.de>)
Responses Re: Notes on implementing URI syntax for libpq
List pgsql-hackers
Excerpts from Florian Weimer's message of Wed Nov 23 13:04:47 +0200 2011:
>
> * Alexander Shulgin:
>
> > This, in my opinion, is very similar to what we would like to achieve with the URI syntax, so the above could also
bespecified using a URI parameter like this: 
> >
> >   psql -d postgresql://example.net:5433/mydb
>
> How would you specifiy a local port/UNIX domain socket?
>
> Would it be possible to add something like
>
>   psql -d postgresql+ssh://fweimer@db5/var/run/postgresql/.s.PGSQL.5432
>
> similar to what Subversion supports?  (This might have security
> implications when used from untrusted PHP scripts.)

While it is really tempting to provide support for all that fancy stuff (or at least support "user:password@host" part
insteadof the ugly "?user=&password=") this will make psql URIs backward-incompatible with the JDBC syntax, which is
exactlywhat we want to avoid. 

The primary reason people even considering adding the syntax, IMO is compatibility and thus, it has to be compatible in
bothdirections.  If we support something that's more than JDBC provides, we're just adding to the soup of incompatible
URIsyntaxes out there. 

--
Alex


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: pg_upgrade relation OID mismatches
Next
From: Alexander Shulgin
Date:
Subject: Re: Notes on implementing URI syntax for libpq