create function inline_0 () returns integer as' begin perform acs_object_type__create_type( ''forums_forum'', ''Forums Forum'', ''Forums Forums'', ''acs_object'', ''forums_forums'', ''forum_id'', ''forums_forum'', ''f'', null, ''forums_forum__name'' ); return null; end;' language 'plpgsql'; select inline_0(); drop function inline_0();As you don't do anything with the return value here, I wonder what's the reason for the use of that inline function. As a counter-example here's how Jeff does it in his Photo Album:
select content_type__create_type ( 'pa_album', -- content_type 'content_revision', -- supertype 'Photo album', -- pretty_name 'Photo albums', -- pretty_plural 'pa_albums', -- table_name 'pa_album_id', -- id_column null -- name_method );I'm not saying these old scripts should be changed, since it doesn't harm anyone if they use inline functions. I'd just want to point out that you don't have to use inline functions in order to call another function unless you a) need to use the return value of that function later, or b) need to call that function in a loop for many entries.
If I haven't understood something totally wrong, that is