Forum OpenACS Development: Re: Best example package for using the OpenACS permission system, on PostgreSQL?

I noticed that many (older?) PostgreSQL packages (like forums) run PL/pgSQL code (e.g., calls to acs_object_type__create_type) from their *-create.sql files by creating, running, and then dropping an inline_0 helper function.

The inline_0 helpers are relicts from earlier versions of PostgreSQL. The trick with the helper can be replaced by DO, which supports anonymous code blocks. DO was introduced by PostgreSQL 9.6.

... define_function_args ...
This function is used to guide calls from Tcl to these functions. If you do not intend to call your own stored functions/procedures from Tcl, this is not needed. Since Tcl does not have function resolution based on types (like e.g. plpgsql) it makes clear what function to call, ... and it provides argument names, when SQL functions are defined without argument names, etc.