Re: Notes on implementing URI syntax for libpq

From: Alexander Shulgin <ash(at)commandprompt(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Notes on implementing URI syntax for libpq
Date: 2011-11-24 06:57:36
Message-ID: 1322117507-sup-1179@moon
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 be specified 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(at)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(at)host" part instead of the ugly "?user=&password=") this will make psql URIs backward-incompatible with the JDBC syntax, which is exactly what we want to avoid.

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

--
Alex

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Shulgin 2011-11-24 06:59:56 Re: Notes on implementing URI syntax for libpq
Previous Message Bruce Momjian 2011-11-24 05:01:40 Re: pg_upgrade relation OID mismatches