Index: openacs-4/packages/acs-content-repository/sql/postgresql/content-item.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/content-item.sql,v
diff -u -r1.50.2.6 -r1.50.2.7
--- openacs-4/packages/acs-content-repository/sql/postgresql/content-item.sql	10 Aug 2004 23:56:54 -0000	1.50.2.6
+++ openacs-4/packages/acs-content-repository/sql/postgresql/content-item.sql	21 Dec 2004 18:22:30 -0000	1.50.2.7
@@ -13,6 +13,7 @@
 create view content_item_globals as 
 select -100 as c_root_folder_id;
 
+select define_function_args('content_item__get_root_folder','item_id');
 create or replace function content_item__get_root_folder (integer)
 returns integer as '
 declare
@@ -758,6 +759,7 @@
 
 end;' language 'plpgsql';
 
+select define_function_args('content_item__is_published','item_id');
 create or replace function content_item__is_published (integer)
 returns boolean as '
 declare
@@ -777,7 +779,7 @@
  
 end;' language 'plpgsql' stable;
 
-
+select define_function_args('content_item__is_publishable','item_id');
 create or replace function content_item__is_publishable (integer)
 returns boolean as '
 declare
@@ -893,7 +895,7 @@
  
 end;' language 'plpgsql' stable;
 
-
+select define_function_args('content_item__is_valid_child','item_id,content_type,relation_tag');
 create or replace function content_item__is_valid_child (integer,varchar,varchar)
 returns boolean as '
 declare
@@ -1018,6 +1020,7 @@
  6) delete keyword associations
  7) delete all associated comments */
 
+select define_function_args('content_item__delete','item_id');
 create or replace function content_item__delete (integer)
 returns integer as '
 declare
@@ -1142,7 +1145,7 @@
   return 0; 
 end;' language 'plpgsql';
 
-
+select define_function_args('content_item__edit_name','item_id,name');
 create or replace function content_item__edit_name (integer,varchar)
 returns integer as '
 declare
@@ -1178,6 +1181,8 @@
   return 0; 
 end;' language 'plpgsql';
 
+select define_function_args('content_item__get_id','item_path,root_folder_id,resolve_index;f');
+
 create or replace function content_item__get_id (varchar,integer,boolean)
 returns integer as '
 declare
@@ -1526,6 +1531,8 @@
 --   return v_path;
  
 -- end;' language 'plpgsql';
+
+select define_function_args('content_item__get_path','item_id,root_folder_id');
 create or replace function content_item__get_path (integer,integer)
 returns varchar as '
 declare
@@ -1616,6 +1623,8 @@
  
 end;' language 'plpgsql';
 
+-- I hard code the content_item_globals.c_root_folder_id here
+select define_function_args('content_item__get_virtual_path','item_id,root_folder_id;-100');
 
 create or replace function content_item__get_virtual_path (integer,integer)
 returns varchar as '
@@ -1673,6 +1682,7 @@
   return 0; 
 end;' language 'plpgsql';
 
+select define_function_args('content_item__register_template','item_id,template_id,use_context');
 
 create or replace function content_item__register_template (integer,integer,varchar)
 returns integer as '
@@ -1706,6 +1716,7 @@
 end;' language 'plpgsql';
 
 
+select define_function_args('content_item__unregister_template','item_id,template_id,use_context');
 create or replace function content_item__unregister_template (integer,integer,varchar)
 returns integer as '
 declare
@@ -1745,6 +1756,7 @@
   return 0; 
 end;' language 'plpgsql';
 
+select define_function_args('content_item__get_template','item_id,use_context');
 
 create or replace function content_item__get_template (integer,varchar)
 returns integer as '
@@ -1792,7 +1804,7 @@
  
 end;' language 'plpgsql' stable strict;
 
-
+select define_function_args('content_item__get_content_type','item_id');
 create or replace function content_item__get_content_type (integer)
 returns varchar as '
 declare
@@ -1811,6 +1823,7 @@
  
 end;' language 'plpgsql' stable strict;
 
+select define_function_args('content_item__get_live_revision','item_id');
 
 create or replace function content_item__get_live_revision (integer)
 returns integer as '
@@ -1830,7 +1843,7 @@
  
 end;' language 'plpgsql' stable strict;
 
-
+select define_function_args('content_item__set_live_revision','item_id,publish_status;ready');
 create or replace function content_item__set_live_revision (integer) returns integer as '
 declare
   set_live_revision__revision_id    alias for $1;  
@@ -1890,7 +1903,7 @@
   return 0; 
 end;' language 'plpgsql';
 
-
+select define_function_args('content_item__unset_live_revision','item_id');
 create or replace function content_item__unset_live_revision (integer)
 returns integer as '
 declare
@@ -1917,6 +1930,8 @@
   return 0; 
 end;' language 'plpgsql';
 
+select define_function_args('content_item__set_release_period','item_id,start_when,end_when');
+
 create or replace function content_item__set_release_period (integer, timestamptz, timestamptz)
 returns integer as '
 declare
@@ -1948,6 +1963,7 @@
   return 0; 
 end;' language 'plpgsql';
 
+select define_function_args('content_item__get_revision_count','item_id');
 
 create or replace function content_item__get_revision_count (integer)
 returns integer as '
@@ -1967,7 +1983,7 @@
  
 end;' language 'plpgsql' stable;
 
-
+select define_function_args('content_item__get_context','item_id');
 create or replace function content_item__get_context (integer)
 returns integer as '
 declare
@@ -2012,6 +2028,7 @@
 return null;
 end;' language 'plpgsql';
 
+select define_function_args('content_item__move','item_id,target_folder_id,name');
 create or replace function content_item__move (integer,integer,varchar)
 returns integer as '
 declare
@@ -2105,6 +2122,7 @@
 
 end;' language 'plpgsql';
 
+select define_function_args('content_item__copy','item_id,target_folder_id,creation_user,creation_ip,name');
 create or replace function content_item__copy (
 	integer,
 	integer,
@@ -2238,7 +2256,7 @@
  
 end;' language 'plpgsql';
 
-
+select define_function_args('content_item__get_latest_revision','item_id');
 create or replace function content_item__get_latest_revision (integer)
 returns integer as '
 declare
@@ -2266,7 +2284,7 @@
  
 end;' language 'plpgsql' strict stable;
 
-
+select define_function_args('content_item__get_best_revision','item_id');
 create or replace function content_item__get_best_revision (integer)
 returns integer as '
 declare
@@ -2287,7 +2305,7 @@
  
 end;' language 'plpgsql' stable strict;
 
-
+select define_function_args('content_item__get_title','item_id,is_live;f');
 create or replace function content_item__get_title (integer,boolean)
 returns varchar as '
 declare
@@ -2346,7 +2364,7 @@
 
 end;' language 'plpgsql' stable strict;
 
-
+select define_function_args('content_item__get_publish_date','item_id,is_live;f');
 create or replace function content_item__get_publish_date (integer,boolean)
 returns timestamptz as '
 declare
@@ -2380,7 +2398,7 @@
  
 end;' language 'plpgsql' stable;
 
-
+select define_function_args('content_item__is_subclass','object_type,supertype');
 create or replace function content_item__is_subclass (varchar,varchar)
 returns boolean as '
 declare
@@ -2400,7 +2418,7 @@
 
 end;' language 'plpgsql' stable;
 
-
+select define_function_args('content_item__relate','item_id,object_id,relation_tag;generic,order_n,relation_type;cr_item_rel');
 create or replace function content_item__relate (integer,integer,varchar,integer,varchar)
 returns integer as '
 declare
@@ -2495,6 +2513,7 @@
  
 end;' language 'plpgsql';
 
+select define_function_args('content_item__unrelate','rel_id');
 
 create or replace function content_item__unrelate (integer)
 returns integer as '
@@ -2511,6 +2530,7 @@
   return 0; 
 end;' language 'plpgsql';
 
+select define_function_args('content_item__is_index_page','item_id,folder_id');
 
 create or replace function content_item__is_index_page (integer,integer)
 returns boolean as '
@@ -2526,6 +2546,8 @@
  
 end;' language 'plpgsql' stable;
 
+select define_function_args('content_item__get_parent_folder','item_id');
+
 create or replace function content_item__get_parent_folder (integer)
 returns integer as '
 declare
