Index: openacs-4/packages/cms/sql/postgresql/cms-permissions.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/sql/postgresql/cms-permissions.sql,v
diff -u -r1.10 -r1.11
--- openacs-4/packages/cms/sql/postgresql/cms-permissions.sql	23 Feb 2003 18:19:48 -0000	1.10
+++ openacs-4/packages/cms/sql/postgresql/cms-permissions.sql	17 May 2003 10:22:35 -0000	1.11
@@ -1,7 +1,7 @@
 -- This file will eventually replace content-perms.sql
 -- Implements the CMS permission
 
-create function inline_0 ()
+create or replace function inline_0 ()
 returns integer as '
 declare
   v_perms       boolean default ''f'';
@@ -213,7 +213,7 @@
 
 -- create or replace package body cms_permission
 -- procedure update_permissions
-create function cms_permission__update_permissions (integer,varchar)
+create or replace function cms_permission__update_permissions (integer,varchar)
 returns integer as '
 declare
   p_item_id                        alias for $1;  
@@ -304,7 +304,7 @@
 
 
 -- function has_grant_authority
-create function cms_permission__has_grant_authority (integer,integer,varchar)
+create or replace function cms_permission__has_grant_authority (integer,integer,varchar)
 returns boolean as '
 declare
   p_item_id                        alias for $1;  
@@ -328,7 +328,7 @@
 
 
 -- function has_revoke_authority
-create function cms_permission__has_revoke_authority (integer,integer,varchar,integer)
+create or replace function cms_permission__has_revoke_authority (integer,integer,varchar,integer)
 returns boolean as '
 declare
   p_item_id                        alias for $1;  
@@ -364,7 +364,7 @@
 );
 insert into v_items (value) values ('{0}');
 
-create function v_items_tr () returns opaque as '
+create or replace function v_items_tr () returns opaque as '
 begin
         raise EXCEPTION ''Only updates are allowed on this table'';
         return null;
@@ -379,7 +379,7 @@
 );
 insert into v_perms (value) values ('{''}');
 
-create function v_perms_tr () returns opaque as '
+create or replace function v_perms_tr () returns opaque as '
 begin
         raise EXCEPTION ''Only updates are allowed on this table'';
         return null;
@@ -391,7 +391,7 @@
 -- procedure grant_permission
 -- FIXME: need to fix problem with defined types
 
-create function cms_permission__grant_permission (integer,integer,varchar,integer,varchar)
+create or replace function cms_permission__grant_permission (integer,integer,varchar,integer,varchar)
 returns integer as '
 declare
   p_item_id                        alias for $1;  
@@ -480,7 +480,7 @@
 
 
 -- procedure revoke_permission
-create function cms_permission__revoke_permission (integer,integer,varchar,integer,varchar)
+create or replace function cms_permission__revoke_permission (integer,integer,varchar,integer,varchar)
 returns integer as '
 declare
   p_item_id                        alias for $1;  
@@ -576,7 +576,7 @@
 
 
 -- function permission_p
-create function cms_permission__permission_p (integer,integer,varchar)
+create or replace function cms_permission__permission_p (integer,integer,varchar)
 returns boolean as '
 declare
   p_item_id                        alias for $1;  
@@ -660,7 +660,7 @@
     
 end;' language 'plpgsql';
 
-create function cms_permission__cm_admin_exists() returns boolean as '
+create or replace function cms_permission__cm_admin_exists() returns boolean as '
 declare
     v_exists    boolean;
 begin
@@ -685,7 +685,7 @@
 -- A trigger to automatically grant item creators the cm_write and cm_perm
 -- permissions
 
-create function cr_items_permission_tr () returns opaque as '
+create or replace function cr_items_permission_tr () returns opaque as '
 declare
   v_user_id parties.party_id%TYPE;
 begin
@@ -801,7 +801,7 @@
 
 -- create or replace package body content_permission 
 -- procedure inherit_permissions
-create function content_permission__inherit_permissions (integer,integer,integer)
+create or replace function content_permission__inherit_permissions (integer,integer,integer)
 returns integer as '
 declare
   p_parent_object_id               alias for $1;  
@@ -814,7 +814,7 @@
 
 
 -- function has_grant_authority
-create function content_permission__has_grant_authority (integer,integer,varchar)
+create or replace function content_permission__has_grant_authority (integer,integer,varchar)
 returns boolean as '
 declare
   p_object_id                      alias for $1;  
@@ -829,7 +829,7 @@
 
 
 -- procedure grant_permission_h
-create function content_permission__grant_permission_h (integer,integer,varchar)
+create or replace function content_permission__grant_permission_h (integer,integer,varchar)
 returns integer as '
 declare
   p_object_id                      alias for $1;  
@@ -841,7 +841,7 @@
 
 
 -- procedure grant_permission
-create function content_permission__grant_permission (integer,integer,varchar,integer,varchar,varchar)
+create or replace function content_permission__grant_permission (integer,integer,varchar,integer,varchar,varchar)
 returns integer as '
 declare
   p_object_id                      alias for $1;  
@@ -860,7 +860,7 @@
 
 
 -- function has_revoke_authority
-create function content_permission__has_revoke_authority (integer,integer,varchar,integer)
+create or replace function content_permission__has_revoke_authority (integer,integer,varchar,integer)
 returns boolean as '
 declare
   p_object_id                      alias for $1;  
@@ -876,7 +876,7 @@
 
 
 -- procedure revoke_permission_h
-create function content_permission__revoke_permission_h (integer,integer,varchar)
+create or replace function content_permission__revoke_permission_h (integer,integer,varchar)
 returns integer as '
 declare
   p_object_id                      alias for $1;  
@@ -888,7 +888,7 @@
 
 
 -- procedure revoke_permission
-create function content_permission__revoke_permission (integer,integer,varchar,integer,varchar,varchar)
+create or replace function content_permission__revoke_permission (integer,integer,varchar,integer,varchar,varchar)
 returns integer as '
 declare
   p_object_id                      alias for $1;  
@@ -907,7 +907,7 @@
 
 
 -- function permission_p
-create function content_permission__permission_p (integer,integer,varchar)
+create or replace function content_permission__permission_p (integer,integer,varchar)
 returns boolean as '
 declare
   p_object_id                      alias for $1;  
