Re: BUG #5304: psql using conninfo fails in connecting to the server

From: Joe Conway <mail(at)joeconway(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5304: psql using conninfo fails in connecting to the server
Date: 2010-02-04 17:37:47
Message-ID: 4B6B05EB.2010802@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On 02/04/2010 08:31 AM, Joe Conway wrote:
> On 02/04/2010 01:23 AM, Fujii Masao wrote:
>> On Thu, Feb 4, 2010 at 1:26 PM, Joe Conway <mail(at)joeconway(dot)com> wrote:
>>> OK, this one includes pg_dump(all)/pg_restore and common.c from
>>> bin/scripts (createdb, vacuumdb, etc). I still need to adjust the docs,
>>> but other than that any remaining complaints?
>
>> * expand_dbname is defined as a "bool" value in PQconnectdbParams()
>> and PQconnectStartParams(). But we should hide such a "bool" from
>> an user-visible API, and use an "int" instead?
>
> Yes, I suppose there is precedence for that.
>
>> * conninfo_array_parse() calls PQconninfoFree(str_options) as soon
>> as one "dbname" keyword is found. So if more than one "dbname"
>> keywords are unexpectedly specified in PQconnectdbParams(), the
>> str_options would be free()-ed doubly.
>
> Great catch -- thank you!
>
> Thanks for the review. I'll do a documentation update, make these
> changes, and commit later today if I don't hear any other objections.

Attached has both items fixed and documentation changes.

Joe

Attachment Content-Type Size
psql-PQconnectParams-fixes.r4.patch text/x-patch 22.0 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Mark Kirkwood 2010-02-04 23:21:12 Re: BUG #5312: I NEED HELP
Previous Message Joe Conway 2010-02-04 16:31:21 Re: BUG #5304: psql using conninfo fails in connecting to the server

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-02-04 18:02:13 Re: Re: [COMMITTERS] pgsql: Assorted cleanups in preparation for using a map file to support
Previous Message Robert Haas 2010-02-04 17:34:33 Re: Largeobject Access Controls (r2460)