Here's an example from acs-content-repository/tcl/publish-procs.tcl:
db_blob_get_file wmb_get_blob_file " select content from cr_revisions where revision_id = $revision_id " -file $filename