About Triggers
От | wsmuir@islandnet.com |
---|---|
Тема | About Triggers |
Дата | |
Msg-id | 010330042525@islandnet.com обсуждение исходный текст |
Список | pgsql-novice |
Admittedly, this is a bit of a kludge, but I'm trying to do this for a website backend. I'm using 7.0.2, Redhat and the SPI to "do stuff" with data and ImageMagick. The interface to Magick is working well, but I'm attempting to optimize the time it takes for the SPI function to complete. Specifically, I have an insert which as a side-effect (trigger after insert) should start the SPI function. My problem is that initial testing has the insert waiting for the trigger to finish, and I don't need or want this to happen. The resulting image doesn't need to be used until later, but I also don't want to be rebuilding images at the time they're requested... does an 'after' trigger not start its own thread and release the triggering query(insert et al)? Is there a way of getting the behaviour I wish, or am I going to have to resort to Pthreads in C, or will this even accomplish this? the way I'm testing this is calling a pl function which returns a meaningless text string but has the insert in it...with pgaccess I don't get my meaningless string back until after the last debug line in the PL trigger gets logged (raise notice)... Thanks, Scott. Thank you... Scott
В списке pgsql-novice по дате отправления: