Thread: transfer binary data to C-language function

transfer binary data to C-language function

From
Rolf Mueller
Date:
Dear PostgreSQL-experts,

may I request your advice for implementing the following application:

I have binary data vectors of experimental data, about 10 million of
them in total, each between 10 and 40 Kbytes long. I want to store the
experimental conditions pertaining to each of the data vectors in a
PostgreSQL database and the data themselves in a file. I want to do
this file-handling (creation, reading & writing) in a compiled (C)
language function, so that I can do everything over one database
connection, instead of having a separate program on a separate port
take care of the data files. Right now, I am converting the data
vectors to a string representation and back. But I wonder whether
there is a more efficient way of handing over the data to my function?

Thank you very much for your help.

Rolf

Rolf Mueller, rolf.mueller@uni-tuebingen.de
Biosonar Lab, Tuebingen University,
Morgenstelle 28, 72076 Tuebingen
Phone +49 7071 29-74838  Fax. +49 7071 292618