Re: PQfformat() and Composite Formatted Results

From: Volkan YAZICI <yazicivo(at)ttnet(dot)net(dot)tr>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: PQfformat() and Composite Formatted Results
Date: 2006-01-08 20:34:11
Message-ID: 20060108203411.GA11875@alamut
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Hi,

I've prepared a patch[1] which makes it possible to use composite formats
in query results.

It defines

PQexecParams()
PQexecPrepared()
PQsendQueryParams()
PQsendPrepared()

functions with last

int resultFormat

parameter replaced with

int nResFormat,
const int resParamFormats

Therefore, it breaks compatibility with the existing PQ*Params() and
PQ*Prepared() functions. (Use at your own risk.)

There's also a test case[2] too

[1] http://www.students.itu.edu.tr/~yazicivo/libpq_res_fmt.patch
[2] http://www.students.itu.edu.tr/~yazicivo/pg_res_fmt.c

Any comments will be appreciated.
Regards.

On Dec 30 06:52, Tom Lane wrote:
> It's not a protocol restriction, it's a libpq restriction made in the
> name of keeping the API from getting too unwieldy. We could add more
> entry points with different parameter lists to address this. I have
> a feeling that refactoring the API of the query functions entirely
> might be a better idea, though.

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Michael 2006-01-09 03:57:33 Compiling and linking a Program interfacing with libpq.dll
Previous Message Ludek Finstrle 2006-01-08 08:58:51 libpq and auth type