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

Re: WIP: URI connection string support for libpq

From: Alexander 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-28 18:45:23
Message-ID: 4F4D20C3.2060008@commandprompt.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On 02/24/2012 03:18 PM, Florian Weimer wrote:
>
> * Alex Shulgin:
>
>>> 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?
>
> It's not nice URI syntax, but it's better than an out-of-band mechanism.

Attached is v5 of the patch, adding support for local Unix socket 
directory specification w/o the need to percent-encode path separators. 
  The path to directory must start with forward slash, like so:

postgres:///path/to/socket/dir

To specify non-default dbname use URI query parameters:

postgres:///path/to/socket/dir?dbname=other

Username/password should be also specified on query parameters in this 
case, as opposed to "user:pw(at)host" syntax supported by host URIs.

--
Alex

Attachment: libpq-uri-v5.patch
Description: text/x-patch (19.4 KB)

In response to

pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2012-02-28 18:48:03
Subject: Re: pg_upgrade --logfile option documentation
Previous:From: Robert HaasDate: 2012-02-28 18:24:45
Subject: Re: pg_upgrade --logfile option documentation

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