how to write a post-save trigger The node_api hook provides a bunch of triggers which allows you to customize what might happen on, for example, a presave. The node_api presave opcode triggers an action to occur after clicking on the node 'save' button but BEFORE the information in the node form is inserted into the database. I would like to create a trigger which will be a post-save trigger, to trigger my custom code after clicking the save button but AFTER the node info has been saved into the database. Does anyone have any ideas of how I might create such a trigger? 

(I have read the documentation about how to create a trigger, I just don't know to code the trigger I am describing above.)
Just to break the process down a bit (based on your other questions:1,2); when you submit a node form:


node_form_submit() calls node_save().
node_save() immediately calls node_invoke_nodeapi($node, 'presave'); to inform other modules about the presave.
node_save() then sets up a few properties on the node object, and the node record is written to the node table in the database using drupal_write_record().
At the very, very end of the function (after the data has been written to the node table), node_invoke_nodeapi() is called again with either 'insert' or 'update', depending on the current operation being run.


If you look through those functions, and the summary above, you'll see that the node data is 100%, definitely committed to the database before the 'insert' or 'update' operations are run for hook_nodeapi().

If that's not happening for your installation I would strongly recommend replacing core with a fresh version, as it sounds like something's gone horribly wrong!

Getting to the actual question; the only way you can add a post-save hook is to add another line in the core node_save() function to invoke it. But you would be adding it immediately after the call to node_invoke_nodeapi($node, $op); (where $op is 'insert' or 'update') anyway, so I'm not sure that would help.