Thanks,
But I don't think my question was clear enough.
I already managed the connection pooling, and what I need is to serialize the result.
If PGresult was a contiguous block, I could have just create buffer and call memcpy for serialization, but structure of result seems much more complicated.
So, I was asking if there is an easy way to achieve serialization
Thanks!