My application receives JPG images as byte arrays from a device connected to the system. These need to be written to the PostgreSql 9.1 database's Large Objects table. I'm currently using C# and the Devart docConnect for PostgreSql library to access my database, and everything is working fine. The problem is that writing my data to the database (I need to update 2 tables plus write the image bytes to the large objects table) takes several trips to the database. I want to reduce the number of trips my code makes to the database to speed things up.
I have written a stored function which performs an UPSERT on the two tables. I want to pass the image bytes as a byte array parameter to the stored function and have the stored function write the image bytes to the large objects table. Is this possible? The documentation on server side functions in the PostgreSql 9.1 manual is skimpy and I'm not sure what function to call to read & write the data.
Thanks
Tony
byteainstead make things a lot easier?