Re: BUG #6216: Calling PQconnectdbParams from C++ with a char** - Mailing list pgsql-bugs

From Lionel Elie Mamane
Subject Re: BUG #6216: Calling PQconnectdbParams from C++ with a char**
Date
Msg-id 20110921082517.GA28080@capsaicin.mamane.lu
Whole thread Raw
In response to Re: BUG #6216: Calling PQconnectdbParams from C++ with a char**  (Craig Ringer <ringerc@ringerc.id.au>)
Responses Re: BUG #6216: Calling PQconnectdbParams from C++ with a char**  (Craig Ringer <ringerc@ringerc.id.au>)
List pgsql-bugs
ghtOn Wed, Sep 21, 2011 at 07:29:23AM +0800, Craig Ringer wrote:
> On 21/09/2011 12:05 AM, Lionel Elie Mamane wrote:

>>Bug reference:      6216
>>Logged by:          Lionel Elie Mamane
>>Email address:      lionel@mamane.lu

>> In C++, a "char**" value is not convertible to a "const char**"
>> value, (...)

>> This means one cannot call libpq's PQconnectdbParams and friends
>> passing them a "char**" value for keywords and/or values, as these
>> arguments are declared "const char**".

> Lionel: Can I get you to add the patch to the commitfest app?

> https://commitfest.postgresql.org/

Sure.

Topic "performance" is not right, but only value I was allowed to put,
and it wanted a value...

I added my initial patch, and as far as I understand, I have to send
the revised patch to the list before I can register it at the
commitfest. So here is my revised patch, that uses "const char *const * "
like elsewhere in the same file instead of "char const* const*".

--
Lionel

Attachment

pgsql-bugs by date:

Previous
From: pratikchirania
Date:
Subject: Re: Timezone issues with Postrres
Next
From: Robert Haas
Date:
Subject: Re: BUG #6205: ERROR: temporary tables cannot specify a schema name