Re: [PATCHES] libpq type system 0.9a

From: Andrew Chernow <ac(at)esilo(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Martijn van Oosterhout <kleptog(at)svana(dot)org>, Greg Sabino Mullane <greg(at)turnstep(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCHES] libpq type system 0.9a
Date: 2008-04-09 15:17:10
Message-ID: 47FCDDF6.2020002@esilo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Andrew Chernow wrote:
>>
>> What parts of PGconn/PGresult do you need to touch that aren't exposed
>> already?

Don't need direct access to PGconn at all.

result:
null_field
tupArrSize
client_encoding (need a PGconn for this which might be dead)
pqSetResultError
pqResultAlloc
pqResultStrdup

Also, we basically need write access to every member inside a result
object ... since we create our own for arrays and composites by copying
the standard result members over.

/* taken from dupresult inside handlers/utils.c */

PGresult *r = (PGresult *)malloc(sizeof(PGresult));
memset(r, 0, sizeof(PGresult));

/* copy some data from source result */
r->binary = args->get.result->binary;
r->resultStatus = args->get.result->resultStatus;
r->noticeHooks = args->get.result->noticeHooks;
r->client_encoding = args->get.result->client_encoding;
strcpy(r->cmdStatus, args->get.result->cmdStatus);

[snip...]

We can read args->get.result properties using PQfuncs with no problem.
But we have no way of assign these values to our result 'r'.

--
Andrew Chernow
eSilo, LLC
every bit counts
http://www.esilo.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2008-04-09 15:18:38 Re: Calling GSoc Mentors
Previous Message Bruce Momjian 2008-04-09 15:04:49 Re: Commit fest queue

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2008-04-09 15:32:03 Re: [PATCHES] libpq type system 0.9a
Previous Message Tom Lane 2008-04-09 14:56:20 Re: EXPLAIN progress info