     ddl_command := ddl_command
       || declare_block
       || E'\nBEGIN'
-      || set_objclass_block
+      || objclass_block
       || pre_block
       || E'\n  -- delete '||$1||'s'
       || delete_block

*
* FUNCTIONS:
*   check_for_cleanup(ref_table OID) RETURNS OID
*   create_array_delete_dummy(table_name TEXT, schema_name TEXT DEFAULT 'citydb') RETURNS SETOF VOID
*   create_array_delete_function(table_name TEXT, schema_name TEXT DEFAULT 'citydb') RETURNS SETOF VOID
*   create_array_delete_member_fct(table_name TEXT, schema_name TEXT DEFAULT 'citydb') RETURNS SETOF VOID
*   create_delete_function(table_name TEXT, schema_name TEXT DEFAULT 'citydb') RETURNS SETOF VOID

  
  IF has_objclass_param THEN
    args := '(pid int, objclass_id int DEFAULT NULL)';
    child_ref_block :=
         E'\n  -- fetch objectclass_id if not set'
      || E'\n  IF objclass_id IS NULL THEN'
      || E'\n    SELECT'
