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

Re: WIP: URI connection string support for libpq

From: Alex Shulgin <ash(at)commandprompt(dot)com>
To: Florian Weimer <fweimer(at)bfk(dot)de>
Cc: Greg Smith <greg(at)2ndQuadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WIP: URI connection string support for libpq
Date: 2012-02-24 13:16:53
Message-ID: 87wr7cxtfe.fsf@commandprompt.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Florian Weimer <fweimer(at)bfk(dot)de> writes:

> * Alex Shulgin:
>
>> Yeah, this is really appealing, however how do you tell if the part
>> after the last slash is a socket directory name or a dbname?  E.g:
>>
>> psql postgres:///path/to/different/socket/dir        (default dbname)
>> psql postgres:///path/to/different/socket/dir/other  (dbname=other ?)
>
> The HTTP precent is to probe the file system until you find something.
> Most HTTP servers have something similar to the PATH_INFO variable which
> captures trailing path segments.
>
> It's ugly, but it's standard practice, and seems better than a separate
> -d parameter (which sort of defeats the purpose of URIs).

Hm, do you see anything what's wrong with "?dbname=other" if you don't
like a separate -d?

--
Alex

In response to

Responses

pgsql-hackers by date

Next:From: Florian WeimerDate: 2012-02-24 13:18:44
Subject: Re: WIP: URI connection string support for libpq
Previous:From: Florian WeimerDate: 2012-02-24 13:07:21
Subject: Re: WIP: URI connection string support for libpq

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