Skip site navigation (1) Skip section navigation (2)

Re: Should psql support URI syntax?

From: Christopher Browne <cbbrowne(at)gmail(dot)com>
To: jd(at)commandprompt(dot)com
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Magnus Hagander <magnus(at)hagander(dot)net>, Dave Page <dpage(at)pgadmin(dot)org>, Joshua Berkus <josh(at)agliodbs(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Should psql support URI syntax?
Date: 2011-04-01 17:17:34
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Fri, Apr 1, 2011 at 12:43 PM, Joshua D. Drake <jd(at)commandprompt(dot)com> wrote:
> On Fri, 2011-04-01 at 08:13 -0400, Andrew Dunstan wrote:
>> >> That said, I do support adding this in the future, if only to keep up
>> >> with the Jones'.
>> > So are the ones out there *already* even compatible, before we start
>> > adding our own? For example, for JDBC I beleive it has to be
>> > jdbc:postgresql://blahblah... Even if you can say the jdbc part is
>> > protocol specific, the example quoted by JD had pgsql://. How many
>> > other combinations can we find already out in the wild, and how do we
>> > pick which one to use in this case?
>> >
>> Of course they aren't compatible. So we solve that by just adding to the
>> soup!
> Well I would argue that if compatibility (as opposed to familiarity) is
> our goal, we need to focus on one and only one syntax, JDBC. It doesn't
> matter our particular bent, JDBC is the one that is in the most use.
> If we can agree on syntax we want to support, I would put efforts into
> working a patch.

+1 on that.  JDBC does happen to get used a lot, so that sure seems
like it would be useful.

Adding a different sort of URI (e.g. - as Kevin Grittner suggests,
downthread, a "pq:") doesn't strike me as being very useful, as it
would only get potentially used for "new" things, and it would be
worse in the sense that it "adds to the soup" of URI formats that are
a distinct minority in their degree of usage.

As I already commented, there's value in being able to use the already
somewhat popular JDBC URIs for our other accesses to Postgres

Wearing my "Afilias hat," that's certainly true.

- We *know* we'll need to use JDBC URIs in many cases, as we've got a
goodly number of applications written in Java that will be using that.
 (And, not to beat a dead horse, these cases would find a "pq:" URI to
be useless.)

- I think there'd be a "win" in being able to use the very same URIs
for other things, as well.  Personally, I like using
PGHOST/PGPORT/PGDATABASE/... quite well, but I'm pretty sure life
would be made easier for our operations folks if they only had one
form of URI (or 'connection string') they needed to set up.

In response to

pgsql-hackers by date

Next:From: Kevin GrittnerDate: 2011-04-01 17:20:25
Subject: Re: trivial patch: show SIREAD pids in pg_locks
Previous:From: Robert HaasDate: 2011-04-01 17:17:26
Subject: Re: Comments on SQL/Med objects

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group