Re: PQconninfo function for libpq

Magnus Hagander <magnus@hagander.net>

From: Magnus Hagander <magnus@hagander.net>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, zb <zb@cybertec.at>, PostgreSQL-development <pgsql-hackers@postgresql.org>, Alvaro Herrera <alvherre@2ndquadrant.com>, Peter Eisentraut <peter_e@gmx.net>
Date: 2012-12-04T12:59:09Z
Lists: pgsql-hackers
On Mon, Dec 3, 2012 at 3:20 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Fri, Nov 30, 2012 at 1:02 AM, Magnus Hagander <magnus@hagander.net> wrote:
>> In the interest of moving things along, I'll remove these for now at
>> least, and commit the rest of the patch, so we can keep working on the
>> basebacku part of things.
>
> I see you committed this - does this possibly provide infrastructure
> that could be used to lift the restriction imposed by the following
> commit?
>
> commit fe21fcaf8d91a71c15ff25276f9fa81e0cd1dba9
> Author: Bruce Momjian <bruce@momjian.us>
> Date:   Wed Aug 15 19:04:52 2012 -0400
>
>     In psql, if the is no connection object, e.g. due to a server crash,
>     require all parameters for \c, rather than using the defaults, which
>     might be wrong.
>
> Because personally, I find the new behavior no end of annoying.

It certainly sounds like it could do that. Though it might be useful
to actually add a connection funciton to libpq that takes such an
array of options directly - AFAICS, right now you'd have to
deconstruct the return value into a string, and then pass it into a
connection function that immediately parses it right back out as
conninfooptions.

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/


Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. In psql, if the is no connection object, e.g. due to a server crash,