Index: openacs-4/contrib/obsolete-packages/acs-workflow/sql/postgresql/workflow-case-package-body.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/acs-workflow/sql/postgresql/workflow-case-package-body.sql,v diff -u -r1.5 -r1.6 --- openacs-4/contrib/obsolete-packages/acs-workflow/sql/postgresql/workflow-case-package-body.sql 12 Feb 2002 01:35:16 -0000 1.5 +++ openacs-4/contrib/obsolete-packages/acs-workflow/sql/postgresql/workflow-case-package-body.sql 21 Dec 2002 22:30:11 -0000 1.6 @@ -1,6 +1,6 @@ -- create or replace package body workflow_case -- function new -create function workflow_case__new (integer,varchar,varchar,integer,timestamp,integer,varchar) +create function workflow_case__new (integer,varchar,varchar,integer,timestamp with time zone,integer,varchar) returns integer as ' declare new__case_id alias for $1; -- default null @@ -855,7 +855,7 @@ -- procedure set_case_deadline -create function workflow_case__set_case_deadline (integer,varchar,timestamp) +create function workflow_case__set_case_deadline (integer,varchar,timestamp with time zone) returns integer as ' declare set_case_deadline__case_id alias for $1; @@ -2063,8 +2063,6 @@ if not found then raise error ''Case % has no transition with key %'', get_task_id__case_id, get_task_id__transition_key; - return v_task_id; + return v_task_id;end;' language 'plpgsql'; -end;' language 'plpgsql'; - Index: openacs-4/packages/acs-content-repository/sql/postgresql/content-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/content-create.sql,v diff -u -r1.37 -r1.38 --- openacs-4/packages/acs-content-repository/sql/postgresql/content-create.sql 18 Nov 2002 18:07:01 -0000 1.37 +++ openacs-4/packages/acs-content-repository/sql/postgresql/content-create.sql 21 Dec 2002 22:32:31 -0000 1.38 @@ -705,7 +705,7 @@ constraint cr_release_periods_pk primary key, start_when timestamp default now(), - end_when timestamp default now() + (365 * 20) + end_when timestamp default now() + interval '20 years' ); create table cr_scheduled_release_log ( Index: openacs-4/packages/acs-content-repository/sql/postgresql/content-extlink.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/content-extlink.sql,v diff -u -r1.7 -r1.8 --- openacs-4/packages/acs-content-repository/sql/postgresql/content-extlink.sql 30 Apr 2001 01:34:58 -0000 1.7 +++ openacs-4/packages/acs-content-repository/sql/postgresql/content-extlink.sql 21 Dec 2002 22:32:31 -0000 1.8 @@ -12,7 +12,7 @@ -- create or replace package body content_extlink -- function new -create function content_extlink__new (varchar,varchar,varchar,varchar,integer,integer,timestamp,integer,varchar) +create function content_extlink__new (varchar,varchar,varchar,varchar,integer,integer,timestamp with time zone,integer,varchar) returns integer as ' declare new__name alias for $1; -- default null Index: openacs-4/packages/acs-content-repository/sql/postgresql/content-folder.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/content-folder.sql,v diff -u -r1.20 -r1.21 --- openacs-4/packages/acs-content-repository/sql/postgresql/content-folder.sql 8 Dec 2001 01:17:59 -0000 1.20 +++ openacs-4/packages/acs-content-repository/sql/postgresql/content-folder.sql 21 Dec 2002 22:32:31 -0000 1.21 @@ -33,7 +33,7 @@ end;' language 'plpgsql'; -- function new -create function content_folder__new (varchar,varchar,varchar,integer,integer,integer,timestamp,integer,varchar) +create function content_folder__new (varchar,varchar,varchar,integer,integer,integer,timestamp with time zone,integer,varchar) returns integer as ' declare new__name alias for $1; @@ -115,7 +115,7 @@ -- function new -- accepts security_inherit_p DaveB -create function content_folder__new (varchar,varchar,varchar,integer,integer,integer,timestamp,integer,varchar, boolean) +create function content_folder__new (varchar,varchar,varchar,integer,integer,integer,timestamp with time zone,integer,varchar, boolean) returns integer as ' declare new__name alias for $1; Index: openacs-4/packages/acs-content-repository/sql/postgresql/content-image.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/content-image.sql,v diff -u -r1.8 -r1.9 --- openacs-4/packages/acs-content-repository/sql/postgresql/content-image.sql 30 Nov 2002 17:15:25 -0000 1.8 +++ openacs-4/packages/acs-content-repository/sql/postgresql/content-image.sql 21 Dec 2002 22:32:31 -0000 1.9 @@ -120,7 +120,7 @@ -- The Oracle version does allow a non-image type to be specified, as does my -- alternative down below. This needs a little more straightening out. -create function image__new (varchar,integer,integer,integer,varchar,integer,varchar,varchar,varchar,varchar,boolean,timestamp,varchar,integer,integer,integer +create function image__new (varchar,integer,integer,integer,varchar,integer,varchar,varchar,varchar,varchar,boolean,timestamp with time zone,varchar,integer,integer,integer ) returns integer as ' declare new__name alias for $1; @@ -284,7 +284,7 @@ return v_item_id; end; ' language 'plpgsql'; -create function image__new_revision(integer, integer, varchar, varchar, timestamp, varchar, varchar, +create function image__new_revision(integer, integer, varchar, varchar, timestamp with time zone, varchar, varchar, integer, varchar, integer, integer) returns integer as ' declare p_item_id alias for $1; 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.39 -r1.40 --- openacs-4/packages/acs-content-repository/sql/postgresql/content-item.sql 25 May 2002 14:30:02 -0000 1.39 +++ openacs-4/packages/acs-content-repository/sql/postgresql/content-item.sql 21 Dec 2002 22:32:31 -0000 1.40 @@ -54,7 +54,7 @@ -- function new -create function content_item__new (varchar,integer,integer,varchar,timestamp,integer,integer,varchar,varchar,varchar,varchar,varchar,varchar,varchar,varchar,varchar) +create function content_item__new (varchar,integer,integer,varchar,timestamp with time zone,integer,integer,varchar,varchar,varchar,varchar,varchar,varchar,varchar,varchar,varchar) returns integer as ' declare new__name alias for $1; @@ -212,7 +212,7 @@ end;' language 'plpgsql'; -create function content_item__new (varchar,integer,integer,varchar,timestamp,integer,integer,varchar,varchar,varchar,varchar,varchar,varchar,varchar,integer) +create function content_item__new (varchar,integer,integer,varchar,timestamp with time zone,integer,integer,varchar,varchar,varchar,varchar,varchar,varchar,varchar,integer) returns integer as ' declare new__name alias for $1; @@ -416,7 +416,7 @@ -- function new -- sets security_inherit_p to FALSE -DaveB -create function content_item__new ( integer, varchar, integer, varchar, timestamp, integer, integer, varchar, boolean, varchar, text, varchar, boolean, varchar,varchar,varchar) +create function content_item__new ( integer, varchar, integer, varchar, timestamp with time zone, integer, integer, varchar, boolean, varchar, text, varchar, boolean, varchar,varchar,varchar) returns integer as ' declare @@ -1605,7 +1605,7 @@ -- procedure set_release_period -create function content_item__set_release_period (integer,timestamp,timestamp) +create function content_item__set_release_period (integer, timestamp with time zone, timestamp with time zone) returns integer as ' declare set_release_period__item_id alias for $1; Index: openacs-4/packages/acs-content-repository/sql/postgresql/content-keyword.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/content-keyword.sql,v diff -u -r1.11 -r1.12 --- openacs-4/packages/acs-content-repository/sql/postgresql/content-keyword.sql 30 Nov 2002 17:15:25 -0000 1.11 +++ openacs-4/packages/acs-content-repository/sql/postgresql/content-keyword.sql 21 Dec 2002 22:32:31 -0000 1.12 @@ -91,7 +91,7 @@ -- function new -create function content_keyword__new (varchar,varchar,integer,integer,timestamp,integer,varchar,varchar) +create function content_keyword__new (varchar,varchar,integer,integer,timestamp with time zone,integer,varchar,varchar) returns integer as ' declare new__heading alias for $1; Index: openacs-4/packages/acs-content-repository/sql/postgresql/content-revision.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/content-revision.sql,v diff -u -r1.29 -r1.30 --- openacs-4/packages/acs-content-repository/sql/postgresql/content-revision.sql 27 Feb 2002 05:02:35 -0000 1.29 +++ openacs-4/packages/acs-content-repository/sql/postgresql/content-revision.sql 21 Dec 2002 22:32:31 -0000 1.30 @@ -13,7 +13,7 @@ -- create or replace package body content_revision -- function new -create function content_revision__new (varchar,varchar,timestamp,varchar,varchar,integer,integer,integer,timestamp,integer,varchar) +create function content_revision__new (varchar,varchar,timestamp with time zone,varchar,varchar,integer,integer,integer,timestamp with time zone,integer,varchar) returns integer as ' declare new__title alias for $1; @@ -65,7 +65,7 @@ end;' language 'plpgsql'; -create function content_revision__new(varchar,varchar,timestamp,varchar,text,integer) returns integer as ' +create function content_revision__new(varchar,varchar,timestamp with time zone,varchar,text,integer) returns integer as ' declare new__title alias for $1; new__description alias for $2; -- default null @@ -89,7 +89,7 @@ end;' language 'plpgsql'; -create function content_revision__new (varchar,varchar,timestamp,varchar,varchar,text,integer,integer,timestamp,integer,varchar) +create function content_revision__new (varchar,varchar,timestamp with time zone,varchar,varchar,text,integer,integer,timestamp with time zone,integer,varchar) returns integer as ' declare new__title alias for $1; @@ -120,7 +120,7 @@ end;' language 'plpgsql'; -- function new -create function content_revision__new (varchar,varchar,timestamp,varchar,varchar,text,integer,integer,timestamp,integer,varchar,integer) +create function content_revision__new (varchar,varchar,timestamp with time zone,varchar,varchar,text,integer,integer,timestamp with time zone,integer,varchar,integer) returns integer as ' declare new__title alias for $1; Index: openacs-4/packages/acs-content-repository/sql/postgresql/content-symlink.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/content-symlink.sql,v diff -u -r1.9 -r1.10 --- openacs-4/packages/acs-content-repository/sql/postgresql/content-symlink.sql 30 Apr 2001 01:34:58 -0000 1.9 +++ openacs-4/packages/acs-content-repository/sql/postgresql/content-symlink.sql 21 Dec 2002 22:32:31 -0000 1.10 @@ -12,7 +12,7 @@ -- create or replace package body content_symlink -- function new -create function content_symlink__new (varchar,varchar,integer,integer,integer,timestamp,integer,varchar) +create function content_symlink__new (varchar,varchar,integer,integer,integer,timestamp with time zone,integer,varchar) returns integer as ' declare new__name alias for $1; -- default null Index: openacs-4/packages/acs-content-repository/sql/postgresql/content-template.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/content-template.sql,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-content-repository/sql/postgresql/content-template.sql 30 Apr 2001 01:34:58 -0000 1.6 +++ openacs-4/packages/acs-content-repository/sql/postgresql/content-template.sql 21 Dec 2002 22:32:31 -0000 1.7 @@ -35,7 +35,7 @@ end;' language 'plpgsql'; -- function new -create function content_template__new (varchar,integer,integer,timestamp,integer,varchar) +create function content_template__new (varchar,integer,integer,timestamp with time zone,integer,varchar) returns integer as ' declare new__name alias for $1; Index: openacs-4/packages/acs-content-repository/sql/postgresql/content-update.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/content-update.sql,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-content-repository/sql/postgresql/content-update.sql 30 Mar 2001 05:31:33 -0000 1.5 +++ openacs-4/packages/acs-content-repository/sql/postgresql/content-update.sql 21 Dec 2002 22:32:31 -0000 1.6 @@ -168,7 +168,7 @@ constraint cr_release_periods_pk primary key, start_when timestamp default now(), - end_when timestamp default now() + (365 * 20) + end_when timestamp default now() + interval ''20 years'' )''; end if; Index: openacs-4/packages/acs-datetime/tcl/acs-calendar-2-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-datetime/tcl/acs-calendar-2-procs-postgresql.xql,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-datetime/tcl/acs-calendar-2-procs-postgresql.xql 18 Nov 2002 18:01:12 -0000 1.5 +++ openacs-4/packages/acs-datetime/tcl/acs-calendar-2-procs-postgresql.xql 21 Dec 2002 22:32:20 -0000 1.6 @@ -3,9 +3,91 @@ postgresql7.1 + + +select to_char(to_date(:current_date, 'yyyy-mm-dd'), 'D') +as day_of_the_week, +next_day(to_date(:current_date, 'yyyy-mm-dd')-7, 'Sunday') +as sunday_date, +to_char(next_day(to_date(:current_date, 'yyyy-mm-dd')-7, 'Sunday'),'J') +as sunday_julian, +next_day(to_date(:current_date, 'yyyy-mm-dd')-7, 'Sunday') + 1 +as monday_date, +to_char(next_day(to_date(:current_date, 'yyyy-mm-dd')-7, 'Sunday') + 1,'J') +as monday_julian, +next_day(to_date(:current_date, 'yyyy-mm-dd')-7, 'Sunday') + 2 +as tuesday_date, +to_char(next_day(to_date(:current_date, 'yyyy-mm-dd')-7, 'Sunday') + 2,'J') +as tuesday_julian, +next_day(to_date(:current_date, 'yyyy-mm-dd')-7, 'Sunday') + 3 +as wednesday_date, +to_char(next_day(to_date(:current_date, 'yyyy-mm-dd')-7, 'Sunday') + 3,'J') +as wednesday_julian, +next_day(to_date(:current_date, 'yyyy-mm-dd')-7, 'Sunday') + 4 +as thursday_date, +to_char(next_day(to_date(:current_date, 'yyyy-mm-dd')-7, 'Sunday') + 4,'J') +as thursday_julian, +next_day(to_date(:current_date, 'yyyy-mm-dd')-7, 'Sunday') + 5 +as friday_date, +to_char(next_day(to_date(:current_date, 'yyyy-mm-dd')-7, 'Sunday') + 5,'J') +as friday_julian, +next_day(to_date(:current_date, 'yyyy-mm-dd')-7, 'Sunday') + 6 +as saturday_date, +to_char(next_day(to_date(:current_date, 'yyyy-mm-dd')-7, 'Sunday') + 6,'J') +as saturday_julian, +:current_date::timestamp - '7 days'::timespan as last_week, +to_char(:current_date::timestamp - '7 days'::interval, 'Month DD, YYYY') as last_week_pretty, +:current_date::timestamp + '7 days'::timespan as next_week, +to_char(:current_date::timestamp + '7 days'::interval, 'Month DD, YYYY') as next_week_pretty +from dual + + + + + +select to_char(to_date(:current_date, 'yyyy-mm-dd'), 'D') +as day_of_the_week, +next_day(to_date(:current_date, 'yyyy-mm-dd')-7, 'Sunday') +as sunday_date, +to_char(next_day(to_date(:current_date, 'yyyy-mm-dd')-7, 'Sunday'),'J') +as sunday_julian, +next_day(to_date(:current_date, 'yyyy-mm-dd')-7, 'Sunday') + 1 +as monday_date, +to_char(next_day(to_date(:current_date, 'yyyy-mm-dd')-7, 'Sunday') + 1,'J') +as monday_julian, +next_day(to_date(:current_date, 'yyyy-mm-dd')-7, 'Sunday') + 2 +as tuesday_date, +to_char(next_day(to_date(:current_date, 'yyyy-mm-dd')-7, 'Sunday') + 2,'J') +as tuesday_julian, +next_day(to_date(:current_date, 'yyyy-mm-dd')-7, 'Sunday') + 3 +as wednesday_date, +to_char(next_day(to_date(:current_date, 'yyyy-mm-dd')-7, 'Sunday') + 3,'J') +as wednesday_julian, +next_day(to_date(:current_date, 'yyyy-mm-dd')-7, 'Sunday') + 4 +as thursday_date, +to_char(next_day(to_date(:current_date, 'yyyy-mm-dd')-7, 'Sunday') + 4,'J') +as thursday_julian, +next_day(to_date(:current_date, 'yyyy-mm-dd')-7, 'Sunday') + 5 +as friday_date, +to_char(next_day(to_date(:current_date, 'yyyy-mm-dd')-7, 'Sunday') + 5,'J') +as friday_julian, +next_day(to_date(:current_date, 'yyyy-mm-dd')-7, 'Sunday') + 6 +as saturday_date, +to_char(next_day(to_date(:current_date, 'yyyy-mm-dd')-7, 'Sunday') + 6,'J') +as saturday_julian, +:current_date::timestamp - '7 days'::timespan as last_week, +to_char(:current_date::timestamp - '7 days'::interval, 'Month DD, YYYY') as last_week_pretty, +:current_date::timestamp + '7 days'::timespan as next_week, +to_char(:current_date::timestamp + '7 days'::interval, 'Month DD, YYYY') as next_week_pretty +from dual + + + -select to_char(to_date(:current_date, 'yyyy-mm-dd')-1, 'yyyy-mm-dd') +select to_char(to_date(:current_date, 'yyyy-mm-dd'), 'Day, DD Month YYYY') +as day_of_the_week, +to_char(to_date(:current_date, 'yyyy-mm-dd')-1, 'yyyy-mm-dd') as yesterday, to_char(to_date(:current_date, 'yyyy-mm-dd')+1, 'yyyy-mm-dd') as tomorrow Index: openacs-4/packages/acs-events/sql/postgresql/oracle-compat-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-events/sql/postgresql/oracle-compat-create.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-events/sql/postgresql/oracle-compat-create.sql 22 Jul 2002 21:46:19 -0000 1.2 +++ openacs-4/packages/acs-events/sql/postgresql/oracle-compat-create.sql 21 Dec 2002 22:32:10 -0000 1.3 @@ -78,14 +78,14 @@ integer, varchar ) -returns timespan as ' +returns interval as ' declare interval__number alias for $1; interval__units alias for $2; begin -- We should probably do unit checking at some point - return ('''''''' || interval__number || '' '' || interval__units || '''''''')::timespan; + return ('''''''' || interval__number || '' '' || interval__units || '''''''')::interval; end;' language 'plpgsql'; Index: openacs-4/packages/acs-events/sql/postgresql/test/acs-events-test.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-events/sql/postgresql/test/acs-events-test.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-events/sql/postgresql/test/acs-events-test.sql 8 Mar 2002 22:30:11 -0000 1.2 +++ openacs-4/packages/acs-events/sql/postgresql/test/acs-events-test.sql 21 Dec 2002 22:31:46 -0000 1.3 @@ -60,7 +60,7 @@ end;' language 'plpgsql'; -- This is an example of a simple custom recurrence function: recur every three days -create function recur_every3(timestamp,integer) +create function recur_every3(timestamp with time zone,integer) returns timestamp as ' declare recur_every3__date alias for $1; Index: openacs-4/packages/acs-events/sql/postgresql/test/utest.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-events/sql/postgresql/test/utest.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-events/sql/postgresql/test/utest.sql 13 Jul 2001 03:16:32 -0000 1.1 +++ openacs-4/packages/acs-events/sql/postgresql/test/utest.sql 21 Dec 2002 22:31:46 -0000 1.2 @@ -119,7 +119,7 @@ v_dateref ); - v_datetest := now() + 1; + v_datetest := now() + interval ''1 days''; PERFORM ut_assert__eq( ''Test of ut_assert__eq (timestamp,timestamp).'', Index: openacs-4/packages/acs-events/sql/postgresql/upgrade/upgrade-0.1d-0.2d.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-events/sql/postgresql/upgrade/upgrade-0.1d-0.2d.sql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-events/sql/postgresql/upgrade/upgrade-0.1d-0.2d.sql 30 Nov 2002 17:18:48 -0000 1.3 +++ openacs-4/packages/acs-events/sql/postgresql/upgrade/upgrade-0.1d-0.2d.sql 21 Dec 2002 22:31:27 -0000 1.4 @@ -73,13 +73,13 @@ integer, varchar ) -returns timespan as ' +returns interval as ' declare interval__number alias for $1; interval__units alias for $2; begin -- We should probably do unit checking at some point - return ('''''''' || interval__number || '' '' || interval__units || '''''''')::timespan; + return ('''''''' || interval__number || '' '' || interval__units || '''''''')::interval; end;' language 'plpgsql'; Index: openacs-4/packages/acs-kernel/sql/postgresql/acs-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/acs-create.sql,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-kernel/sql/postgresql/acs-create.sql 26 Aug 2001 12:30:22 -0000 1.6 +++ openacs-4/packages/acs-kernel/sql/postgresql/acs-create.sql 21 Dec 2002 22:31:17 -0000 1.7 @@ -60,7 +60,7 @@ -- create or replace package body acs -- function add_user -create function acs__add_user (integer,varchar,timestamp,integer,varchar,varchar,varchar,varchar,varchar,char,char,varchar,varchar,varchar,boolean,varchar) +create function acs__add_user (integer,varchar,timestamp with time zone,integer,varchar,varchar,varchar,varchar,varchar,char,char,varchar,varchar,varchar,boolean,varchar) returns integer as ' declare user_id alias for $1; -- default null Index: openacs-4/packages/acs-kernel/sql/postgresql/acs-metadata-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/acs-metadata-create.sql,v diff -u -r1.15 -r1.16 --- openacs-4/packages/acs-kernel/sql/postgresql/acs-metadata-create.sql 16 Sep 2002 21:52:42 -0000 1.15 +++ openacs-4/packages/acs-kernel/sql/postgresql/acs-metadata-create.sql 21 Dec 2002 22:31:17 -0000 1.16 @@ -689,7 +689,19 @@ end;' language 'plpgsql'; +create function acs_attribute__create_attribute (varchar,varchar,varchar,varchar,varchar,varchar,varchar,integer,integer,integer,integer,varchar,boolean) +returns integer as ' +begin + return acs_attribute__create_attribute ($1, $2, $3, $4, $5, $6, $7, cast ($8 as varchar), $9, $10, $11, $12, $13); +end;' language 'plpgsql'; +create function acs_attribute__create_attribute (varchar,varchar,varchar,varchar,varchar,varchar,varchar,integer,integer,integer,integer,varchar,boolean) +returns integer as ' +begin + return acs_attribute__create_attribute ($1, $2, $3, $4, $5, $6, $7, cast ($8 as varchar), $9, $10, $11, $12, $13); +end;' language 'plpgsql'; + + -- procedure drop_attribute create function acs_attribute__drop_attribute (varchar,varchar) returns integer as ' Index: openacs-4/packages/acs-kernel/sql/postgresql/acs-objects-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/acs-objects-create.sql,v diff -u -r1.35 -r1.36 --- openacs-4/packages/acs-kernel/sql/postgresql/acs-objects-create.sql 29 Jul 2002 03:52:34 -0000 1.35 +++ openacs-4/packages/acs-kernel/sql/postgresql/acs-objects-create.sql 21 Dec 2002 22:31:17 -0000 1.36 @@ -586,7 +586,7 @@ -- function new -create function acs_object__new (integer,varchar,timestamp,integer,varchar,integer,boolean) +create function acs_object__new (integer,varchar,timestamp with time zone,integer,varchar,integer,boolean) returns integer as ' declare new__object_id alias for $1; -- default null @@ -626,10 +626,8 @@ end;' language 'plpgsql'; - - -- function new -create function acs_object__new (integer,varchar,timestamp,integer,varchar,integer) +create function acs_object__new (integer,varchar,timestamp with time zone,integer,varchar,integer) returns integer as ' declare new__object_id alias for $1; -- default null @@ -1341,7 +1339,7 @@ return acs_object__update_last_modified(acs_object__update_last_modified__object_id, now()); end;' language 'plpgsql'; -create function acs_object__update_last_modified (integer, timestamp) +create function acs_object__update_last_modified (integer, timestamp with time zone) returns integer as ' declare acs_object__update_last_modified__object_id alias for $1; Index: openacs-4/packages/acs-kernel/sql/postgresql/apm-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/apm-create.sql,v diff -u -r1.31 -r1.32 --- openacs-4/packages/acs-kernel/sql/postgresql/apm-create.sql 19 Dec 2002 16:11:57 -0000 1.31 +++ openacs-4/packages/acs-kernel/sql/postgresql/apm-create.sql 21 Dec 2002 22:31:17 -0000 1.32 @@ -1637,7 +1637,7 @@ -- function new -create function apm_package__new (integer,varchar,varchar,varchar,timestamp,integer,varchar,integer) +create function apm_package__new (integer,varchar,varchar,varchar,timestamp with time zone,integer,varchar,integer) returns integer as ' declare new__package_id alias for $1; -- default null @@ -1865,7 +1865,7 @@ end;' language 'plpgsql'; -- create or replace package body apm_package_version -create function apm_package_version__new (integer,varchar,varchar,varchar,varchar,varchar,varchar,timestamp,varchar,varchar,boolean,boolean) returns integer as ' +create function apm_package_version__new (integer,varchar,varchar,varchar,varchar,varchar,varchar,timestamp with time zone,varchar,varchar,boolean,boolean) returns integer as ' declare apm_pkg_ver__version_id alias for $1; -- default null apm_pkg_ver__package_key alias for $2; @@ -1881,7 +1881,7 @@ apm_pkg_ver__data_model_loaded_p alias for $12; -- default ''f'' v_version_id apm_package_versions.version_id%TYPE; begin - if apm_pkg_ver__version_id = '''' or apm_pkg_ver__version_id is null then + if apm_pkg_ver__version_id is null then select nextval(''t_acs_object_id_seq'') into v_version_id from dual; @@ -2016,7 +2016,7 @@ -- function edit -create function apm_package_version__edit (integer,integer,varchar,varchar,varchar,varchar,varchar,timestamp,varchar,varchar,boolean,boolean) +create function apm_package_version__edit (integer,integer,varchar,varchar,varchar,varchar,varchar,timestamp with time zone,varchar,varchar,boolean,boolean) returns integer as ' declare edit__new_version_id alias for $1; -- default null @@ -2560,7 +2560,7 @@ -- function new -create function apm_application__new (integer,varchar,varchar,varchar,timestamp,integer,varchar,integer) +create function apm_application__new (integer,varchar,varchar,varchar,timestamp with time zone,integer,varchar,integer) returns integer as ' declare application_id alias for $1; -- default null @@ -2610,7 +2610,7 @@ -- create or replace package body apm_service -- function new -create function apm_service__new (integer,varchar,varchar,varchar,timestamp,integer,varchar,integer) +create function apm_service__new (integer,varchar,varchar,varchar,timestamp with time zone,integer,varchar,integer) returns integer as ' declare service_id alias for $1; -- default null Index: openacs-4/packages/acs-kernel/sql/postgresql/community-core-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/community-core-create.sql,v diff -u -r1.9 -r1.10 --- openacs-4/packages/acs-kernel/sql/postgresql/community-core-create.sql 13 Mar 2002 22:50:53 -0000 1.9 +++ openacs-4/packages/acs-kernel/sql/postgresql/community-core-create.sql 21 Dec 2002 22:31:17 -0000 1.10 @@ -301,7 +301,7 @@ -- create or replace package body party -- function new -create function party__new (integer,varchar,timestamp,integer,varchar,varchar,varchar,integer) +create function party__new (integer,varchar,timestamp with time zone,integer,varchar,varchar,varchar,integer) returns integer as ' declare new__party_id alias for $1; -- default null @@ -430,7 +430,7 @@ -- create or replace package body person -- function new select define_function_args('person__new','person_id,object_type;person,creation_date;now(),creation_user,creation_ip,email,url,first_names,last_name,context_id'); -create function person__new (integer,varchar,timestamp,integer,varchar,varchar,varchar,varchar,varchar,integer) +create function person__new (integer,varchar,timestamp with time zone,integer,varchar,varchar,varchar,varchar,varchar,integer) returns integer as ' declare new__person_id alias for $1; -- default null @@ -667,7 +667,7 @@ select define_function_args('user__new','user_id,object_type;user,creation_date;now(),creation_user,creation_ip,email,url,first_names,last_name,password,salt,password_question,password_answer,screen_name,email_verified_p;t,context_id'); -create function acs_user__new (integer,varchar,timestamp,integer,varchar,varchar,varchar,varchar,varchar,char,char,varchar,varchar,varchar,boolean,integer) +create function acs_user__new (integer,varchar,timestamp with time zone,integer,varchar,varchar,varchar,varchar,varchar,char,char,varchar,varchar,varchar,boolean,integer) returns integer as ' declare new__user_id alias for $1; -- default null Index: openacs-4/packages/acs-kernel/sql/postgresql/groups-body-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/groups-body-create.sql,v diff -u -r1.16 -r1.17 --- openacs-4/packages/acs-kernel/sql/postgresql/groups-body-create.sql 28 Aug 2002 13:16:26 -0000 1.16 +++ openacs-4/packages/acs-kernel/sql/postgresql/groups-body-create.sql 21 Dec 2002 22:31:16 -0000 1.17 @@ -708,7 +708,7 @@ -- function new select define_function_args('acs_group__new','group_id,object_type;group,creation_date;now(),creation_user,creation_ip,email,url,group_name,join_policy,context_id'); -create function acs_group__new (integer,varchar,timestamp,integer,varchar,varchar,varchar,varchar,varchar,integer) +create function acs_group__new (integer,varchar,timestamp with time zone,integer,varchar,varchar,varchar,varchar,varchar,integer) returns integer as ' declare new__group_id alias for $1; -- default null Index: openacs-4/packages/acs-kernel/sql/postgresql/journal-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/journal-create.sql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-kernel/sql/postgresql/journal-create.sql 28 Apr 2001 17:35:30 -0000 1.3 +++ openacs-4/packages/acs-kernel/sql/postgresql/journal-create.sql 21 Dec 2002 22:31:16 -0000 1.4 @@ -88,7 +88,7 @@ -- create or replace package body journal_entry -- function new -create function journal_entry__new (integer,integer,varchar,varchar,timestamp,integer,varchar,varchar) +create function journal_entry__new (integer,integer,varchar,varchar,timestamp with time zone,integer,varchar,varchar) returns integer as ' declare new__journal_id alias for $1; -- default null Index: openacs-4/packages/acs-kernel/sql/postgresql/postgresql.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/postgresql.sql,v diff -u -r1.30 -r1.31 --- openacs-4/packages/acs-kernel/sql/postgresql/postgresql.sql 9 Jul 2002 22:34:52 -0000 1.30 +++ openacs-4/packages/acs-kernel/sql/postgresql/postgresql.sql 21 Dec 2002 22:31:16 -0000 1.31 @@ -272,6 +272,82 @@ ---------------------------------------------------------------------------- +create function inline_0 () returns integer as ' +-- Create a bitfromint4(integer) function if it doesn''t exists. +-- Due to a bug in PG 7.3 this function is absent in PG 7.3. +declare + v_bitfromint4_count integer; +begin + select into v_bitfromint4_count count(*) from pg_proc where proname = ''bitfromint4''; + if v_bitfromint4_count = 0 then + create or replace function bitfromint4 (integer) returns bit varying as '' + begin + return "bit"($1); + end;'' language ''plpgsql''; + end if; + return 1; +end;' language 'plpgsql'; + +select inline_0(); +drop function inline_0(); + +create function inline_1 () returns integer as ' +-- Create a bitfromint4(integer) function if it doesn''t exists. +-- Due to a bug in PG 7.3 this function is absent in PG 7.3. +declare + v_bittoint4_count integer; +begin + select into v_bittoint4_count count(*) from pg_proc where proname = ''bittoint4''; + if v_bittoint4_count = 0 then + create or replace function bittoint4 (bit varying) returns integer as '' + begin + return "int4"($1); + end;'' language ''plpgsql''; + end if; + return 1; +end;' language 'plpgsql'; + +select inline_1(); +drop function inline_1(); + +create function inline_0 () returns integer as ' +-- Create a bitfromint4(integer) function if it doesn''t exists. +-- Due to a bug in PG 7.3 this function is absent in PG 7.3. +declare + v_bitfromint4_count integer; +begin + select into v_bitfromint4_count count(*) from pg_proc where proname = ''bitfromint4''; + if v_bitfromint4_count = 0 then + create or replace function bitfromint4 (integer) returns bit varying as '' + begin + return "bit"($1); + end;'' language ''plpgsql''; + end if; + return 1; +end;' language 'plpgsql'; + +select inline_0(); +drop function inline_0(); + +create function inline_1 () returns integer as ' +-- Create a bitfromint4(integer) function if it doesn''t exists. +-- Due to a bug in PG 7.3 this function is absent in PG 7.3. +declare + v_bittoint4_count integer; +begin + select into v_bittoint4_count count(*) from pg_proc where proname = ''bittoint4''; + if v_bittoint4_count = 0 then + create or replace function bittoint4 (bit varying) returns integer as '' + begin + return "int4"($1); + end;'' language ''plpgsql''; + end if; + return 1; +end;' language 'plpgsql'; + +select inline_1(); +drop function inline_1(); + -- tree query support, m-vgID method. -- DRB: I've replaced the old, text-based tree sort keys with a @@ -326,7 +402,7 @@ if p_intkey < 128 then return substring(bitfromint4(p_intkey), 25, 8); else - return substring(bitfromint4(-2^31 + p_intkey), 1, 32); + return substring(bitfromint4(cast (-2^31 + p_intkey as int4)), 1, 32); end if; end;' language 'plpgsql' with (isstrict, iscachable); Index: openacs-4/packages/acs-kernel/sql/postgresql/rel-segments-body-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/rel-segments-body-create.sql,v diff -u -r1.8 -r1.9 --- openacs-4/packages/acs-kernel/sql/postgresql/rel-segments-body-create.sql 8 Jul 2002 22:09:32 -0000 1.8 +++ openacs-4/packages/acs-kernel/sql/postgresql/rel-segments-body-create.sql 21 Dec 2002 22:31:16 -0000 1.9 @@ -15,7 +15,7 @@ ------------------ -- rel_segment__new -- full version -create function rel_segment__new (integer,varchar,timestamp,integer,varchar,varchar,varchar,varchar,integer,varchar,integer) +create function rel_segment__new (integer,varchar,timestamp with time zone,integer,varchar,varchar,varchar,varchar,integer,varchar,integer) returns integer as ' declare new__segment_id alias for $1; -- default null Index: openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-4.5-4.5.1.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-4.5-4.5.1.sql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-4.5-4.5.1.sql 7 Oct 2002 00:05:56 -0000 1.4 +++ openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-4.5-4.5.1.sql 21 Dec 2002 22:31:06 -0000 1.5 @@ -6,15 +6,15 @@ -- acs-objects-create.sql - create or replace function acs_object__update_last_modified (integer) + create function acs_object__update_last_modified (integer) returns integer as ' declare acs_object__update_last_modified__object_id alias for $1; begin return acs_object__update_last_modified(acs_object__update_last_modified__object_id, now()); end;' language 'plpgsql'; - create or replace function acs_object__update_last_modified (integer, timestamp) + create function acs_object__update_last_modified (integer, timestamp with time zone) returns integer as ' declare acs_object__update_last_modified__object_id alias for $1; @@ -46,7 +46,7 @@ -- apm-create.sql - create or replace function apm_package__parent_id (integer) returns integer as ' + create function apm_package__parent_id (integer) returns integer as ' declare apm_package__parent_id__package_id alias for $1; v_package_id apm_packages.package_id%TYPE; @@ -67,7 +67,45 @@ -- postgresql.sql -create or replace function tree_increment_key(varbit) +create function inline_0 () returns integer as ' +-- Create a bitfromint4(integer) function if it doesn''t exists. +-- Due to a bug in PG 7.3 this function is absent in PG 7.3. +declare + v_bitfromint4_count integer; +begin + select into v_bitfromint4_count count(*) from pg_proc where proname = ''bitfromint4''; + if v_bitfromint4_count = 0 then + create or replace function bitfromint4 (integer) returns bit varying as '' + begin + return "bit"($1); + end;'' language ''plpgsql''; + end if; + return 1; +end;' language 'plpgsql'; + +select inline_0(); +drop function inline_0(); + +create function inline_1 () returns integer as ' +-- Create a bitfromint4(integer) function if it doesn''t exists. +-- Due to a bug in PG 7.3 this function is absent in PG 7.3. +declare + v_bittoint4_count integer; +begin + select into v_bittoint4_count count(*) from pg_proc where proname = ''bittoint4''; + if v_bittoint4_count = 0 then + create or replace function bittoint4 (bit varying) returns integer as '' + begin + return "int4"($1); + end;'' language ''plpgsql''; + end if; + return 1; +end;' language 'plpgsql'; + +select inline_1(); +drop function inline_1(); + +create function tree_increment_key(varbit) returns varbit as ' declare p_child_sort_key alias for $1; @@ -85,7 +123,7 @@ -- drop function int_to_tree_key(integer); -create or replace function int_to_tree_key(integer) returns varbit as ' +create function int_to_tree_key(integer) returns varbit as ' -- Convert an integer into the bit string format used to store -- tree sort keys. Using 4 bytes for the long keys requires @@ -125,7 +163,7 @@ drop view user_tab_comments; -create or replace function create_user_tab_comments() returns boolean as ' +create function create_user_tab_comments() returns boolean as ' begin if version() like ''%7.2%'' then execute '' @@ -162,7 +200,7 @@ -- rel-constraints-create.sql -create or replace function rel_segment__new (varchar,integer,varchar) +create function rel_segment__new (varchar,integer,varchar) returns integer as ' declare new__segment_name alias for $1; Index: openacs-4/packages/acs-mail/sql/postgresql/acs-mail-packages-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-mail/sql/postgresql/acs-mail-packages-create.sql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-mail/sql/postgresql/acs-mail-packages-create.sql 13 Aug 2001 17:54:46 -0000 1.3 +++ openacs-4/packages/acs-mail/sql/postgresql/acs-mail-packages-create.sql 21 Dec 2002 22:30:51 -0000 1.4 @@ -8,7 +8,7 @@ -- Package Implementations --------------------------------------------- -create function acs_mail_gc_object__new (integer,varchar,timestamp,integer,varchar,integer) +create function acs_mail_gc_object__new (integer,varchar,timestamp with time zone,integer,varchar,integer) returns integer as ' declare p_gc_object_id alias for $1; -- default null @@ -51,7 +51,7 @@ -- first create a CR item. -- then call acs_mail_body__new with the CR item's item_id -create function acs_mail_body__new (integer,integer,integer,timestamp,varchar,varchar,text,text,text,integer,varchar,date,integer,varchar,integer) +create function acs_mail_body__new (integer,integer,integer,timestamp with time zone,varchar,varchar,text,text,text,integer,varchar,date,integer,varchar,integer) returns integer as ' declare p_body_id alias for $1; -- default null @@ -136,7 +136,7 @@ end; ' language 'plpgsql'; -create function acs_mail_body__clone (integer,integer,varchar,timestamp, +create function acs_mail_body__clone (integer,integer,varchar,timestamp with time zone, integer,varchar,integer) returns integer as ' declare @@ -296,7 +296,7 @@ --end acs_mail_multipart; --create or replace package body acs_mail_link__ -create function acs_mail_link__new (integer,integer,integer,timestamp,integer,varchar,varchar) +create function acs_mail_link__new (integer,integer,integer,timestamp with time zone,integer,varchar,varchar) returns integer as ' declare p_mail_link_id alias for $1; -- default null Index: openacs-4/packages/acs-mail/sql/postgresql/acs-mail-queue-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-mail/sql/postgresql/acs-mail-queue-create.sql,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-mail/sql/postgresql/acs-mail-queue-create.sql 19 Sep 2002 13:40:01 -0000 1.5 +++ openacs-4/packages/acs-mail/sql/postgresql/acs-mail-queue-create.sql 21 Dec 2002 22:30:51 -0000 1.6 @@ -49,7 +49,7 @@ -- API ----------------------------------------------------------------- --create or replace package body acs_mail_queue_message__ -create function acs_mail_queue_message__new (integer,integer,integer,timestamp,integer,varchar,varchar) +create function acs_mail_queue_message__new (integer,integer,integer,timestamp with time zone,integer,varchar,varchar) returns integer as ' declare p_mail_link_id alias for $1; -- default null Index: openacs-4/packages/acs-messaging/sql/postgresql/acs-messaging-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-messaging/sql/postgresql/acs-messaging-create.sql,v diff -u -r1.8 -r1.9 --- openacs-4/packages/acs-messaging/sql/postgresql/acs-messaging-create.sql 9 Dec 2001 21:08:31 -0000 1.8 +++ openacs-4/packages/acs-messaging/sql/postgresql/acs-messaging-create.sql 21 Dec 2002 22:30:40 -0000 1.9 @@ -50,7 +50,7 @@ reply_to integer constraint acs_messages_reply_to_fk references acs_messages (message_id) on delete set null, - sent_date datetime + sent_date timestamp constraint acs_messages_sent_date_nn not null, sender integer @@ -189,7 +189,7 @@ constraint amo_to_address_nn not null, grouping_id integer, - wait_until datetime + wait_until timestamp constraint amo_wait_until_nn not null, constraint acs_messages_outgoing_pk primary key (message_id, to_address) Index: openacs-4/packages/acs-messaging/sql/postgresql/acs-messaging-packages.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-messaging/sql/postgresql/acs-messaging-packages.sql,v diff -u -r1.10 -r1.11 --- openacs-4/packages/acs-messaging/sql/postgresql/acs-messaging-packages.sql 9 Dec 2001 04:21:58 -0000 1.10 +++ openacs-4/packages/acs-messaging/sql/postgresql/acs-messaging-packages.sql 21 Dec 2002 22:30:40 -0000 1.11 @@ -11,7 +11,7 @@ -- create function acs_message__edit (integer,varchar,varchar,varchar, -text,integer,timestamp,integer,varchar,boolean) +text,integer,timestamp with time zone,integer,varchar,boolean) returns integer as ' declare p_message_id alias for $1; @@ -74,7 +74,7 @@ -- Jon Griffin 05-21-2001 ---------------- -create function acs_message__new (integer,integer,timestamp,integer, +create function acs_message__new (integer,integer,timestamp with time zone,integer, varchar,varchar,varchar,varchar,varchar,text,integer,integer,integer, varchar,varchar,boolean) returns integer as ' @@ -194,7 +194,7 @@ end if; end;' language 'plpgsql'; -create function acs_message__send (integer,varchar,integer,timestamp) +create function acs_message__send (integer,varchar,integer,timestamp with time zone) returns integer as ' declare p_message_id alias for $1; @@ -211,7 +211,7 @@ return 1; end;' language 'plpgsql'; -create function acs_message__send (integer,integer,integer,timestamp) +create function acs_message__send (integer,integer,integer,timestamp with time zone) returns integer as ' declare p_message_id alias for $1; Index: openacs-4/packages/acs-subsite/sql/postgresql/application-groups-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/sql/postgresql/application-groups-create.sql,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-subsite/sql/postgresql/application-groups-create.sql 12 May 2002 20:57:02 -0000 1.5 +++ openacs-4/packages/acs-subsite/sql/postgresql/application-groups-create.sql 21 Dec 2002 22:30:31 -0000 1.6 @@ -38,7 +38,7 @@ select define_function_args('application_group__new','group_id,object_type;application_group,creation_date;now(),creation_user,creation_ip,email,url,group_name,package_id,context_id'); -create function application_group__new(integer,varchar,timestamp,integer,varchar,varchar,varchar,varchar,integer,integer) +create function application_group__new(integer,varchar,timestamp with time zone,integer,varchar,varchar,varchar,varchar,integer,integer) returns integer as ' declare new__group_id alias for $1; Index: openacs-4/packages/acs-tcl/tcl/00-database-procs-postgresql.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/Attic/00-database-procs-postgresql.tcl,v diff -u -r1.36 -r1.37 --- openacs-4/packages/acs-tcl/tcl/00-database-procs-postgresql.tcl 30 Nov 2002 17:23:54 -0000 1.36 +++ openacs-4/packages/acs-tcl/tcl/00-database-procs-postgresql.tcl 21 Dec 2002 22:30:20 -0000 1.37 @@ -133,8 +133,11 @@ set ret_val [ns_db 0or1row $db "select $function_name ()"] # drop the anonymous function (OpenACS - Dan) - ns_db dml $db "drop function $function_name ()" + # bartt: Wait a second to workaround a problem in PostgreSQL 7.3. + # The problem only occured here. Couldn't reproduce it elsewhere. + after 1000 {ns_db dml $db "drop function $function_name ()"} + return $ret_val } error] Index: openacs-4/packages/bookmarks/sql/postgresql/bookmarks-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/sql/postgresql/bookmarks-create.sql,v diff -u -r1.20 -r1.21 --- openacs-4/packages/bookmarks/sql/postgresql/bookmarks-create.sql 30 Nov 2002 17:26:36 -0000 1.20 +++ openacs-4/packages/bookmarks/sql/postgresql/bookmarks-create.sql 21 Dec 2002 22:30:01 -0000 1.21 @@ -347,7 +347,7 @@ END; ' LANGUAGE 'plpgsql'; -CREATE FUNCTION bookmark__new (integer,integer,integer,varchar,boolean,integer,timestamp,integer,varchar,integer) +CREATE FUNCTION bookmark__new (integer,integer,integer,varchar,boolean,integer,timestamp with time zone,integer,varchar,integer) RETURNS integer AS ' DECLARE p_bookmark_id ALIAS FOR $1; -- in bm_bookmarks.bookmark_id%TYPE, Index: openacs-4/packages/bookmarks/tcl/bookmarks-init-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bookmarks/tcl/bookmarks-init-postgresql.xql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/bookmarks/tcl/bookmarks-init-postgresql.xql 8 Dec 2001 01:17:59 -0000 1.3 +++ openacs-4/packages/bookmarks/tcl/bookmarks-init-postgresql.xql 21 Dec 2002 22:29:50 -0000 1.4 @@ -41,7 +41,7 @@ - delete from bm_in_closed_p where creation_date < (current_timestamp - 1) + delete from bm_in_closed_p where creation_date < (current_timestamp - interval '1 day') Index: openacs-4/packages/cms/sql/postgresql/cms-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/sql/postgresql/cms-create.sql,v diff -u -r1.5 -r1.6 --- openacs-4/packages/cms/sql/postgresql/cms-create.sql 22 May 2001 22:46:13 -0000 1.5 +++ openacs-4/packages/cms/sql/postgresql/cms-create.sql 21 Dec 2002 22:29:41 -0000 1.6 @@ -172,8 +172,20 @@ ); end;' language 'plpgsql'; +create function content_module__new (varchar,varchar,integer,integer,integer) +returns integer as ' +begin + return content_module__new ($1, $2, cast ($3 as varchar), $4, $5); +end;' language 'plpgsql'; + +create function content_module__new (varchar,varchar,integer,integer,integer) +returns integer as ' +begin + return content_module__new ($1, $2, cast ($3 as varchar), $4, $5); +end;' language 'plpgsql'; + -- function new -create function content_module__new (varchar,varchar,varchar,integer,integer,integer,timestamp,integer,varchar,varchar) +create function content_module__new (varchar,varchar,varchar,integer,integer,integer,timestamp with time zone,integer,varchar,varchar) returns integer as ' declare p_name alias for $1; Index: openacs-4/packages/cms/sql/postgresql/cms-forms.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/sql/postgresql/cms-forms.sql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/cms/sql/postgresql/cms-forms.sql 22 May 2001 22:46:13 -0000 1.4 +++ openacs-4/packages/cms/sql/postgresql/cms-forms.sql 21 Dec 2002 22:29:41 -0000 1.5 @@ -404,6 +404,18 @@ return 0; end;' language 'plpgsql'; +create function cm_form_widget__set_attribute_param_value (varchar,varchar,varchar,integer,varchar,varchar) +returns integer as ' +begin + return cm_form_widget__set_attribute_param_value($1, $2, $3, cast ($4 as varchar), $5, $6); +end;' language 'plpgsql'; + +create function cm_form_widget__set_attribute_param_value (varchar,varchar,varchar,integer,varchar,varchar) +returns integer as ' +begin + return cm_form_widget__set_attribute_param_value($1, $2, $3, cast ($4 as varchar), $5, $6); +end;' language 'plpgsql'; + -- show errors Index: openacs-4/packages/cms/sql/postgresql/cms-workflow.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/sql/postgresql/cms-workflow.sql,v diff -u -r1.11 -r1.12 --- openacs-4/packages/cms/sql/postgresql/cms-workflow.sql 19 Nov 2001 19:47:42 -0000 1.11 +++ openacs-4/packages/cms/sql/postgresql/cms-workflow.sql 21 Dec 2002 22:29:41 -0000 1.12 @@ -540,7 +540,7 @@ -- procedure checkout -create function content_workflow__checkout (integer,timestamp,integer,varchar,varchar) +create function content_workflow__checkout (integer,timestamp with time zone,integer,varchar,varchar) returns integer as ' declare p_task_id alias for $1; Index: openacs-4/packages/cms/www/modules/items/status-edit-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/items/status-edit-postgresql.xql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/cms/www/modules/items/status-edit-postgresql.xql 26 Sep 2002 02:28:39 -0000 1.3 +++ openacs-4/packages/cms/www/modules/items/status-edit-postgresql.xql 21 Dec 2002 22:29:31 -0000 1.4 @@ -40,7 +40,7 @@ select coalesce(publish_status, 'production') as publish_status, to_char(coalesce(start_when, current_timestamp), 'YYYY MM DD HH24 MI SS') as start_when, - to_char(coalesce(end_when, current_timestamp + 365), 'YYYY MM DD HH24 MI SS') as end_when + to_char(coalesce(end_when, current_timestamp + interval '365 days'), 'YYYY MM DD HH24 MI SS') as end_when from cr_items i left outer join cr_release_periods r using (item_id) where Index: openacs-4/packages/download/sql/postgresql/download-packages.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/sql/postgresql/download-packages.sql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/download/sql/postgresql/download-packages.sql 23 Feb 2002 05:15:35 -0000 1.4 +++ openacs-4/packages/download/sql/postgresql/download-packages.sql 21 Dec 2002 22:29:21 -0000 1.5 @@ -36,7 +36,7 @@ -- -set_metadata_value -- -downloaded_by -create function download_rep__new (integer,varchar,varchar,varchar,timestamp,integer,integer,integer,varchar) +create function download_rep__new (integer,varchar,varchar,varchar,timestamp with time zone,integer,integer,integer,varchar) returns integer as ' declare new__repository_id alias for $1; @@ -87,7 +87,7 @@ end;' language 'plpgsql'; -create function download_rep__edit (integer,varchar,varchar,varchar,timestamp,integer,varchar) +create function download_rep__edit (integer,varchar,varchar,varchar,timestamp with time zone,integer,varchar) returns integer as ' declare edit__repository_id alias for $1; Index: openacs-4/packages/edit-this-page/sql/postgresql/edit-this-page-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/edit-this-page/sql/postgresql/edit-this-page-create.sql,v diff -u -r1.8 -r1.9 --- openacs-4/packages/edit-this-page/sql/postgresql/edit-this-page-create.sql 30 Nov 2002 17:32:08 -0000 1.8 +++ openacs-4/packages/edit-this-page/sql/postgresql/edit-this-page-create.sql 21 Dec 2002 22:29:10 -0000 1.9 @@ -213,6 +213,7 @@ declare p_item_id alias for $1; p_name alias for $2; + v_item_id integer; v_url varchar(400); v_object_type varchar; v_link_rec record; @@ -227,7 +228,11 @@ end if; if v_object_type = ''content_folder'' then - return p_name || ''/''; + select s.name || ''/'' into v_url + from cr_folders f, site_nodes s + where f.folder_id = p_item_id + and s.object_id = f.package_id; + return v_url; end if; if v_object_type = ''content_extlink'' then @@ -238,14 +243,14 @@ end if; if v_object_type = ''content_symlink'' then - select target_id into p_item_id + select target_id into v_item_id from cr_symlinks where symlink_id = p_item_id; select f.package_id, i.name into v_link_rec from cr_items i, cr_folders f - where i.item_id = p_item_id + where i.item_id = v_item_id and i.parent_id = f.folder_id; select site_node__url(s.node_id) into v_url @@ -266,6 +271,7 @@ declare p_item_id alias for $1; p_revision_title alias for $2; + v_item_id integer; v_title varchar(400); v_object_type varchar; begin @@ -294,7 +300,7 @@ end if; if v_object_type = ''content_symlink'' then - select target_id into p_item_id + select target_id into v_item_id from cr_symlinks where symlink_id = p_item_id; return etp__get_title(p_item_id, null); @@ -303,7 +309,7 @@ if v_object_type = ''content_item'' then select r.title into v_title from cr_items i, cr_revisions r - where i.item_id = p_item_id + where i.item_id = v_item_id and i.live_revision = r.revision_id; return v_title; end if; @@ -318,6 +324,7 @@ declare p_item_id alias for $1; p_revision_description alias for $2; + v_item_id integer; v_description varchar(400); v_object_type varchar; begin @@ -347,7 +354,7 @@ end if; if v_object_type = ''content_symlink'' then - select target_id into p_item_id + select target_id into v_item_id from cr_symlinks where symlink_id = p_item_id; return etp__get_description(p_item_id, null); @@ -356,15 +363,14 @@ if v_object_type = ''content_item'' then select r.description into v_description from cr_items i, cr_revisions r - where i.item_id = p_item_id + where i.item_id = v_item_id and i.live_revision = r.revision_id; return v_description; end if; return null; -end; -' language 'plpgsql'; +end;' language 'plpgsql'; Index: openacs-4/packages/file-storage/sql/postgresql/file-storage-simple-package-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/sql/postgresql/Attic/file-storage-simple-package-create.sql,v diff -u -r1.8 -r1.9 --- openacs-4/packages/file-storage/sql/postgresql/file-storage-simple-package-create.sql 20 Sep 2002 21:34:08 -0000 1.8 +++ openacs-4/packages/file-storage/sql/postgresql/file-storage-simple-package-create.sql 21 Dec 2002 22:28:58 -0000 1.9 @@ -12,7 +12,7 @@ select define_function_args('fs_simple_object__new','object_id,object_type,fs_simple_object,folder_id,name,description,creation_date,creation_user,creation_ip,context_id'); -create function fs_simple_object__new(integer,varchar,integer,varchar,varchar,timestamp,integer,varchar,integer) +create function fs_simple_object__new(integer,varchar,integer,varchar,varchar,timestamp with time zone,integer,varchar,integer) returns integer as ' DECLARE p_object_id alias for $1; @@ -78,7 +78,7 @@ select define_function_args('fs_url__copy','url_id;target_object_id'); -create function fs_url__new(integer,varchar,varchar,integer,varchar,varchar,timestamp,integer,varchar,integer) +create function fs_url__new(integer,varchar,varchar,integer,varchar,varchar,timestamp with time zone,integer,varchar,integer) returns integer as ' DECLARE p_url_id alias for $1; Index: openacs-4/packages/file-storage/tcl/file-storage-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/tcl/file-storage-procs-postgresql.xql,v diff -u -r1.30 -r1.31 --- openacs-4/packages/file-storage/tcl/file-storage-procs-postgresql.xql 18 Nov 2002 18:01:04 -0000 1.30 +++ openacs-4/packages/file-storage/tcl/file-storage-procs-postgresql.xql 21 Dec 2002 22:28:44 -0000 1.31 @@ -44,22 +44,22 @@ --- we use $ n_past-days instead of :n_past_days becasuse he pgdriver +-- we use $ n_past-days instead of :n_past_days because the pgdriver -- bind variable emulation puts single-quotes around the n_past_days -- integer. Postgresql tries to turn '-1' into a date datatype --- so now()-'-1' fails but now()- -1 works fine. +-- so now()-'-1' fails but now()- interval '-1' works fine. select fc.* from (select fs_objects.object_id, fs_objects.name, fs_objects.live_revision, fs_objects.type, - to_char(fs_objects.last_modified, 'YYYY-MM-DD HH24:MI:SS') as last_modified_ansi, + to_char(fs_objects.last_modified, 'YYYY-MM-DD HH24:MI:SS') as last_modified, fs_objects.content_size, fs_objects.url, fs_objects.key, fs_objects.sort_key, fs_objects.file_upload_name, - case when fs_objects.last_modified >= (now() - $n_past_days) then 1 else 0 end as new_p, + case when fs_objects.last_modified >= (now() - interval '$n_past_days days') then 1 else 0 end as new_p, acs_permission__permission_p(fs_objects.object_id, :user_id, 'admin') as admin_p, acs_permission__permission_p(fs_objects.object_id, :user_id, 'delete') as delete_p, acs_permission__permission_p(fs_objects.object_id, :user_id, 'write') as write_p Index: openacs-4/packages/file-storage/www/folder-chunk-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/folder-chunk-postgresql.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/file-storage/www/folder-chunk-postgresql.xql 18 Nov 2002 18:01:05 -0000 1.2 +++ openacs-4/packages/file-storage/www/folder-chunk-postgresql.xql 21 Dec 2002 22:28:31 -0000 1.3 @@ -8,16 +8,16 @@ fs_objects.name, fs_objects.live_revision, fs_objects.type, - to_char(fs_objects.last_modified, 'YYYY-MM-DD HH24:MI:SS') as last_modified_ansi, + to_char(fs_objects.last_modified, 'YYYY-MM-DD HH24:MI:SS') as last_modified, fs_objects.content_size, fs_objects.url, fs_objects.key, fs_objects.sort_key, fs_objects.file_upload_name, - case when fs_objects.last_modified >= (now() - $n_past_days) then 1 else 0 end as new_p + case when fs_objects.last_modified >= (now() - interval '$n_past_days days') then 1 else 0 end as new_p from fs_objects where fs_objects.parent_id = :folder_id order by sort_key, name - \ No newline at end of file + Index: openacs-4/packages/forums/sql/postgresql/forums-forums-package-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/sql/postgresql/forums-forums-package-create.sql,v diff -u -r1.7 -r1.8 --- openacs-4/packages/forums/sql/postgresql/forums-forums-package-create.sql 30 Nov 2002 17:35:03 -0000 1.7 +++ openacs-4/packages/forums/sql/postgresql/forums-forums-package-create.sql 21 Dec 2002 22:28:17 -0000 1.8 @@ -13,7 +13,7 @@ select define_function_args('forums_forum__new','forum_id,object_type;forums_forum,name,charter,presentation_type,posting_policy,package_id,creation_date,creation_user,creation_ip,context_id'); -create function forums_forum__new (integer,varchar,varchar,varchar,varchar,varchar,integer,timestamp,integer,varchar,integer) +create function forums_forum__new (integer,varchar,varchar,varchar,varchar,varchar,integer,timestamp with time zone,integer,varchar,integer) returns integer as ' declare p_forum_id alias for $1; Index: openacs-4/packages/forums/sql/postgresql/forums-messages-package-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/sql/postgresql/forums-messages-package-create.sql,v diff -u -r1.9 -r1.10 --- openacs-4/packages/forums/sql/postgresql/forums-messages-package-create.sql 30 Nov 2002 17:35:03 -0000 1.9 +++ openacs-4/packages/forums/sql/postgresql/forums-messages-package-create.sql 21 Dec 2002 22:28:17 -0000 1.10 @@ -13,7 +13,7 @@ select define_function_args ('forums_message__new', 'message_id,object_type;forums_message,forum_id,subject,content,html_p,user_id,posting_date,state,parent_id,creation_date,creation_user,creation_ip,context_id'); -create function forums_message__new (integer,varchar,integer,varchar,text,char,integer,timestamp,varchar,integer,timestamp,integer,varchar,integer) +create function forums_message__new (integer,varchar,integer,varchar,text,char,integer,timestamp with time zone,varchar,integer,timestamp with time zone,integer,varchar,integer) returns integer as ' declare p_message_id alias for $1; Index: openacs-4/packages/forums/www/forum-view-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/Attic/forum-view-postgresql.xql,v diff -u -r1.6 -r1.7 --- openacs-4/packages/forums/www/forum-view-postgresql.xql 30 Nov 2002 17:35:39 -0000 1.6 +++ openacs-4/packages/forums/www/forum-view-postgresql.xql 21 Dec 2002 22:28:07 -0000 1.7 @@ -15,7 +15,7 @@ where fm1.forum_id = :forum_id and fm1.tree_sortkey between tree_left(fm.tree_sortkey) and tree_right(fm.tree_sortkey)) as n_messages, to_char(fm.last_child_post, 'YYYY-MM-DD HH24:MI:SS') as last_child_post_ansi, - case when fm.last_child_post > (now() - 1) then 't' else 'f' end as new_p + case when fm.last_child_post > (now() - interval '1 day') then 't' else 'f' end as new_p from forums_messages_approved fm where fm.forum_id = :forum_id and fm.parent_id is null @@ -36,7 +36,7 @@ where fm1.forum_id = :forum_id and fm1.tree_sortkey between tree_left(fm.tree_sortkey) and tree_right(fm.tree_sortkey)) as n_messages, to_char(fm.last_child_post, 'YYYY-MM-DD HH24:MI:SS') as last_child_post_ansi, - case when fm.last_child_post > (now() - 1) then 't' else 'f' end as new_p + case when fm.last_child_post > (now() - interval '1 day') then 't' else 'f' end as new_p from forums_messages_approved fm where fm.forum_id = :forum_id and fm.parent_id is null Index: openacs-4/packages/forums/www/index-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/Attic/index-postgresql.xql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/forums/www/index-postgresql.xql 30 Nov 2002 17:35:39 -0000 1.4 +++ openacs-4/packages/forums/www/index-postgresql.xql 21 Dec 2002 22:28:07 -0000 1.5 @@ -11,7 +11,7 @@ where forums_messages.forum_id = forums_forums_enabled.forum_id and 1 = tree_level(forums_messages.tree_sortkey)) as n_threads, to_char(last_post, 'YYYY-MM-DD HH24:MI:SS') as last_post_ansi, - case when last_post > (now() - 1) then 't' else 'f' end as new_p + case when last_post > (now() - interval '1 day') then 't' else 'f' end as new_p from forums_forums_enabled where forums_forums_enabled.package_id = :package_id and ( Index: openacs-4/packages/lars-blogger/sql/postgresql/lars-blogger-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/sql/postgresql/lars-blogger-create.sql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/lars-blogger/sql/postgresql/lars-blogger-create.sql 30 Nov 2002 17:36:59 -0000 1.3 +++ openacs-4/packages/lars-blogger/sql/postgresql/lars-blogger-create.sql 21 Dec 2002 22:27:58 -0000 1.4 @@ -30,8 +30,8 @@ references apm_packages(package_id), title varchar(500), content varchar(32000), - entry_date datetime, - posted_date datetime, + entry_date timestamp, + posted_date timestamp, draft_p char(1) default 'f' constraint pinds_blog_entries_draft_ck check (draft_p in ('t','f')), @@ -61,7 +61,7 @@ integer, -- package_id varchar, -- title varchar, -- content - datetime, -- entry_date + timestamp, -- entry_date char, -- draft_p integer, -- creation_user varchar -- creation_ip Index: openacs-4/packages/lars-blogger/sql/postgresql/lars-blogger-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/sql/postgresql/lars-blogger-drop.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/lars-blogger/sql/postgresql/lars-blogger-drop.sql 14 Sep 2002 21:43:34 -0000 1.2 +++ openacs-4/packages/lars-blogger/sql/postgresql/lars-blogger-drop.sql 21 Dec 2002 22:27:58 -0000 1.3 @@ -41,7 +41,7 @@ integer, -- package_id varchar, -- title varchar, -- content - datetime, -- entry_date + timestamp, -- entry_date char, -- draft_p integer, -- creation_user varchar -- creation_ip Index: openacs-4/packages/notifications/sql/postgresql/notifications-package-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/sql/postgresql/notifications-package-create.sql,v diff -u -r1.8 -r1.9 --- openacs-4/packages/notifications/sql/postgresql/notifications-package-create.sql 19 Aug 2002 20:37:15 -0000 1.8 +++ openacs-4/packages/notifications/sql/postgresql/notifications-package-create.sql 21 Dec 2002 22:27:47 -0000 1.9 @@ -9,7 +9,7 @@ select define_function_args ('notification_interval__new','interval_id,name,n_seconds,creation_date,creation_user,creation_ip,context_id'); -create function notification_interval__new (integer, varchar, integer, timestamp, integer, varchar, integer) +create function notification_interval__new (integer, varchar, integer, timestamp with time zone, integer, varchar, integer) returns integer as ' declare p_interval_id alias for $1; @@ -54,7 +54,7 @@ select define_function_args ('notification_delivery_method__new','delivery_method_id,sc_impl_id,short_name,pretty_name,creation_date,creation_user,creation_ip,context_id'); -create function notification_delivery_method__new (integer, integer, varchar, varchar, timestamp, integer, varchar, integer) +create function notification_delivery_method__new (integer, integer, varchar, varchar, timestamp with time zone, integer, varchar, integer) returns integer as ' declare p_delivery_method_id alias for $1; @@ -106,7 +106,7 @@ -- implementation -create function notification_type__new (integer,integer,varchar,varchar,varchar,timestamp,integer,varchar,integer) +create function notification_type__new (integer,integer,varchar,varchar,varchar,timestamp with time zone,integer,varchar,integer) returns integer as ' DECLARE p_type_id alias for $1; @@ -150,7 +150,7 @@ select define_function_args ('notification_request__new','request_id,object_type;notification_request,type_id,user_id,object_id,interval_id,delivery_method_id,format,creation_date,creation_user,creation_ip,context_id'); -create function notification_request__new (integer,varchar,integer,integer,integer,integer,integer,varchar,timestamp,integer,varchar,integer) +create function notification_request__new (integer,varchar,integer,integer,integer,integer,integer,varchar,timestamp with time zone,integer,varchar,integer) returns integer as ' DECLARE p_request_id alias for $1; @@ -217,7 +217,7 @@ select define_function_args ('notification__new','notification_id,type_id,object_id,notif_date,response_id,notif_subject,notif_text,notif_html,creation_date,creation_user,creation_ip,context_id'); -create function notification__new(integer,integer,integer,timestamp,integer,varchar,text,text,timestamp,integer,varchar,integer) +create function notification__new(integer,integer,integer,timestamp with time zone,integer,varchar,text,text,timestamp with time zone,integer,varchar,integer) returns integer as ' declare p_notification_id alias for $1; Index: openacs-4/packages/notifications/sql/postgresql/notifications-replies-package-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/sql/postgresql/notifications-replies-package-create.sql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/notifications/sql/postgresql/notifications-replies-package-create.sql 20 Sep 2002 07:32:19 -0000 1.3 +++ openacs-4/packages/notifications/sql/postgresql/notifications-replies-package-create.sql 21 Dec 2002 22:27:47 -0000 1.4 @@ -16,7 +16,7 @@ select define_function_args ('notification_reply__delete','reply_id'); -create function notification_reply__new (integer,integer,integer,integer,varchar,text,timestamp,timestamp,integer,varchar,integer) +create function notification_reply__new (integer,integer,integer,integer,varchar,text,timestamp with time zone,timestamp with time zone,integer,varchar,integer) returns integer as ' DECLARE p_reply_id alias for $1; Index: openacs-4/packages/rss-support/sql/postgresql/rss-generation-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/sql/postgresql/rss-generation-create.sql,v diff -u -r1.7 -r1.8 --- openacs-4/packages/rss-support/sql/postgresql/rss-generation-create.sql 30 Nov 2001 05:56:37 -0000 1.7 +++ openacs-4/packages/rss-support/sql/postgresql/rss-generation-create.sql 21 Dec 2002 22:27:37 -0000 1.8 @@ -164,7 +164,7 @@ Used for display purposes. '; -create function rss_gen_subscr__new (integer,integer,varchar,integer,timestamp,varchar,timestamp,integer,varchar,integer) +create function rss_gen_subscr__new (integer,integer,varchar,integer,timestamp with time zone,varchar,timestamp with time zone,integer,varchar,integer) returns integer as ' declare p_subscr_id alias for $1; Index: openacs-4/packages/search/sql/postgresql/search-packages-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/search/sql/postgresql/search-packages-create.sql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/search/sql/postgresql/search-packages-create.sql 30 Nov 2002 17:46:00 -0000 1.3 +++ openacs-4/packages/search/sql/postgresql/search-packages-create.sql 21 Dec 2002 22:27:28 -0000 1.4 @@ -21,7 +21,7 @@ end;' language 'plpgsql'; -create function search_observer__dequeue(integer,timestamp,varchar) +create function search_observer__dequeue(integer,timestamp with time zone,varchar) returns integer as ' declare p_object_id alias for $1; Index: openacs-4/packages/search/sql/postgresql/upgrade/upgrade-4.5-4.5.1.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/search/sql/postgresql/upgrade/upgrade-4.5-4.5.1.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/search/sql/postgresql/upgrade/upgrade-4.5-4.5.1.sql 3 Aug 2002 18:00:47 -0000 1.1 +++ openacs-4/packages/search/sql/postgresql/upgrade/upgrade-4.5-4.5.1.sql 21 Dec 2002 22:27:17 -0000 1.2 @@ -9,7 +9,7 @@ drop function search_observer__dequeue(integer,timestamp,varchar); -create function search_observer__dequeue(integer,timestamp,varchar) +create function search_observer__dequeue(integer,timestamp with time zone,varchar) returns integer as ' declare p_object_id alias for $1; Index: openacs-4/packages/spam/sql/postgresql/spam-packages.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/spam/sql/postgresql/spam-packages.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/spam/sql/postgresql/spam-packages.sql 4 Sep 2001 21:14:59 -0000 1.1 +++ openacs-4/packages/spam/sql/postgresql/spam-packages.sql 21 Dec 2002 22:27:03 -0000 1.2 @@ -2,7 +2,7 @@ -- -create function spam__new (integer,varchar,timestamp,text,varchar,text,varchar,varchar,integer,timestamp,integer,varchar,varchar,boolean,varchar,timestamp) +create function spam__new (integer,varchar,timestamp,text,varchar,text,varchar,varchar,integer,timestamp with time zone,integer,varchar,varchar,boolean,varchar,timestamp with time zone) returns integer as ' declare p_spam_id alias for $1; -- default null @@ -124,7 +124,7 @@ -- procedure edit -create function spam__edit (integer,text,varchar,varchar,varchar,timestamp) returns integer as ' +create function spam__edit (integer,text,varchar,varchar,varchar,timestamp with time zone) returns integer as ' declare p_spam_id alias for $1; -- spam_messages.spam_id%TYPE, p_title alias for $2; -- acs_mail_bodies.header_subject%TYPE default null @@ -249,7 +249,7 @@ -create function spam__new_content (integer,timestamp,integer,varchar,varchar,varchar,varchar,integer) +create function spam__new_content (integer,timestamp with time zone,integer,varchar,varchar,varchar,varchar,integer) returns integer as ' declare context_id alias for $1; -- acs_objects.context_id%TYPE