Forum OpenACS Q&A: Response to Notes package inline functions

Collapse
Posted by Don Baccus on
It's not a singleton package.  The datamodel is only loaded once per packages no matter how many instances of it you mount on your site.  The different instances keep themselves straight through use of their associated package_id.

The inline_0 etch functions you find in the PostgreSQL data model files are generally used to create objects or other data when the package is first installed.  They are only run once.  In this case the object type "note" is being added to the system.

We use dummy functions because PostgreSQL doesn't implement inline PL/pgSQL blocks, unlike PL/SQL.  If you look at the Oracle equivalent you'll see that the equivalent code is being executed directly in an inline BEGIN END block in the datamodel create file.