Re: Allow substitute allocators for PGresult. - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Allow substitute allocators for PGresult.
Date
Msg-id CA+TgmoagHm_06sG6AhZRC8Oe+OHLhCdhAphZ+sn-cV5GQi24uQ@mail.gmail.com
Whole thread Raw
In response to Re: Allow substitute allocators for PGresult.  (Kyotaro HORIGUCHI <horiguchi.kyotaro@oss.ntt.co.jp>)
Responses Re: Allow substitute allocators for PGresult.  (Kyotaro HORIGUCHI <horiguchi.kyotaro@oss.ntt.co.jp>)
List pgsql-hackers
On Thu, Dec 8, 2011 at 5:41 AM, Kyotaro HORIGUCHI
<horiguchi.kyotaro@oss.ntt.co.jp> wrote:
>  This is the patch to add the documentation of PGresult custom
>  storage. It shows in section '31.19. Alternative result
>  storage'.

It would be good to consolidate this into the main patch.

I find the names of the functions added here to be quite confusing and
would suggest renaming them.  I expected PQgetAsCstring to do
something similar to PQgetvalue, but the code is completely different,
and even after reading the documentation I still don't understand what
that function is supposed to be used for.  Why "as cstring"?  What
would the other option be?

I also don't think the "add tuple" terminology is particularly good.
It's not obvious from the name that what you're doing is overriding
the way memory is allocated and results are stored.

Also, what about the problem Tom mentioned here?

http://archives.postgresql.org/message-id/1042.1321123761@sss.pgh.pa.us

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: CLOG contention
Next
From: Robert Haas
Date:
Subject: Re: CLOG contention