Re: PQconninfo function for libpq

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: zb <zb(at)cybertec(dot)at>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>
Subject: Re: PQconninfo function for libpq
Date: 2012-11-30 06:02:52
Message-ID: CABUevEz8Uyf6jYVf8jSz9nOvVFbty7EZXwz9P66M28Vf0s4Qxg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Nov 28, 2012 at 7:01 AM, Magnus Hagander <magnus(at)hagander(dot)net> wrote:
>
> On Nov 28, 2012 1:54 AM, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>
>> Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
>> > Peter Eisentraut wrote:
>> >> There is already the PQconninfoOption.dispchar field for this purpose.
>>
>> > I had the impression that that field would go away with this patch, but
>> > then again it might not be worth the compatibility break. I find the
>> > dispchar thingy somewhat unsightly.
>>
>> It is that, without a doubt, but that API has been that way longer than
>> any of us have been working on the code. I'm not excited about changing
>> it just to have an allegedly-cleaner API. And we cannot have the field
>> simply "go away", because it's been exposed to applications for lo these
>> many years, and surely some of them are using it. So in practice we'd
>> be maintaining both the old API and the new one.
>>
>> I think we should leave it as-is until there are more reasons to change
>> it than seem to be provided in this thread.
>
> I think removing that would be a really bad idea. I'm not sure anybody is
> actually relying on it, but it would also change the size of the struct and
> thus break things for anybody using those functions.
>
> If people prefer we remove the password classifier for the new function
> since it at least partially duplicates that field we can certainly do that,
> but I think leaving it in allows those who write new code to use a slightly
> neater api, at pretty much no cost in maintenance for us.

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.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Albe Laurenz 2012-11-30 08:26:39 Re: [PATCH] Patch to fix a crash of psql
Previous Message JiangGuiqing 2012-11-30 05:53:16 Re: [PATCH] Patch to fix a crash of psql