They work fine. However because they need to open their own connection to insert into tables and write into large objects, etc, they aren't transaction safe. That is to say, if a user starts a transaction,
executes my functions, and then tries to abort or roll back the transaction,
nothing will happen because the work was done in a different connection.
Now I'm trying to make the functions transaction safe. In theory, all I need to do is convert my libpq calls to equivalent SPI calls. However, there don't appear to be any SPI equivalents for the large object functions like lo_write and lo_read. Relying on the Toaster mechanism is not an option as my data sizes are too large to fit in memory. Am I correct in believing that large objects can not be directly handled by a server function in a transaction safe manner?
Thank you
Eric.
Eric Davies, M.Sc.
Barrodale Computing Services Ltd.
Tel: (250) 472-4372 Fax: (250) 472-4373
Web: http://www.barrodale.com
Email: eric@xxxxxxxxxxxxx
**********************************************
Mailing Address:
P.O. Box 3075 STN CSC
Victoria BC Canada V8W 3W2
Shipping Address:
Hut R, McKenzie Avenue
University of Victoria
Victoria BC Canada V8W 3W2
**********************************************