Re: [GENERAL] storing C binary array in bytea via libpq

2016-12-09 Thread Merlin Moncure
On Wed, Dec 7, 2016 at 4:10 AM, Tom DalPozzo wrote: > Hi, > I tried both ways: they're ok. > Also, multiple VALUES in one INSERT is actually better as performance. If you are chasing performance with the binary protocol you might want to take a look at libpqtypes:

Re: [GENERAL] storing C binary array in bytea via libpq

2016-12-07 Thread Tom DalPozzo
Hi, I tried both ways: they're ok. Also, multiple VALUES in one INSERT is actually better as performance. Thanks again Pupillo 2016-12-06 19:49 GMT+01:00 Tom Lane : > [ please keep the list cc'd ] > > Tom DalPozzo writes: > > To be honest, I didn't

Re: [GENERAL] storing C binary array in bytea via libpq

2016-12-06 Thread Tom Lane
[ please keep the list cc'd ] Tom DalPozzo writes: > To be honest, I didn't know or I forgot about multiple VALUES in one > command! Thanks for reminding! > As for the PQexecParams, should I specify something in const Oid > *paramTypes parameter? Or just something like

Re: [GENERAL] storing C binary array in bytea via libpq

2016-12-06 Thread Tom Lane
Tom DalPozzo writes: > I've a table in which a field is BYTEA, as I need to store around 200 raw > bytes in this field. > I need to perform many many INSERT starting from a common C array and, in > order to get good performance, I want to do many of them in a single BEGIN

[GENERAL] storing C binary array in bytea via libpq

2016-12-06 Thread Tom DalPozzo
Hi, I've a table in which a field is BYTEA, as I need to store around 200 raw bytes in this field. I need to perform many many INSERT starting from a common C array and, in order to get good performance, I want to do many of them in a single BEGIN COMMIT block. What is the best choice from