Index: openacs-4/packages/lars-blogger/sql/postgresql/lars-blogger-categories-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/sql/postgresql/lars-blogger-categories-create.sql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/lars-blogger/sql/postgresql/lars-blogger-categories-create.sql	17 Oct 2003 00:39:22 -0000	1.2
+++ openacs-4/packages/lars-blogger/sql/postgresql/lars-blogger-categories-create.sql	8 Dec 2003 05:10:23 -0000	1.3
@@ -33,74 +33,4 @@
   short_name            varchar(4000) not null
 );
 
-create or replace function pinds_blog_category__name (integer)
-returns varchar as '
-declare
-    p_category_id     alias for $1;
-    v_name            varchar;
-begin
-    select title into v_name
-        from pinds_blog_categories
-        where category_id = p_category_id;
-    return v_name;
-end;
-' language 'plpgsql';
-
-create or replace function pinds_blog_category__new (
-    integer,     -- category_id
-    integer,     -- package_id
-    varchar,     -- name
-    varchar,     -- short_name
-    integer,     -- creation_user
-    varchar      -- creation_ip
-) returns integer as '
-declare
-    p_category_id          alias for $1;
-    p_package_id           alias for $2;
-    p_name                 alias for $3;
-    p_short_name           alias for $4;
-    p_creation_user        alias for $5;
-    p_creation_ip          alias for $6;
-    v_category_id          integer;
-begin
-    v_category_id := acs_object__new (
-        p_category_id,
-        ''pinds_blog_category'',
-        current_timestamp,
-        p_creation_user,
-        p_creation_ip,
-        p_package_id
-    );
-
-    insert into pinds_blog_categories (
-      category_id, 
-      package_id,
-      name,
-      short_name
-    ) values (
-      v_category_id, 
-      p_package_id,
-      p_name,
-      p_short_name
-    );
-
-    return v_category_id;   
-end;
-' language 'plpgsql';
-
-create or replace function pinds_blog_category__delete (integer)
-returns integer as '
-declare
-    p_category_id alias for $1;
-begin
-    update pinds_blog_entries
-        set category_id = null
-        where category_id = p_category_id;
-
-    delete from pinds_blog_categories
-        where category_id = p_category_id;
-
-    PERFORM acs_object__delete(p_category_id);
-    return 0;
-end;
-' language 'plpgsql';
+\i lars-blogger-categories-pb.sql
