Index: openacs-4/contrib/packages/general-comments/sql/postgresql/general-comments-plsql-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/general-comments/sql/postgresql/Attic/general-comments-plsql-create.sql,v
diff -u -r1.3 -r1.4
--- openacs-4/contrib/packages/general-comments/sql/postgresql/general-comments-plsql-create.sql	8 May 2003 11:20:20 -0000	1.3
+++ openacs-4/contrib/packages/general-comments/sql/postgresql/general-comments-plsql-create.sql	12 May 2003 03:05:16 -0000	1.4
@@ -57,22 +57,42 @@
 		p_object_id
 		);
 
+	perform acs_permission__grant_permission(p_comment_id,
+	                                         p_creation_user,
+	                                         ''read'');
+	perform acs_permission__grant_permission(p_comment_id,
+	                                         p_creation_user,
+	                                         ''write'');
+
 return p_comment_id;
 end;' language 'plpgsql';
 
-create or replace function general_comment__del(integer) returns integer as '
+create or replace function general_comment__del(
+		integer
+		) returns integer as '
 declare
-	p_item_id alias for $1;
+	p_comment_id alias for $1;
 begin
+	-- remove permssions from the object
+	delete from acs_permissions where object_id=:p_comment_id;
+	-- handle attachments and child comments for threaded comments?
 
+	-- do we need to remove live_revision and latest_revision first?
+	perform content_item__delete(p_comment_id);
+
+	delete from general_comments where comment_id=:p_comment_id;
+
 return NULL;
 end;' language 'plpgsql';
 
-create or replace function general_comment__set() returns integer as '
+create or replace function general_comment__revise(
+		integer
+		) returns integer as '
 declare
-
+	p_comment_id    alias for $1
 begin
-
+	-- create a new revision of a comment
+	-- does the UI even offer this option?
 return NULL;
 end;' language 'plpgsql';
 
