On 02/23/2011 10:40 AM, Kenneth Marshall wrote:
>
>>> Can someone please point me in the direction of an established client
>>> library/driver where all corner cases are covered, or at least enough
>>> of them to produce a net gain in usefulness? There may well be
>>> additional subtleties that have not occurred to me.
>> yes: libpqtypes. it manages everything in binary. i've been thinking
>> for a while that libpqtypes could be wrapped with variadic templates
>> or other c++ trickery. Because libpqtypes does everything in binary,
>> it completely sidesteps all the escaping nastiness.
>>
> Avoiding the escaping by using binary parameter transmission is
> the best method. Shameless plug: libpqtypes is great!
> I hope that it can be eventually included in the core distribution.
> It is not uncommon to get "It's an add-on package???" and avoidance
> of pieces outside of the standard dist regardless of its value.
>
>
Binary mode had serious limitations, such as portability.
We do need some support in libpq for constructing and deconstructing
arrays (and probably for composites too, although that will be harder, I
suspect).
cheers
andrew