Re: PQfformat() and Composite Formatted Results - Mailing list pgsql-interfaces

From Tom Lane
Subject Re: PQfformat() and Composite Formatted Results
Date
Msg-id 16194.1135986735@sss.pgh.pa.us
Whole thread Raw
In response to PQfformat() and Composite Formatted Results  (Volkan YAZICI <yazicivo@ttnet.net.tr>)
Responses Re: PQfformat() and Composite Formatted Results  (Volkan YAZICI <yazicivo@ttnet.net.tr>)
List pgsql-interfaces
Volkan YAZICI <yazicivo@ttnet.net.tr> writes:
> PQfformat() returns the format code indicating the format of the
> given column. But, AFAIC, it's not possible to gather composite
> formatted results using current query execution functions. They
> only permit to specify the return format of the whole result
> struct. (Like all of them will be binary or text.) Therefore, there
> doesn't remain any usage difference between PQbinaryTuples() and
> PQfformat().

> Please fix me if I'm wrong. Is this remained as a TODO for the
> protocol or I missed something totally?

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.
        regards, tom lane


pgsql-interfaces by date:

Previous
From: Volkan YAZICI
Date:
Subject: PQfformat() and Composite Formatted Results
Next
From: Volkan YAZICI
Date:
Subject: Re: Convertion of date/time binary format to text format