In theory, that would be enough. In practice someone has to write that do_this, do_that toplevel code as well. :-) (That is exactly what I’m doing, FWIW. If I had the choice of PostgreSQL, I’d in fact be writing stored procedures.)