Forum OpenACS Q&A: Response to Slow SubSelect in BBoard Forum

Collapse
Posted by MaineBob OConnor on

OK, my above code works:

select get_last_bbthread('000400','000401');
 get_last_bbthread 
-------------------
 t
(1 row)

Now, I'm onto creating a trigger but it seems not to see my function:

CREATE TRIGGER bb_latest
BEFORE INSERT ON bbtest
FOR EACH ROW
EXECUTE PROCEDURE get_last_bbthread('root_msg_id','msg_id');

ERROR:  CreateTrigger: function get_last_bbthread() does not exist

Please help me find what is missing or incorrect. TIA.
Note: bbtest is the same as bboard and will eventually be changed in production.

-Bob