[Libpqxx-general] Exec query with binary parameters

Michael Akinde michael.akinde at met.no
Wed Mar 25 15:16:06 UTC 2009


Hi,

I have now patched in a simple PQExecParams function into 
connection_base and transaction_base, and preliminary tests are showing 
4-5 times improved write performance when using this over T.exec in our 
application.

We would like to see this functionality included in future versions of 
pqxx. How would we go about contributing this (I assume some more 
comprehensive tests would need to be implemented, etc.)?

Regards,

Michael A.
WDB / wdb.met.no

Michael Akinde wrote:
> No interest in this question? It would be nice to know if this is 
> worth doing, before we spend a bunch of time trying to implement this.
>
> Regards,
>
> Michael A.
> WDB / wdb.met.no
>
> Michael Akinde wrote:
>> Hi,
>>
>> In our project, we use pqxx to insert large binary objects into a 
>> postgres database. Recently, we've moved from large objects to bytea 
>> objects in the database, but have hit upon a complication. Inserting 
>> very large binary objects apparently forces us to convert the binary 
>> data to text in order to use T.exec().
>>
>> libpq, of course, has the PQExecParam function which allows to pass 
>> variables as binary objects.
>>
>> Pqxx does not include this functionality, as far as I can see. Or 
>> have I missed something?
>>
>> Looking at the implementation of T.exec, it seems that it would be 
>> easy to include a similar function ( T.execParam ? ) that maps to 
>> PQExecParam instead of PQExec. Is there anything that would 
>> complicate that?
>>
>> Regards,
>>
>> Michael A.
>> WDB / wdb.met.no _______________________________________________
>> Libpqxx-general mailing list
>> Libpqxx-general at pgfoundry.org
>> http://pgfoundry.org/mailman/listinfo/libpqxx-general
>>   
>
> _______________________________________________
> Libpqxx-general mailing list
> Libpqxx-general at pgfoundry.org
> http://pgfoundry.org/mailman/listinfo/libpqxx-general
>   

-------------- next part --------------
A non-text attachment was scrubbed...
Name: michael.akinde.vcf
Type: text/x-vcard
Size: 287 bytes
Desc: not available
Url : http://pgfoundry.org/pipermail/libpqxx-general/attachments/20090325/668513b2/attachment.vcf 


More information about the Libpqxx-general mailing list