Index: openacs-4/packages/dotlrn/dotlrn.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/dotlrn.info,v diff -u -N -r1.136 -r1.137 --- openacs-4/packages/dotlrn/dotlrn.info 10 Oct 2009 22:38:09 -0000 1.136 +++ openacs-4/packages/dotlrn/dotlrn.info 8 Nov 2010 13:17:44 -0000 1.137 @@ -7,14 +7,14 @@ f f - + OpenACS A Course Management System 2009-07-22 OpenACS Course Management - + Index: openacs-4/packages/dotlrn/sql/postgresql/communities-package-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/communities-package-create.sql,v diff -u -N -r1.9 -r1.10 --- openacs-4/packages/dotlrn/sql/postgresql/communities-package-create.sql 1 Feb 2009 21:56:45 -0000 1.9 +++ openacs-4/packages/dotlrn/sql/postgresql/communities-package-create.sql 8 Nov 2010 13:17:44 -0000 1.10 @@ -77,7 +77,7 @@ v_parent_object_type:= p_parent_type; end if; - select acs_object_id_seq.nextval + select nextval(''t_acs_object_id_seq'') into v_unique_name from dual; Index: openacs-4/packages/dotlrn/sql/postgresql/site-templates-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/site-templates-create.sql,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/dotlrn/sql/postgresql/site-templates-create.sql 8 Aug 2006 21:26:22 -0000 1.2 +++ openacs-4/packages/dotlrn/sql/postgresql/site-templates-create.sql 8 Nov 2010 13:17:44 -0000 1.3 @@ -75,7 +75,7 @@ from portal_element_themes where name = ''#new-portal.sloan_theme_name#''; - select acs_object_id_seq.nextval + select nextval(''t_acs_object_id_seq'') into v_site_template_id from dual; Index: openacs-4/packages/dotlrn/sql/postgresql/upgrade/upgrade-2.6.0d1-2.6.0d2.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/upgrade/upgrade-2.6.0d1-2.6.0d2.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/sql/postgresql/upgrade/upgrade-2.6.0d1-2.6.0d2.sql 8 Nov 2010 13:17:44 -0000 1.1 @@ -0,0 +1,73 @@ +-- +-- +-- +-- @author Victor Guerra (vguerra@gmail.com) +-- @creation-date 2010-11-08 +-- @cvs-id $Id: upgrade-2.6.0d1-2.6.0d2.sql,v 1.1 2010/11/08 13:17:44 victorg Exp $ +-- + +-- PG 9.0 compatibility. Changes regarding usage of sequences. + +create or replace function dotlrn_community_type__new (varchar,varchar,varchar,varchar,varchar,integer,timestamptz,integer,varchar,integer) +returns varchar as ' +DECLARE + p_community_type alias for $1; + p_parent_type alias for $2; + p_pretty_name alias for $3; + p_pretty_plural alias for $4; + p_description alias for $5; + p_package_id alias for $6; + p_creation_date alias for $7; + p_creation_user alias for $8; + p_creation_ip alias for $9; + p_context_id alias for $10; + v_parent_object_type acs_object_types.object_type%TYPE; + v_unique_name acs_objects.object_id%TYPE; +BEGIN + if p_parent_type is null then + v_parent_object_type:= ''application_group''; + else + v_parent_object_type:= p_parent_type; + end if; + + select nextval(''t_acs_object_id_seq'') + into v_unique_name + from dual; + + PERFORM acs_object_type__create_type ( + p_community_type, + p_community_type, + p_community_type, + v_parent_object_type, + cast(v_unique_name as varchar), + cast(v_unique_name as varchar), + cast(v_unique_name as varchar), + ''f'', + null, + ''acs_group.name'' + ); + + insert + into group_types + (group_type, default_join_policy) + values + (p_community_type, ''closed''); + + insert + into dotlrn_community_types + (community_type, + pretty_name, + description, + package_id, + supertype) + values + (p_community_type, + p_pretty_name, + p_description, + p_package_id, + p_parent_type); + + return p_community_type; +END; +' language 'plpgsql'; + Index: openacs-4/packages/dotlrn/tcl/applets-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/applets-procs.tcl,v diff -u -N -r1.22 -r1.23 --- openacs-4/packages/dotlrn/tcl/applets-procs.tcl 12 May 2010 14:15:34 -0000 1.22 +++ openacs-4/packages/dotlrn/tcl/applets-procs.tcl 8 Nov 2010 13:17:44 -0000 1.23 @@ -69,6 +69,7 @@ return } + set applet_id [db_nextval acs_object_id_seq] db_dml insert {} } Index: openacs-4/packages/dotlrn/tcl/applets-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/applets-procs.xql,v diff -u -N -r1.6 -r1.7 --- openacs-4/packages/dotlrn/tcl/applets-procs.xql 13 Jul 2002 03:05:24 -0000 1.6 +++ openacs-4/packages/dotlrn/tcl/applets-procs.xql 8 Nov 2010 13:17:44 -0000 1.7 @@ -26,7 +26,7 @@ into dotlrn_applets (applet_id, applet_key, package_key, active_p) values - (acs_object_id_seq.nextval, :applet_key, :package_key, :active_p) + (:applet_id, :applet_key, :package_key, :active_p) Index: openacs-4/packages/dotlrn/tcl/term-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/Attic/term-procs-oracle.xql,v diff -u -N -r1.6 -r1.7 --- openacs-4/packages/dotlrn/tcl/term-procs-oracle.xql 26 Jul 2002 02:01:34 -0000 1.6 +++ openacs-4/packages/dotlrn/tcl/term-procs-oracle.xql 8 Nov 2010 13:17:44 -0000 1.7 @@ -9,7 +9,7 @@ into dotlrn_terms (term_id, term_name, term_year, start_date, end_date) values - (acs_object_id_seq.nextval, :term_name, :term_year, to_date(:start_date, :date_format), to_date(:end_date, :date_format)) + (:term_id, :term_name, :term_year, to_date(:start_date, :date_format), to_date(:end_date, :date_format)) Index: openacs-4/packages/dotlrn/tcl/term-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/Attic/term-procs-postgresql.xql,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/dotlrn/tcl/term-procs-postgresql.xql 26 Jul 2002 02:01:34 -0000 1.2 +++ openacs-4/packages/dotlrn/tcl/term-procs-postgresql.xql 8 Nov 2010 13:17:44 -0000 1.3 @@ -9,7 +9,7 @@ into dotlrn_terms (term_id, term_name, term_year, start_date, end_date) values - (acs_object_id_seq.nextval, :term_name, :term_year, to_date(:start_date, :date_format), to_date(:end_date, :date_format)) + (:term_id, :term_name, :term_year, to_date(:start_date, :date_format), to_date(:end_date, :date_format)) Index: openacs-4/packages/dotlrn/tcl/term-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/term-procs.tcl,v diff -u -N -r1.10 -r1.11 --- openacs-4/packages/dotlrn/tcl/term-procs.tcl 8 Aug 2006 21:26:23 -0000 1.10 +++ openacs-4/packages/dotlrn/tcl/term-procs.tcl 8 Nov 2010 13:17:44 -0000 1.11 @@ -41,6 +41,7 @@ set start_date "[template::util::date::get_property year $start_date] [template::util::date::get_property month $start_date] [template::util::date::get_property day $start_date]" set end_date "[template::util::date::get_property year $end_date] [template::util::date::get_property month $end_date] [template::util::date::get_property day $end_date]" set date_format [get_date_format] + set term_id [db_nextval acs_object_id_seq] db_dml insert_term {} }