Index: openacs-4/packages/cronjob/sql/postgresql/cronjob-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cronjob/sql/postgresql/cronjob-create.sql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/cronjob/sql/postgresql/cronjob-create.sql	4 Nov 2001 18:07:08 -0000	1.1
+++ openacs-4/packages/cronjob/sql/postgresql/cronjob-create.sql	15 Nov 2001 20:29:36 -0000	1.2
@@ -5,9 +5,6 @@
 -- @cvs-id $Id$
 --
 
--- You might comment out this line
-drop table cronjobs;
-
 create table cronjobs (
 	cronjob_id integer not null
    constraint cj_cronjob_id_fk references acs_objects(object_id)
@@ -29,31 +26,26 @@
   email   varchar(255)
 );
  
-create function inline_0 () 
-returns integer as '  
-begin 
-    PERFORM acs_object_type__create_type (  
-  ''cronjob'', -- object_type  
-  ''CronJob'', -- pretty_name 
-  ''CronJobs'', -- pretty_plural 
-  ''acs_object'',   -- supertype 
-  ''cronjobs'', -- table_name 
-  ''cronjob_id'', -- id_column 
+-- DRB: since I had to remove the various "drop" commands that caused install-stopping
+-- errors in the APM, I got rid of the inline function that used to surround this call
+-- as well.  The inline func approach is great when you need to initialize a bunch
+-- of things in a single transaction (in order to get a clean rollback on failure) but
+-- IMO it just sorta obfuscates the source code if you're just doing a single
+-- command.  All those ugly double apostrophes that are required, etc...
+
+select acs_object_type__create_type (  
+  'cronjob', -- object_type  
+  'CronJob', -- pretty_name 
+  'CronJobs', -- pretty_plural 
+  'acs_object',   -- supertype 
+  'cronjobs', -- table_name 
+  'cronjob_id', -- id_column 
   null, -- package_name 
-  ''f'', -- abstract_p 
+  'f', -- abstract_p 
   null, -- type_extension_table 
   null -- name_method 
-  ); 
+); 
 
-     return 0;  
-end;' language 'plpgsql'; 
-
-select inline_0 (); 
- 
-drop function inline_0 ();
-
-drop function  cronjob__cronjob_p (integer);
-
 create function cronjob__cronjob_p (integer)
 returns boolean
 as '
@@ -72,8 +64,6 @@
  end if;
 end;' language 'plpgsql';
 
-drop function cronjob__new (integer, integer, varchar, char, char, char(2), char(2), char(2), char(2), char(2), text, text, varchar, integer, varchar, integer);
-
 create function cronjob__new (integer, integer, varchar, char, char, char(2), char(2), char(2), char(2), char(2), text, text, varchar, integer, varchar, integer)
 returns integer as '
 declare 
@@ -115,8 +105,6 @@
 
 end;' language 'plpgsql';
 
-drop function cronjob__delete (integer);
-
 create function cronjob__delete (integer)
 returns integer as '
 declare
@@ -139,8 +127,6 @@
 
 end;' language 'plpgsql';
 
-drop function cronjob__set_attrs (integer, integer, varchar, char, char, char(2), char(2), char(2), char(2), char(2), text, text, varchar);
-
 create function cronjob__set_attrs (integer, integer, varchar, char, char, char(2), char(2), char(2), char(2), char(2), text, text, varchar)
 returns integer 
 as '
@@ -223,8 +209,6 @@
   return v_return;
 end;' language 'plpgsql';
 
-drop function cronjob__reset_attr (integer,varchar);
-
 create function cronjob__reset_attr (integer,varchar)
 returns integer 
 as '
