Index: openacs-4/contrib/obsolete-packages/mp3-jukebox/sql/postgresql/mp3-jukebox-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3-jukebox/sql/postgresql/mp3-jukebox-create.sql,v diff -u -r1.1 -r1.1.4.1 --- openacs-4/contrib/obsolete-packages/mp3-jukebox/sql/postgresql/mp3-jukebox-create.sql 17 Oct 2001 19:44:08 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/mp3-jukebox/sql/postgresql/mp3-jukebox-create.sql 2 Mar 2003 22:47:23 -0000 1.1.4.1 @@ -117,7 +117,7 @@ user_id integer constraint mp3_mp3_stats_user_id_fk references users(user_id), - access_date timestamp + access_date timestamptz constraint mp3_mp3_stats_access_date_nn not null ); @@ -129,7 +129,7 @@ user_id integer constraint mp3_playlists_stats_user_id_fk references users(user_id), - access_date timestamp + access_date timestamptz constraint mp3_playlist_stats_date_nn not null ); @@ -147,7 +147,7 @@ vote integer constraint mp3_votes_vote_nn not null, - vote_date timestamp + vote_date timestamptz ); create view mp3_mp3_playlist_map_view as @@ -187,7 +187,7 @@ p_title alias for $3; -- default null p_deleted_p boolean default ''f''; p_object_type varchar default ''mp3''; - p_creation_date timestamp default now(); + p_creation_date timestamptz default current_timestamp; p_creation_user integer default null; p_creation_ip varchar default null; p_context_id integer default null; @@ -238,7 +238,7 @@ end;' language 'plpgsql'; -create function mp3_playlist__new (integer,varchar,boolean,integer,varchar,timestamp,integer,varchar,integer) +create function mp3_playlist__new (integer,varchar,boolean,integer,varchar,timestamptz,integer,varchar,integer) returns integer as ' declare p_playlist_id alias for $1; -- default null @@ -353,7 +353,7 @@ end;' language 'plpgsql'; -create function mp3_playlist__vote_cast (integer,integer,integer,integer,timestamp) +create function mp3_playlist__vote_cast (integer,integer,integer,integer,timestamptz) returns integer as ' declare p_user_id alias for $1; Index: openacs-4/contrib/obsolete-packages/mp3-jukebox/sql/postgresql/mp3-jukebox-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3-jukebox/sql/postgresql/mp3-jukebox-drop.sql,v diff -u -r1.1 -r1.1.4.1 --- openacs-4/contrib/obsolete-packages/mp3-jukebox/sql/postgresql/mp3-jukebox-drop.sql 17 Oct 2001 19:44:08 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/mp3-jukebox/sql/postgresql/mp3-jukebox-drop.sql 2 Mar 2003 22:47:23 -0000 1.1.4.1 @@ -56,11 +56,11 @@ -- drop package mp3_playlist; -- drop package mp3; -drop function mp3_playlist__new (integer,varchar,boolean,integer,varchar,timestamp,integer,varchar,integer); +drop function mp3_playlist__new (integer,varchar,boolean,integer,varchar,timestamptz,integer,varchar,integer); drop function mp3_playlist__delete (integer); drop function mp3_playlist__item_add (integer,integer,integer); drop function mp3_playlist__item_remove (integer,integer); -drop function mp3_playlist__vote_cast (integer,integer,integer,integer,timestamp); +drop function mp3_playlist__vote_cast (integer,integer,integer,integer,timestamptz); drop function mp3_playlist__item_order_swap (integer,integer); drop function mp3__new (integer,varchar,varchar); drop function mp3__delete (integer); Index: openacs-4/packages/download/sql/postgresql/download-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/sql/postgresql/download-create.sql,v diff -u -r1.5 -r1.5.4.1 --- openacs-4/packages/download/sql/postgresql/download-create.sql 23 Feb 2002 05:15:27 -0000 1.5 +++ openacs-4/packages/download/sql/postgresql/download-create.sql 2 Mar 2003 22:42:49 -0000 1.5.4.1 @@ -209,7 +209,7 @@ constraint download_ar_id_pk primary key, approved_p boolean, - approved_date timestamp, + approved_date timestamptz, approved_user integer constraint download_ar_usr_fk references users, @@ -236,7 +236,7 @@ clob_answer text, number_answer numeric, varchar_answer text, - date_answer timestamp + date_answer timestamptz ); @@ -262,7 +262,7 @@ constraint download_downloads_rev_fk references download_archive_revisions on delete cascade, - download_date timestamp not null, + download_date timestamptz not null, download_hostname varchar(400), download_ip varchar(20), user_agent varchar(200), Index: openacs-4/packages/download/sql/postgresql/download-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/sql/postgresql/download-drop.sql,v diff -u -r1.7 -r1.7.4.1 --- openacs-4/packages/download/sql/postgresql/download-drop.sql 23 Feb 2002 05:15:35 -0000 1.7 +++ openacs-4/packages/download/sql/postgresql/download-drop.sql 2 Mar 2003 22:42:49 -0000 1.7.4.1 @@ -30,8 +30,8 @@ drop view download_downloads_sequence; -- Functions -- -drop function download_rep__new (integer,varchar,varchar,varchar,timestamp,integer,integer,integer,varchar); -drop function download_rep__edit (integer,varchar,varchar,varchar,timestamp,integer,varchar); +drop function download_rep__new (integer,varchar,varchar,varchar,timestamptz,integer,integer,integer,varchar); +drop function download_rep__edit (integer,varchar,varchar,varchar,timestamptz,integer,varchar); drop function download_rep__delete (integer); -- Tables -- 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.4.1 -r1.4.4.2 --- openacs-4/packages/download/sql/postgresql/download-packages.sql 21 Jan 2003 13:49:34 -0000 1.4.4.1 +++ openacs-4/packages/download/sql/postgresql/download-packages.sql 2 Mar 2003 22:42:49 -0000 1.4.4.2 @@ -36,7 +36,7 @@ -- -set_metadata_value -- -downloaded_by -create function download_rep__new (integer,varchar,varchar,varchar,timestamp with time zone,integer,integer,integer,varchar) +create function download_rep__new (integer,varchar,varchar,varchar,timestamptz,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 with time zone,integer,varchar) +create function download_rep__edit (integer,varchar,varchar,varchar,timestamptz,integer,varchar) returns integer as ' declare edit__repository_id alias for $1; Index: openacs-4/packages/ecommerce/sql/postgresql/ec-product-package-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/sql/postgresql/ec-product-package-create.sql,v diff -u -r1.2 -r1.2.4.1 --- openacs-4/packages/ecommerce/sql/postgresql/ec-product-package-create.sql 18 Jul 2001 05:39:56 -0000 1.2 +++ openacs-4/packages/ecommerce/sql/postgresql/ec-product-package-create.sql 2 Mar 2003 22:43:17 -0000 1.2.4.1 @@ -16,7 +16,7 @@ -- gilbertw - PostgreSQL only supports 16 parameters -- created a plpgsql block to do the update and insert -- start a transaction for the new product creation -create function ec_product__new (integer,integer,integer,varchar,numeric,varchar,varchar,varchar,varchar,boolean,char,varchar,timestamp,varchar,varchar,varchar) +create function ec_product__new (integer,integer,integer,varchar,numeric,varchar,varchar,varchar,varchar,boolean,char,varchar,timestamptz,varchar,varchar,varchar) returns integer as ' declare new__product_id alias for $1; -- default null Index: openacs-4/packages/ecommerce/sql/postgresql/ecommerce-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/sql/postgresql/ecommerce-create.sql,v diff -u -r1.15.2.2 -r1.15.2.3 --- openacs-4/packages/ecommerce/sql/postgresql/ecommerce-create.sql 19 Oct 2002 19:50:48 -0000 1.15.2.2 +++ openacs-4/packages/ecommerce/sql/postgresql/ecommerce-create.sql 2 Mar 2003 22:43:17 -0000 1.15.2.3 @@ -69,7 +69,7 @@ template_id integer not null primary key, template_name varchar(200), template varchar(4000), - last_modified timestamp(0) not null, + last_modified timestamptz not null, last_modifying_user integer not null references users, modified_ip_address varchar(20) not null ); @@ -78,7 +78,7 @@ template_id integer, template_name varchar(200), template varchar(4000), - last_modified timestamp(0), + last_modified timestamptz, last_modifying_user integer, modified_ip_address varchar(20), delete_p boolean default 'f' @@ -118,7 +118,7 @@ -- pretty, human-readable category_name varchar(100), sort_key numeric, - last_modified timestamp(0)not null, + last_modified timestamptz not null, last_modifying_user integer not null references users, modified_ip_address varchar(20) not null ); @@ -129,7 +129,7 @@ category_id integer, category_name varchar(100), sort_key numeric, - last_modified timestamp(0), + last_modified timestamptz, last_modifying_user integer, modified_ip_address varchar(20), delete_p boolean default 'f' @@ -164,7 +164,7 @@ -- pretty, human-readable subcategory_name varchar(100), sort_key numeric, - last_modified timestamp(0)not null, + last_modified timestamptz not null, last_modifying_user integer not null references users, modified_ip_address varchar(20) not null ); @@ -177,7 +177,7 @@ category_id integer, subcategory_name varchar(100), sort_key numeric, - last_modified timestamp(0), + last_modified timestamptz, last_modifying_user integer, modified_ip_address varchar(20), delete_p boolean default 'f' @@ -221,7 +221,7 @@ -- pretty, human-readable subsubcategory_name varchar(100), sort_key numeric, - last_modified timestamp(0)not null, + last_modified timestamptz not null, last_modifying_user integer not null references users, modified_ip_address varchar(20) not null ); @@ -235,7 +235,7 @@ subcategory_id integer, subsubcategory_name varchar(100), sort_key numeric, - last_modified timestamp(0), + last_modified timestamptz, last_modifying_user integer, modified_ip_address varchar(20), delete_p boolean default 'f' @@ -339,7 +339,7 @@ -- integer not null primary key, sku varchar(100), product_name varchar(200), - creation_date timestamp(0)default now() not null, + creation_date timestamptz default current_timestamp not null, one_line_description varchar(400), detailed_description varchar(4000), search_keywords varchar(4000), @@ -370,9 +370,9 @@ active_p boolean default 't', -- the date the product becomes available for sale (it can be listed -- before then, it's just not buyable) - available_date timestamp(0)default now() not null, + available_date timestamptz default current_timestamp not null, announcements varchar(4000), - announcements_expire timestamp(0), + announcements_expire timestamptz, -- if there's a web site with more info about the product url varchar(300), template_id integer references ec_templates, @@ -389,7 +389,7 @@ -- email this list on purchase email_on_purchase_list varchar(4000), -- the user ID and IP address of the creator of the product - last_modified timestamp(0)not null, + last_modified timestamptz not null, last_modifying_user integer not null references users, modified_ip_address varchar(20) not null ); @@ -407,7 +407,7 @@ create table ec_products_audit ( product_id integer, product_name varchar(200), - creation_date timestamp(0), + creation_date timestamptz, one_line_description varchar(400), detailed_description varchar(4000), search_keywords varchar(4000), @@ -418,13 +418,13 @@ dirname varchar(200), present_p boolean default 't', active_p boolean default 't', - available_date timestamp(0), + available_date timestamptz, announcements varchar(4000), - announcements_expire timestamp(0), + announcements_expire timestamptz, url varchar(300), template_id integer, stock_status char(1) check (stock_status in ('o','q','m','s','i')), - last_modified timestamp(0), + last_modified timestamptz, last_modifying_user integer, modified_ip_address varchar(20), delete_p boolean default 'f' @@ -491,13 +491,13 @@ sale_price_id integer not null primary key, product_id integer not null references ec_products, sale_price numeric, - sale_begins timestamp(0)not null, - sale_ends timestamp(0)not null, + sale_begins timestamptz not null, + sale_ends timestamptz not null, -- like Introductory Price or Sale Price or Special Offer sale_name varchar(30), -- if non-null, the user has to know this code to get the sale price offer_code varchar(20), - last_modified timestamp(0)not null, + last_modified timestamptz not null, last_modifying_user integer not null references users, modified_ip_address varchar(20) not null ); @@ -515,11 +515,11 @@ sale_price_id integer, product_id integer, sale_price numeric, - sale_begins timestamp(0), - sale_ends timestamp(0), + sale_begins timestamptz, + sale_ends timestamptz, sale_name varchar(30), offer_code varchar(20), - last_modified timestamp(0), + last_modified timestamptz, last_modifying_user integer, modified_ip_address varchar(20), delete_p boolean default 'f' @@ -556,7 +556,7 @@ -- components of the above series component_id integer not null references ec_products, primary key (series_id, component_id), - last_modified timestamp(0)not null, + last_modified timestamptz not null, last_modifying_user integer not null references users, modified_ip_address varchar(20) not null ); @@ -566,7 +566,7 @@ create table ec_product_series_map_audit ( series_id integer, component_id integer, - last_modified timestamp(0), + last_modified timestamptz, last_modifying_user integer, modified_ip_address varchar(20), delete_p boolean default 'f' @@ -652,15 +652,15 @@ user_class_id integer not null primary key, -- human-readable user_class_name varchar(200), -- e.g., student - last_modified timestamp(0)not null, + last_modified timestamptz not null, last_modifying_user integer not null references users, modified_ip_address varchar(20) not null ); create table ec_user_classes_audit ( user_class_id integer, user_class_name varchar(200), -- e.g., student - last_modified timestamp(0), + last_modified timestamptz, last_modifying_user integer, modified_ip_address varchar(20), delete_p boolean default 'f' @@ -690,7 +690,7 @@ product_id integer not null references ec_products, user_class_id integer not null references ec_user_classes, price numeric, - last_modified timestamp(0)not null, + last_modified timestamptz not null, last_modifying_user integer not null references users, modified_ip_address varchar(20) not null, primary key (product_id, user_class_id) @@ -704,7 +704,7 @@ product_id integer, user_class_id integer, price numeric, - last_modified timestamp(0), + last_modified timestamptz, last_modifying_user integer, modified_ip_address varchar(20), delete_p boolean default 'f' @@ -747,7 +747,7 @@ category_id integer references ec_categories, subcategory_id integer references ec_subcategories, subsubcategory_id integer references ec_subsubcategories, - last_modified timestamp(0)not null, + last_modified timestamptz not null, last_modifying_user integer not null references users, modified_ip_address varchar(20) not null ); @@ -767,7 +767,7 @@ category_id integer, subcategory_id integer, subsubcategory_id integer, - last_modified timestamp(0), + last_modified timestamptz, last_modifying_user integer, modified_ip_address varchar(20), delete_p boolean default 'f' @@ -834,7 +834,7 @@ user_class_id integer not null references ec_user_classes, primary key (user_id, user_class_id), user_class_approved_p boolean, - last_modified timestamp(0)not null, + last_modified timestamptz not null, last_modifying_user integer not null references users, modified_ip_address varchar(20) not null ); @@ -846,7 +846,7 @@ user_id integer, user_class_id integer, user_class_approved_p boolean, - last_modified timestamp(0), + last_modified timestamptz, last_modifying_user integer, modified_ip_address varchar(20), delete_p boolean default 'f' @@ -877,7 +877,7 @@ create table ec_product_links ( product_a integer not null references ec_products, product_b integer not null references ec_products, - last_modified timestamp(0)not null, + last_modified timestamptz not null, last_modifying_user integer not null references users, modified_ip_address varchar(20) not null, primary key (product_a, product_b) @@ -888,7 +888,7 @@ create table ec_product_links_audit ( product_a integer, product_b integer, - last_modified timestamp(0), + last_modified timestamptz, last_modifying_user integer, modified_ip_address varchar(20), delete_p boolean default 'f' @@ -926,8 +926,8 @@ rating numeric, -- in some systems, the administrator will have to approve comments first approved_p boolean, - comment_date timestamp(0), - last_modified timestamp(0)not null, + comment_date timestamptz, + last_modified timestamptz not null, last_modifying_user integer not null references users, modified_ip_address varchar(20) not null ); @@ -944,7 +944,7 @@ one_line_summary varchar(300), rating numeric, approved_p boolean, - last_modified timestamp(0), + last_modified timestamptz, last_modifying_user integer, modified_ip_address varchar(20), delete_p boolean default 'f' @@ -981,11 +981,11 @@ product_id integer not null references ec_products, author_name varchar(100), publication varchar(100), - review_date timestamp(0), + review_date timestamptz, -- in HTML format review text, display_p boolean, - last_modified timestamp(0)not null, + last_modified timestamptz not null, last_modifying_user integer not null references users, modified_ip_address varchar(20) not null ); @@ -998,11 +998,11 @@ product_id integer, author_name varchar(100), publication varchar(100), - review_date timestamp(0), + review_date timestamptz, -- in HTML format review text, display_p boolean, - last_modified timestamp(0), + last_modified timestamptz, last_modifying_user integer, modified_ip_address varchar(20), delete_p boolean default 'f' @@ -1039,7 +1039,7 @@ product_id integer not null references ec_products, category_id integer not null references ec_categories, publisher_favorite_p boolean, - last_modified timestamp(0)not null, + last_modified timestamptz not null, last_modifying_user integer not null references users, modified_ip_address varchar(20) not null, primary key (product_id, category_id) @@ -1052,7 +1052,7 @@ product_id integer, category_id integer, publisher_favorite_p boolean, - last_modified timestamp(0), + last_modified timestamptz, last_modifying_user integer, modified_ip_address varchar(20), delete_p boolean default 'f' @@ -1086,7 +1086,7 @@ product_id integer not null references ec_products, subcategory_id integer not null references ec_subcategories, publisher_favorite_p boolean, - last_modified timestamp(0)not null, + last_modified timestamptz not null, last_modifying_user integer not null references users, modified_ip_address varchar(20) not null, primary key (product_id, subcategory_id) @@ -1100,7 +1100,7 @@ product_id integer, subcategory_id integer, publisher_favorite_p boolean, - last_modified timestamp(0), + last_modified timestamptz, last_modifying_user integer, modified_ip_address varchar(20), delete_p boolean default 'f' @@ -1133,7 +1133,7 @@ product_id integer not null references ec_products, subsubcategory_id integer not null references ec_subsubcategories, publisher_favorite_p boolean, - last_modified timestamp(0)not null, + last_modified timestamptz not null, last_modifying_user integer not null references users, modified_ip_address varchar(20) not null, primary key (product_id, subsubcategory_id) @@ -1146,7 +1146,7 @@ product_id integer, subsubcategory_id integer, publisher_favorite_p boolean, - last_modified timestamp(0), + last_modified timestamptz, last_modifying_user integer, modified_ip_address varchar(20), delete_p boolean default 'f' @@ -1200,9 +1200,9 @@ default_value varchar(100), -- column type for oracle (i.e. text, varchar(50), integer, ...) column_type varchar(100), - creation_date timestamp(0), + creation_date timestamptz, active_p boolean default 't', - last_modified timestamp(0)not null, + last_modified timestamptz not null, last_modifying_user integer not null references users, modified_ip_address varchar(20) not null ); @@ -1212,9 +1212,9 @@ field_name varchar(100), default_value varchar(100), column_type varchar(100), - creation_date timestamp(0), + creation_date timestamptz, active_p boolean default 't', - last_modified timestamp(0), + last_modified timestamptz, last_modifying_user integer, modified_ip_address varchar(20), delete_p boolean default 'f' @@ -1250,14 +1250,14 @@ -- this table stores the values create table ec_custom_product_field_values ( product_id integer not null primary key references ec_products, - last_modified timestamp(0)not null, + last_modified timestamptz not null, last_modifying_user integer not null references users, modified_ip_address varchar(20) not null ); create table ec_custom_p_field_values_audit ( product_id integer, - last_modified timestamp(0), + last_modified timestamptz, last_modifying_user integer, modified_ip_address varchar(20), delete_p boolean default 'f' @@ -1291,7 +1291,7 @@ -- often will not be known user_id integer references users, ip_address varchar(20) not null, - start_time timestamp(0), + start_time timestamptz, http_user_agent varchar(4000) ); @@ -1343,11 +1343,11 @@ -- information recorded upon FSM state changes -- we need this to figure out if order is stale -- and should be offered up for removal - in_basket_date timestamp(0), - confirmed_date timestamp(0), - authorized_date timestamp(0), - voided_date timestamp(0), - expired_date timestamp(0), + in_basket_date timestamptz, + confirmed_date timestamptz, + authorized_date timestamptz, + voided_date timestamptz, + expired_date timestamptz, -- base shipping, which is added to the amount charged for each item shipping_charged numeric, shipping_refunded numeric, @@ -1399,18 +1399,18 @@ -- shipments. -- a trigger fills address_id in automatically if it's null address_id integer references ec_addresses, - shipment_date timestamp(0)not null, - expected_arrival_date timestamp(0), + shipment_date timestamptz not null, + expected_arrival_date timestamptz, carrier varchar(50), -- e.g., 'fedex' tracking_number varchar(24), -- only if we get confirmation from carrier that the goods -- arrived on a specific date - actual_arrival_date timestamp(0), + actual_arrival_date timestamptz, -- arbitrary info from carrier, e.g., 'Joe Smith signed for it' actual_arrival_detail varchar(4000), -- for things that aren't really shipped like services shippable_p boolean default 't', - last_modified timestamp(0), + last_modified timestamptz, last_modifying_user integer, modified_ip_address varchar(20) ); @@ -1441,13 +1441,13 @@ shipment_id integer, order_id integer, address_id integer, - shipment_date timestamp(0), - expected_arrival_date timestamp(0), + shipment_date timestamptz, + expected_arrival_date timestamptz, carrier varchar(50), tracking_number varchar(24), - actual_arrival_date timestamp(0), + actual_arrival_date timestamptz, actual_arrival_detail varchar(4000), - last_modified timestamp(0), + last_modified timestamptz, last_modifying_user integer, modified_ip_address varchar(20), delete_p boolean default 'f' @@ -1488,7 +1488,7 @@ order_id integer not null references ec_orders, -- not really necessary because it's in ec_financial_transactions refund_amount numeric not null, - refund_date timestamp(0)not null, + refund_date timestamptz not null, refunded_by integer not null references users, refund_reasons varchar(4000) ); @@ -1508,13 +1508,13 @@ style_choice varchar(4000), shipment_id integer references ec_shipments, -- this is the date that user put this item into their shopping basket - in_cart_date timestamp(0), - voided_date timestamp(0), + in_cart_date timestamptz, + voided_date timestamptz, voided_by integer references users, - expired_date timestamp(0), + expired_date timestamptz, item_state varchar(50) default 'in_basket', -- NULL if not received back - received_back_date timestamp(0), + received_back_date timestamptz, -- columns for reporting (e.g., what was done, what was made) price_charged numeric, price_refunded numeric, @@ -1693,7 +1693,7 @@ -- the preloaded template) default_template integer default 1 not null references ec_templates, - last_modified timestamp(0)not null, + last_modified timestamptz not null, last_modifying_user integer not null references users, modified_ip_address varchar(20) not null ); @@ -1707,7 +1707,7 @@ add_exp_amount_per_item numeric, add_exp_amount_by_weight numeric, default_template integer, - last_modified timestamp(0), + last_modified timestamptz, last_modifying_user integer, modified_ip_address varchar(20), delete_p boolean default 'f' @@ -1749,7 +1749,7 @@ tax_rate numeric not null, -- charge tax on shipping? shipping_p boolean not null, - last_modified timestamp(0)not null, + last_modified timestamptz not null, last_modifying_user integer not null references users, modified_ip_address varchar(20) not null ); @@ -1758,7 +1758,7 @@ usps_abbrev char(2), tax_rate numeric, shipping_p boolean, - last_modified timestamp(0), + last_modified timestamptz, last_modifying_user integer, modified_ip_address varchar(20), delete_p boolean default 'f' @@ -1823,7 +1823,7 @@ price_guarantee_policy varchar(4000), delivery_policy varchar(4000), installation_policy varchar(4000), - last_modified timestamp(0)not null, + last_modified timestamptz not null, last_modifying_user integer not null references users, modified_ip_address varchar(20) not null ); @@ -1851,7 +1851,7 @@ price_guarantee_policy varchar(4000), delivery_policy varchar(4000), installation_policy varchar(4000), - last_modified timestamp(0), + last_modified timestamptz, last_modifying_user integer, modified_ip_address varchar(20), delete_p boolean default 'f' @@ -1929,7 +1929,7 @@ price_guarantee_policy varchar(4000), delivery_policy varchar(4000), installation_policy varchar(4000), - last_modified timestamp(0)not null, + last_modified timestamptz not null, last_modifying_user integer not null references users, modified_ip_address varchar(20) not null ); @@ -1956,7 +1956,7 @@ price_guarantee_policy varchar(4000), delivery_policy varchar(4000), installation_policy varchar(4000), - last_modified timestamp(0), + last_modified timestamptz, last_modifying_user integer, modified_ip_address varchar(20), delete_p boolean default 'f' @@ -2022,10 +2022,10 @@ stock_status char(1) check (stock_status in ('o','q','m','s','i')), special_offer_p boolean, special_offer_html varchar(500), - offer_begins timestamp(0)not null, - offer_ends timestamp(0)not null, + offer_begins timestamptz not null, + offer_ends timestamptz not null, deleted_p boolean default 'f', - last_modified timestamp(0)not null, + last_modified timestamptz not null, last_modifying_user integer not null references users, modified_ip_address varchar(20) not null ); @@ -2050,10 +2050,10 @@ stock_status char(1) check (stock_status in ('o','q','m','s','i')), special_offer_p boolean, special_offer_html varchar(500), - offer_begins timestamp(0), - offer_ends timestamp(0), + offer_begins timestamptz, + offer_ends timestamptz, deleted_p boolean default 'f', - last_modified timestamp(0), + last_modified timestamptz, last_modifying_user integer, modified_ip_address varchar(20), -- This differs from the deleted_p column! @@ -2110,14 +2110,14 @@ -- entire amount is used up (to speed up -- queries) amount_remaining_p boolean default 't', - issue_date timestamp(0), - authorized_date timestamp(0), - claimed_date timestamp(0), + issue_date timestamptz, + authorized_date timestamptz, + claimed_date timestamptz, -- customer service rep who issued it issued_by integer references users, -- customer who purchased it purchased_by integer references users, - expires timestamp(0), + expires timestamptz, user_id integer references users, -- if it's unclaimed, claim_check will be filled in, -- and user_id won't be filled in @@ -2128,10 +2128,10 @@ certificate_to varchar(100), certificate_from varchar(100), recipient_email varchar(100), - voided_date timestamp(0), + voided_date timestamptz, voided_by integer references users, reason_for_void varchar(4000), - last_modified timestamp(0)not null, + last_modified timestamptz not null, last_modifying_user integer not null references users, modified_ip_address varchar(20) not null, check (user_id is not null or claim_check is not null) @@ -2173,21 +2173,21 @@ gift_certificate_id integer, gift_certificate_state varchar(50), amount numeric, - issue_date timestamp(0), - authorized_date timestamp(0), + issue_date timestamptz, + authorized_date timestamptz, issued_by integer, purchased_by integer, - expires timestamp(0), + expires timestamptz, user_id integer, claim_check varchar(50), certificate_message varchar(200), certificate_to varchar(100), certificate_from varchar(100), recipient_email varchar(100), - voided_date timestamp(0), + voided_date timestamptz, voided_by integer, reason_for_void varchar(4000), - last_modified timestamp(0), + last_modified timestamptz, last_modifying_user integer, modified_ip_address varchar(20), delete_p boolean default 'f' @@ -2226,7 +2226,7 @@ gift_certificate_id integer not null references ec_gift_certificates, order_id integer references ec_orders, amount_used numeric, - used_date timestamp(0), + used_date timestamptz, amount_reinstated numeric, reinstated_date timestamp ); @@ -2251,7 +2251,7 @@ -- will have to get other info in order to identify the user create table ec_user_identification ( user_identification_id integer not null primary key, - date_added timestamp(0), + date_added timestamptz, user_id integer references users, email varchar(100), first_names varchar(100), @@ -2290,7 +2290,7 @@ customer_service_rep integer references users, user_identification_id integer not null references ec_user_identification, - interaction_date timestamp(0), + interaction_date timestamptz, interaction_originator varchar(20) not null, -- e.g. customer, customer-service-rep, automatic interaction_type varchar(30) not null, -- e.g. email, phone_call -- will be filled in if the customer-originated interaction is @@ -2328,8 +2328,8 @@ order_id integer references ec_orders, -- may be null if this issue isn't associated with a gift certificate gift_certificate_id integer references ec_gift_certificates, - open_date timestamp(0)not null, - close_date timestamp(0), + open_date timestamptz not null, + close_date timestamptz, -- customer service reps who closed the issue closed_by integer references users, -- we never really delete issues @@ -2394,7 +2394,7 @@ -- which picklist this item is in picklist_name varchar(100), sort_key numeric, - last_modified timestamp(0)not null, + last_modified timestamptz not null, last_modifying_user integer not null references users, modified_ip_address varchar(20) not null ); @@ -2404,7 +2404,7 @@ picklist_item varchar(100), picklist_name varchar(100), sort_key numeric, - last_modified timestamp(0), + last_modified timestamptz, last_modifying_user integer, modified_ip_address varchar(20), delete_p boolean default 'f' @@ -2465,7 +2465,7 @@ -- ec_cs_issue_type_map for the issue that will be created -- when the message is sent issue_type_list varchar(100), - last_modified timestamp(0)not null, + last_modified timestamptz not null, last_modifying_user integer not null references users, modified_ip_address varchar(20) not null ); @@ -2478,7 +2478,7 @@ variables varchar(1000), when_sent varchar(1000), issue_type_list varchar(100), - last_modified timestamp(0), + last_modified timestamptz, last_modifying_user integer, modified_ip_address varchar(20), delete_p boolean default 'f' @@ -2550,15 +2550,15 @@ create table ec_spam_log ( spam_id integer not null primary key, - spam_date timestamp(0), + spam_date timestamptz, spam_text varchar(4000), -- the following are all criteria used in choosing the users to be spammed mailing_list_category_id integer references ec_categories, mailing_list_subcategory_id integer references ec_subcategories, mailing_list_subsubcategory_id integer references ec_subsubcategories, user_class_id integer references ec_user_classes, product_id integer references ec_products, - last_visit_start_date timestamp(0), + last_visit_start_date timestamptz, last_visit_end_date timestamp ); @@ -2606,12 +2606,12 @@ -- the f is mainly just for reassurance; we only capture ones with t) -- There's no need to set this for refunds. Refunds are always to be captured. to_be_captured_p boolean, - inserted_date timestamp(0)not null, - authorized_date timestamp(0), + inserted_date timestamptz not null, + authorized_date timestamptz, -- set when to_be_captured_p becomes 't'; used in cron jobs - to_be_captured_date timestamp(0), - marked_date timestamp(0), - refunded_date timestamp(0), + to_be_captured_date timestamptz, + marked_date timestamptz, + refunded_date timestamptz, -- if the transaction failed, this will keep the cron jobs from continuing -- to retry it failed_p boolean default 'f', @@ -2663,13 +2663,13 @@ create table ec_problems_log ( problem_id integer not null primary key, - problem_date timestamp(0), + problem_date timestamptz, problem_details varchar(4000), -- if it's related to an order order_id integer references ec_orders, -- if it's related to a gift certificate gift_certificate_id integer references ec_gift_certificates, - resolved_date timestamp(0), + resolved_date timestamptz, resolved_by integer references users ); Index: openacs-4/packages/ecommerce/sql/postgresql/pl-sql-utilities-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/sql/postgresql/pl-sql-utilities-drop.sql,v diff -u -r1.1 -r1.1.4.1 --- openacs-4/packages/ecommerce/sql/postgresql/pl-sql-utilities-drop.sql 9 Jul 2001 23:44:19 -0000 1.1 +++ openacs-4/packages/ecommerce/sql/postgresql/pl-sql-utilities-drop.sql 2 Mar 2003 22:43:18 -0000 1.1.4.1 @@ -1,4 +1,4 @@ -- defined in the acs-core -- drop function logical_negation(boolean); -drop function one_if_within_n_days (timestamp, integer); +drop function one_if_within_n_days (timestamptz, integer); drop function pseudo_contains (varchar, varchar); Index: openacs-4/packages/ecommerce/sql/postgresql/pl-sql-utilities.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/sql/postgresql/pl-sql-utilities.sql,v diff -u -r1.3 -r1.3.2.1 --- openacs-4/packages/ecommerce/sql/postgresql/pl-sql-utilities.sql 26 May 2002 04:36:49 -0000 1.3 +++ openacs-4/packages/ecommerce/sql/postgresql/pl-sql-utilities.sql 2 Mar 2003 22:43:18 -0000 1.3.2.1 @@ -10,7 +10,7 @@ -- know whether something happened within last N days (assumes query_date -- is in the past) -create function one_if_within_n_days (timestamp, integer) +create function one_if_within_n_days (timestamptz, integer) returns integer as ' declare query_date alias for $1; Index: openacs-4/packages/faq/sql/postgresql/faq-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/faq/sql/postgresql/faq-create.sql,v diff -u -r1.2.2.1 -r1.2.2.2 --- openacs-4/packages/faq/sql/postgresql/faq-create.sql 28 Oct 2002 16:16:10 -0000 1.2.2.1 +++ openacs-4/packages/faq/sql/postgresql/faq-create.sql 2 Mar 2003 22:43:48 -0000 1.2.2.2 @@ -75,7 +75,7 @@ sort_key integer not null ); -create function faq__new_q_and_a (integer,integer,varchar,varchar,integer,varchar,timestamp,integer,varchar,integer +create function faq__new_q_and_a (integer,integer,varchar,varchar,integer,varchar,timestamptz,integer,varchar,integer ) returns integer as ' declare @@ -121,7 +121,7 @@ end;' language 'plpgsql'; -create function faq__new_faq (integer, varchar, boolean,varchar,timestamp,integer,varchar,integer ) +create function faq__new_faq (integer, varchar, boolean,varchar,timestamptz,integer,varchar,integer ) returns integer as ' declare p_faq_id alias for $1; Index: openacs-4/packages/faq/sql/postgresql/faq-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/faq/sql/postgresql/faq-drop.sql,v diff -u -r1.2 -r1.2.2.1 --- openacs-4/packages/faq/sql/postgresql/faq-drop.sql 17 Jul 2002 20:20:17 -0000 1.2 +++ openacs-4/packages/faq/sql/postgresql/faq-drop.sql 2 Mar 2003 22:43:48 -0000 1.2.2.1 @@ -3,9 +3,9 @@ --openacs port @samir.symphinity.com --drop functions -drop function faq__new_q_and_a (integer,integer,varchar,varchar,integer,varchar,timestamp,integer,varchar,integer); +drop function faq__new_q_and_a (integer,integer,varchar,varchar,integer,varchar,timestamptz,integer,varchar,integer); drop function faq__delete_q_and_a (integer); -drop function faq__new_faq (integer, varchar, boolean,varchar,timestamp,integer,varchar,integer ); +drop function faq__new_faq (integer, varchar, boolean,varchar,timestamptz,integer,varchar,integer ); drop function faq__delete_faq (integer); drop function faq__name (integer); drop function faq__clone (integer,integer); 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.2.1 -r1.8.2.2 --- openacs-4/packages/file-storage/sql/postgresql/file-storage-simple-package-create.sql 21 Jan 2003 13:50:00 -0000 1.8.2.1 +++ openacs-4/packages/file-storage/sql/postgresql/file-storage-simple-package-create.sql 2 Mar 2003 22:44:34 -0000 1.8.2.2 @@ -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 with time zone,integer,varchar,integer) +create function fs_simple_object__new(integer,varchar,integer,varchar,varchar,timestamptz,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 with time zone,integer,varchar,integer) +create function fs_url__new(integer,varchar,varchar,integer,varchar,varchar,timestamptz,integer,varchar,integer) returns integer as ' DECLARE p_url_id alias for $1; Index: openacs-4/packages/forums/sql/postgresql/forums-forums-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/sql/postgresql/forums-forums-create.sql,v diff -u -r1.4.2.1 -r1.4.2.2 --- openacs-4/packages/forums/sql/postgresql/forums-forums-create.sql 22 Nov 2002 18:38:29 -0000 1.4.2.1 +++ openacs-4/packages/forums/sql/postgresql/forums-forums-create.sql 2 Mar 2003 22:45:02 -0000 1.4.2.2 @@ -70,7 +70,7 @@ package_id integer constraint forums_package_id_nn not null, - last_post timestamp + last_post timestamptz ); create view forums_forums_enabled 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.6.2.2 -r1.6.2.3 --- openacs-4/packages/forums/sql/postgresql/forums-forums-package-create.sql 21 Jan 2003 13:50:47 -0000 1.6.2.2 +++ openacs-4/packages/forums/sql/postgresql/forums-forums-package-create.sql 2 Mar 2003 22:45:02 -0000 1.6.2.3 @@ -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 with time zone,integer,varchar,integer) +create function forums_forum__new (integer,varchar,varchar,varchar,varchar,varchar,integer,timestamptz,integer,varchar,integer) returns integer as ' declare p_forum_id alias for $1; Index: openacs-4/packages/forums/sql/postgresql/forums-forums-package-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/sql/postgresql/forums-forums-package-drop.sql,v diff -u -r1.2 -r1.2.2.1 --- openacs-4/packages/forums/sql/postgresql/forums-forums-package-drop.sql 12 Jun 2002 15:24:02 -0000 1.2 +++ openacs-4/packages/forums/sql/postgresql/forums-forums-package-drop.sql 2 Mar 2003 22:45:02 -0000 1.2.2.1 @@ -11,7 +11,7 @@ -- chunks lifted from Gilbert. Thanks Orchard Labs! -- -drop function forums_forum__new (integer,varchar,varchar,varchar,varchar,varchar,integer,timestamp,integer,varchar,integer); +drop function forums_forum__new (integer,varchar,varchar,varchar,varchar,varchar,integer,timestamptz,integer,varchar,integer); drop function forums_forum__name(integer); Index: openacs-4/packages/forums/sql/postgresql/forums-messages-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/sql/postgresql/forums-messages-create.sql,v diff -u -r1.5.2.3 -r1.5.2.4 --- openacs-4/packages/forums/sql/postgresql/forums-messages-create.sql 31 Jan 2003 23:03:38 -0000 1.5.2.3 +++ openacs-4/packages/forums/sql/postgresql/forums-messages-create.sql 2 Mar 2003 22:45:02 -0000 1.5.2.4 @@ -31,8 +31,8 @@ references users(user_id) constraint forums_mess_user_id_nn not null, - posting_date timestamp - default now() + posting_date timestamptz + default current_timestamp constraint forum_mess_post_date_nn not null, state varchar(100) @@ -50,7 +50,7 @@ check (open_p in ('t','f')), tree_sortkey varbit, max_child_sortkey varbit, - last_child_post timestamp, + last_child_post timestamptz, constraint forums_mess_sk_forum_un unique (tree_sortkey, forum_id) ); 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.8.2.3 -r1.8.2.4 --- openacs-4/packages/forums/sql/postgresql/forums-messages-package-create.sql 21 Jan 2003 13:50:47 -0000 1.8.2.3 +++ openacs-4/packages/forums/sql/postgresql/forums-messages-package-create.sql 2 Mar 2003 22:45:02 -0000 1.8.2.4 @@ -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 with time zone,varchar,integer,timestamp with time zone,integer,varchar,integer) +create function forums_message__new (integer,varchar,integer,varchar,text,char,integer,timestamptz,varchar,integer,timestamptz,integer,varchar,integer) returns integer as ' declare p_message_id alias for $1; Index: openacs-4/packages/forums/sql/postgresql/forums-messages-package-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/sql/postgresql/forums-messages-package-drop.sql,v diff -u -r1.2 -r1.2.2.1 --- openacs-4/packages/forums/sql/postgresql/forums-messages-package-drop.sql 12 Jun 2002 15:24:02 -0000 1.2 +++ openacs-4/packages/forums/sql/postgresql/forums-messages-package-drop.sql 2 Mar 2003 22:45:02 -0000 1.2.2.1 @@ -11,7 +11,7 @@ -- chunks lifted from Gilbert. Thanks Orchard Labs! -- -drop function forums_message__new (integer,varchar,integer,varchar,text,char,integer,timestamp,varchar,integer,timestamp,integer,varchar,integer); +drop function forums_message__new (integer,varchar,integer,varchar,text,char,integer,timestamptz,varchar,integer,timestamptz,integer,varchar,integer); drop function forums_message__root_message_id (integer); Index: openacs-4/packages/forums/sql/postgresql/upgrade-0.1d-0.2d.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/sql/postgresql/Attic/upgrade-0.1d-0.2d.sql,v diff -u -r1.1.2.1 -r1.1.2.2 --- openacs-4/packages/forums/sql/postgresql/upgrade-0.1d-0.2d.sql 22 Nov 2002 18:38:29 -0000 1.1.2.1 +++ openacs-4/packages/forums/sql/postgresql/upgrade-0.1d-0.2d.sql 2 Mar 2003 22:45:02 -0000 1.1.2.2 @@ -1,10 +1,10 @@ -alter table forums_forums add column last_post timestamp; -alter table forums_messages add column last_child_post timestamp; +alter table forums_forums add column last_post timestamptz; +alter table forums_messages add column last_child_post timestamptz; create or replace function t () returns integer as ' declare v_record record; - v_timestamp timestamp; + v_timestamp timestamptz; begin for v_record in select forum_id @@ -68,7 +68,7 @@ from forums_forums where enabled_p = 't'; -create or replace function forums_message__new (integer,varchar,integer,varchar,text,char,integer,timestamp,varchar,integer,timestamp,integer,varchar,integer) +create or replace function forums_message__new (integer,varchar,integer,varchar,text,char,integer,timestamptz,varchar,integer,timestamptz,integer,varchar,integer) returns integer as ' declare p_message_id alias for $1; @@ -137,7 +137,7 @@ end; ' language 'plpgsql'; -create or replace function forums_forum__new (integer,varchar,varchar,varchar,varchar,varchar,integer,timestamp,integer,varchar,integer) +create or replace function forums_forum__new (integer,varchar,varchar,varchar,varchar,varchar,integer,timestamptz,integer,varchar,integer) returns integer as ' declare p_forum_id alias for $1; 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.2.2.2 -r1.2.2.3 --- openacs-4/packages/lars-blogger/sql/postgresql/lars-blogger-create.sql 21 Jan 2003 13:51:27 -0000 1.2.2.2 +++ openacs-4/packages/lars-blogger/sql/postgresql/lars-blogger-create.sql 2 Mar 2003 22:45:31 -0000 1.2.2.3 @@ -30,8 +30,8 @@ references apm_packages(package_id), title varchar(500), content varchar(32000), - entry_date timestamp, - posted_date timestamp, + entry_date timestamptz, + posted_date timestamptz, 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 - timestamp, -- entry_date + timestamptz, -- 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.2.1 -r1.2.2.2 --- openacs-4/packages/lars-blogger/sql/postgresql/lars-blogger-drop.sql 21 Jan 2003 13:51:27 -0000 1.2.2.1 +++ openacs-4/packages/lars-blogger/sql/postgresql/lars-blogger-drop.sql 2 Mar 2003 22:45:31 -0000 1.2.2.2 @@ -41,7 +41,7 @@ integer, -- package_id varchar, -- title varchar, -- content - timestamp, -- entry_date + timestamptz, -- entry_date char, -- draft_p integer, -- creation_user varchar -- creation_ip Index: openacs-4/packages/lars-blogger/tcl/rss-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/tcl/rss-procs-postgresql.xql,v diff -u -r1.1.2.2 -r1.1.2.3 --- openacs-4/packages/lars-blogger/tcl/rss-procs-postgresql.xql 4 Nov 2002 16:23:12 -0000 1.1.2.2 +++ openacs-4/packages/lars-blogger/tcl/rss-procs-postgresql.xql 2 Mar 2003 22:46:09 -0000 1.1.2.3 @@ -35,7 +35,7 @@ select coalesce (date_part('epoch', - max(posted_date::timestamp with time zone) + max(posted_date::timestamptz) ),0) as last_update from pinds_blog_entries where package_id = :package_id Index: openacs-4/packages/monitoring/sql/postgresql/monitoring-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/monitoring/sql/postgresql/monitoring-create.sql,v diff -u -r1.1 -r1.1.2.1 --- openacs-4/packages/monitoring/sql/postgresql/monitoring-create.sql 19 Aug 2002 23:10:28 -0000 1.1 +++ openacs-4/packages/monitoring/sql/postgresql/monitoring-create.sql 2 Mar 2003 22:46:39 -0000 1.1.2.1 @@ -29,7 +29,7 @@ create table ad_monitoring_top ( top_id integer constraint ad_mntr_top_id_pk primary key, - timestamp timestamp default current_timestamp, + timestamp timestamptz default current_timestamp, -- denormalization: an indexable column for fast time comparisons. timehour numeric(2), -- the three load averages taken from uptime/top @@ -105,7 +105,7 @@ last_percent_estimated integer, --Do we actually want to run this? enabled_p boolean, - last_estimated timestamp + last_estimated timestamptz ); --Sequence for above table Index: openacs-4/packages/news/sql/postgresql/news-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/sql/postgresql/news-create.sql,v diff -u -r1.9 -r1.9.2.1 --- openacs-4/packages/news/sql/postgresql/news-create.sql 17 Jul 2002 20:21:20 -0000 1.9 +++ openacs-4/packages/news/sql/postgresql/news-create.sql 2 Mar 2003 22:48:15 -0000 1.9.2.1 @@ -104,12 +104,12 @@ -- regarding news item -- *** support for dates when items are displayed or archived *** -- unarchived news items have archive_date null - archive_date timestamp, + archive_date timestamptz, -- support for approval approval_user integer constraint cr_news_approval_user_fk references users, - approval_date timestamp, + approval_date timestamptz, approval_ip varchar(50) ); @@ -217,8 +217,8 @@ -- *** PACKAGE NEWS, plsql to create content_item *** -create function news__new (integer,varchar,timestamp,text,varchar,varchar, - varchar,integer,timestamp,integer,timestamp,varchar,varchar, +create function news__new (integer,varchar,timestamptz,text,varchar,varchar, + varchar,integer,timestamptz,integer,timestamptz,varchar,varchar, varchar,integer,boolean) returns integer as ' declare @@ -392,7 +392,7 @@ -- archive a news item -- this only applies to the currently active revision -create function news__archive (integer,timestamp) +create function news__archive (integer,timestamptz) returns integer as ' declare p_item_id alias for $1; @@ -420,8 +420,8 @@ -- approve/unapprove a specific revision -- approving a revision makes it also the active revision -create function news__set_approve(integer,varchar,timestamp, - timestamp,integer,timestamp,varchar,boolean) +create function news__set_approve(integer,varchar,timestamptz, + timestamptz,integer,timestamptz,varchar,boolean) returns integer as ' declare p_revision_id alias for $1; @@ -483,8 +483,8 @@ returns varchar as ' declare p_news_id alias for $1; - v_archive_date timestamp; - v_publish_date timestamp; + v_archive_date timestamptz; + v_publish_date timestamptz; begin -- populate variables select archive_date into v_archive_date @@ -557,8 +557,8 @@ -- -- API for Revision management -- -create function news__revision_new (integer,timestamp,text,varchar,text, - varchar,integer,timestamp,integer,timestamp,varchar,timestamp,varchar, +create function news__revision_new (integer,timestamptz,text,varchar,text, + varchar,integer,timestamptz,integer,timestamptz,varchar,timestamptz,varchar, integer,boolean) returns integer as ' declare Index: openacs-4/packages/news/sql/postgresql/news-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/sql/postgresql/news-drop.sql,v diff -u -r1.3 -r1.3.2.1 --- openacs-4/packages/news/sql/postgresql/news-drop.sql 17 Jul 2002 20:21:20 -0000 1.3 +++ openacs-4/packages/news/sql/postgresql/news-drop.sql 2 Mar 2003 22:48:16 -0000 1.3.2.1 @@ -57,19 +57,19 @@ -- drop package news -drop function news__new (integer,varchar,timestamp,text,varchar,varchar, - varchar,integer,timestamp,integer,timestamp,varchar,varchar, +drop function news__new (integer,varchar,timestamptz,text,varchar,varchar, + varchar,integer,timestamptz,integer,timestamptz,varchar,varchar, varchar,integer,boolean); drop function news__delete (integer); drop function news__make_permanent (integer); -drop function news__archive (integer,timestamp); +drop function news__archive (integer,timestamptz); drop function news__archive (integer); -drop function news__set_approve(integer,varchar,timestamp, - timestamp,integer,timestamp,varchar,boolean); +drop function news__set_approve(integer,varchar,timestamptz, + timestamptz,integer,timestamptz,varchar,boolean); drop function news__status (integer); drop function news__name (integer); -drop function news__revision_new (integer,timestamp,text,varchar,text, - varchar,integer,timestamp,integer,timestamp,varchar,timestamp,varchar, +drop function news__revision_new (integer,timestamptz,text,varchar,text, + varchar,integer,timestamptz,integer,timestamptz,varchar,timestamptz,varchar, integer,boolean); drop function news__revision_set_active (integer); drop function news__revision_delete (integer); Index: openacs-4/packages/notes/sql/postgresql/notes-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notes/sql/postgresql/notes-create.sql,v diff -u -r1.4 -r1.4.4.1 --- openacs-4/packages/notes/sql/postgresql/notes-create.sql 10 Oct 2001 05:16:23 -0000 1.4 +++ openacs-4/packages/notes/sql/postgresql/notes-create.sql 2 Mar 2003 22:48:48 -0000 1.4.4.1 @@ -88,7 +88,7 @@ body varchar(1024) ); -create function note__new (integer,integer,varchar,varchar,varchar,timestamp,integer,varchar,integer) +create function note__new (integer,integer,varchar,varchar,varchar,timestamptz,integer,varchar,integer) returns integer as ' declare p_note_id alias for $1; -- default null Index: openacs-4/packages/notes/sql/postgresql/notes-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notes/sql/postgresql/notes-drop.sql,v diff -u -r1.5 -r1.5.4.1 --- openacs-4/packages/notes/sql/postgresql/notes-drop.sql 10 Oct 2001 05:16:23 -0000 1.5 +++ openacs-4/packages/notes/sql/postgresql/notes-drop.sql 2 Mar 2003 22:48:48 -0000 1.5.4.1 @@ -7,7 +7,7 @@ \i notes-sc-drop.sql --drop functions -drop function note__new (integer,integer,varchar,varchar,varchar,timestamp,integer,varchar,integer); +drop function note__new (integer,integer,varchar,varchar,varchar,timestamptz,integer,varchar,integer); drop function note__delete (integer); drop function note__name (integer); Index: openacs-4/packages/notifications/sql/postgresql/notifications-core-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/sql/postgresql/notifications-core-create.sql,v diff -u -r1.7.2.2 -r1.7.2.3 --- openacs-4/packages/notifications/sql/postgresql/notifications-core-create.sql 1 Feb 2003 00:14:51 -0000 1.7.2.2 +++ openacs-4/packages/notifications/sql/postgresql/notifications-core-create.sql 2 Mar 2003 22:49:26 -0000 1.7.2.3 @@ -159,7 +159,7 @@ constraint notif_object_id_fk references acs_objects(object_id) on delete cascade, - notif_date timestamp + notif_date timestamptz constraint notif_notif_date_nn not null, -- this is to allow responses to notifications @@ -188,7 +188,7 @@ on delete cascade, constraint notif_user_map_pk primary key (notification_id, user_id), - sent_date timestamp + sent_date timestamptz ); -- RI Indexes 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.2.2 -r1.8.2.3 --- openacs-4/packages/notifications/sql/postgresql/notifications-package-create.sql 26 Feb 2003 02:27:58 -0000 1.8.2.2 +++ openacs-4/packages/notifications/sql/postgresql/notifications-package-create.sql 2 Mar 2003 22:49:26 -0000 1.8.2.3 @@ -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 with time zone, integer, varchar, integer) +create function notification_interval__new (integer, varchar, integer, timestamptz, 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 with time zone, integer, varchar, integer) +create function notification_delivery_method__new (integer, integer, varchar, varchar, timestamptz, 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 with time zone,integer,varchar,integer) +create function notification_type__new (integer,integer,varchar,varchar,varchar,timestamptz,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 with time zone,integer,varchar,integer) +create function notification_request__new (integer,varchar,integer,integer,integer,integer,integer,varchar,timestamptz,integer,varchar,integer) returns integer as ' DECLARE p_request_id alias for $1; @@ -226,7 +226,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 with time zone,integer,varchar,text,text,timestamp with time zone,integer,varchar,integer) +create function notification__new(integer,integer,integer,timestamptz,integer,varchar,text,text,timestamptz,integer,varchar,integer) returns integer as ' declare p_notification_id alias for $1; Index: openacs-4/packages/notifications/sql/postgresql/notifications-package-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/sql/postgresql/notifications-package-drop.sql,v diff -u -r1.2 -r1.2.2.1 --- openacs-4/packages/notifications/sql/postgresql/notifications-package-drop.sql 9 Aug 2002 20:51:50 -0000 1.2 +++ openacs-4/packages/notifications/sql/postgresql/notifications-package-drop.sql 2 Mar 2003 22:49:26 -0000 1.2.2.1 @@ -11,28 +11,28 @@ -- The Notification Interval Package -drop function notification_interval__new (integer, varchar, integer, timestamp, integer, varchar, integer); +drop function notification_interval__new (integer, varchar, integer, timestamptz, integer, varchar, integer); drop function notification_interval__delete(integer); -- The notification delivery methods package -drop function notification_delivery_method__new (integer, varchar, varchar, timestamp, integer, varchar, integer); +drop function notification_delivery_method__new (integer, varchar, varchar, timestamptz, integer, varchar, integer); drop function notification_delivery_method__delete(integer); -- Notification Types Package -drop function notification_type__new (integer,varchar,varchar,varchar,timestamp,integer,varchar,integer); +drop function notification_type__new (integer,varchar,varchar,varchar,timestamptz,integer,varchar,integer); drop function notification_type__delete(integer); -- the notification request package -drop function notification_request__new (integer,varchar,integer,integer,integer,integer,varchar,timestamp,integer,varchar,integer); +drop function notification_request__new (integer,varchar,integer,integer,integer,integer,varchar,timestamptz,integer,varchar,integer); drop function notification_request__delete(integer); @@ -41,7 +41,7 @@ -- the notifications package -drop function notification__new(integer,integer,integer,timestamp,integer,varchar,text,text,timestamp,integer,varchar,integer); +drop function notification__new(integer,integer,integer,timestamptz,integer,varchar,text,text,timestamptz,integer,varchar,integer); drop function notification__delete(integer); Index: openacs-4/packages/notifications/sql/postgresql/notifications-replies-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/sql/postgresql/notifications-replies-create.sql,v diff -u -r1.2.2.1 -r1.2.2.2 --- openacs-4/packages/notifications/sql/postgresql/notifications-replies-create.sql 1 Feb 2003 00:14:51 -0000 1.2.2.1 +++ openacs-4/packages/notifications/sql/postgresql/notifications-replies-create.sql 2 Mar 2003 22:49:26 -0000 1.2.2.2 @@ -24,7 +24,7 @@ constraint notif_repl_from_fk references users(user_id), subject varchar(100), content text, - reply_date timestamp + reply_date timestamptz ); -- RI indexes 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.2.1 -r1.3.2.2 --- openacs-4/packages/notifications/sql/postgresql/notifications-replies-package-create.sql 21 Jan 2003 13:51:40 -0000 1.3.2.1 +++ openacs-4/packages/notifications/sql/postgresql/notifications-replies-package-create.sql 2 Mar 2003 22:49:26 -0000 1.3.2.2 @@ -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 with time zone,timestamp with time zone,integer,varchar,integer) +create function notification_reply__new (integer,integer,integer,integer,varchar,text,timestamptz,timestamptz,integer,varchar,integer) returns integer as ' DECLARE p_reply_id alias for $1; Index: openacs-4/packages/payflowpro/sql/postgresql/payflowpro-sc-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/payflowpro/sql/postgresql/Attic/payflowpro-sc-create.sql,v diff -u -r1.1 -r1.1.2.1 --- openacs-4/packages/payflowpro/sql/postgresql/payflowpro-sc-create.sql 5 Jun 2002 02:32:58 -0000 1.1 +++ openacs-4/packages/payflowpro/sql/postgresql/payflowpro-sc-create.sql 2 Mar 2003 22:50:01 -0000 1.1.2.1 @@ -68,7 +68,7 @@ create table payflowpro_result_log ( transaction_id varchar(20), txn_attempted_type varchar(25), - txn_attempted_time timestamp, + txn_attempted_time timestamptz, txn_returned_type varchar(25), errmsg varchar(200), auth_code varchar(25), Index: openacs-4/packages/ref-timezones/sql/postgresql/ref-timezones-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ref-timezones/sql/postgresql/ref-timezones-create.sql,v diff -u -r1.5.4.1 -r1.5.4.2 --- openacs-4/packages/ref-timezones/sql/postgresql/ref-timezones-create.sql 18 Feb 2003 10:02:55 -0000 1.5.4.1 +++ openacs-4/packages/ref-timezones/sql/postgresql/ref-timezones-create.sql 2 Mar 2003 22:51:16 -0000 1.5.4.2 @@ -22,22 +22,22 @@ -- PG stores all dates shifted to UTC and does all computations in Julian -- dates. This package provides some very simple utilities: --- timezone__convert_to_utc(timezone, input_string) returns timestamp +-- timezone__convert_to_utc(timezone, input_string) returns timestamptz -- Takes an input string (which must NOT have any explicit timezone --- information embedded) and converts it to a timestamp, shifting it +-- information embedded) and converts it to a timestamptz, shifting it -- to UTC using the timezone information. In other words, input_string --- is a date/time local to the given timezone while the returned timestamp +-- is a date/time local to the given timezone while the returned timestamptz -- is the same date/time shifted to UTC. --- timezone__get_date(timezone, timestamp, format string) returns varchar --- Converts the timestamp to a pretty date in the given timezone using "to_char" +-- timezone__get_date(timezone, timestamptz, format string) returns varchar +-- Converts the timestamptz to a pretty date in the given timezone using "to_char" -- and appends the timezone abbreviation. --- timezone__get_offset(timezone, timestamp) returns interval +-- timezone__get_offset(timezone, timestamptz) returns interval -- Returns a PostgreSQL interval (which can be added or substracted from -- a UTC timestamp) for the timestamp in the given timezone. --- timezone__get_rawoffset(timezone, timestamp) returns interval +-- timezone__get_rawoffset(timezone, timestamptz) returns interval -- Returns the raw (i.e. not adjusted for daylight savings time) offset -- for the timestamp in the timezone (those reading the code for the first -- time may think these definitions are backwards, but they're not) @@ -46,6 +46,15 @@ -- might make more sense but the Oracle version assumes UTC so we'll use that -- for now... +-- DRB: Additional note ... + +-- As of version 7.3, PostgreSQL's default timestamp type no longer includes timezone +-- information. If we were starting from scratch, these functions could be simplified +-- but ... we have existing OpenACS 4.x installations running PG 7.2. pg_dump dumps +-- the old timestamp type as timestamp with time zone explicitly, and the values include +-- timezone information, so we're pretty much stuck using timestamptz indefinitely it +-- appears. + create sequence timezone_seq; -- Primary table for storing timezone names and standard offsets @@ -81,11 +90,11 @@ -- abbreviation for local time, e.g. EST, EDT abbrev varchar(10) not null, -- UTC start/end time of this rule - utc_start timestamp not null, - utc_end timestamp not null, + utc_start timestamptz not null, + utc_end timestamptz not null, -- local start/end time of this rule - local_start timestamp not null, - local_end timestamp not null, + local_start timestamptz not null, + local_end timestamptz not null, -- GMT offset in seconds gmt_offset text not null, -- is Daylight Savings Time in effect for this rule? @@ -99,11 +108,11 @@ -- TimeZone package ------------------------------------------------------------------------------- -create function rdbms_date(varchar) returns timestamp as ' +create function rdbms_date(varchar) returns timestamptz as ' declare p_raw_date alias for $1; begin - return "timestamp" (p_raw_date || ''+00''); + return "timestamptz" (p_raw_date || ''+00''); end;' language 'plpgsql'; create function timezone__new (varchar, varchar) returns integer as ' @@ -160,29 +169,29 @@ case isdst_p isdst_p when 0 then ''f'' else ''t''end; end;' language 'plpgsql'; -create function timezone__convert_to_utc (integer, varchar) returns timestamp as ' +create function timezone__convert_to_utc (integer, varchar) returns timestamptz as ' declare p_tz_id alias for $1; p_local_varchar alias for $2; - v_base_time timestamp; + v_base_time timestamptz; foo varchar; begin - select "timestamp" (p_local_varchar || substr(gmt_offset,1,5)) into v_base_time + select "timestamptz" (p_local_varchar || substr(gmt_offset,1,5)) into v_base_time from timezones where tz_id = p_tz_id; if not found then - return "timestamp" (p_local_varchar || ''+00''); + return "timestamptz" (p_local_varchar || ''+00''); end if; - return "timestamp" (p_local_varchar || ''+00'') - "interval" (gmt_offset || ''seconds'') + return "timestamptz" (p_local_varchar || ''+00'') - "interval" (gmt_offset || ''seconds'') from timezone_rules where tz_id = p_tz_id and v_base_time between utc_start and utc_end; end;' language 'plpgsql'; -create function timezone__get_offset (integer, timestamp) returns interval as ' +create function timezone__get_offset (integer, timestamptz) returns interval as ' declare p_tz_id alias for $1; p_time alias for $2; @@ -197,7 +206,7 @@ return "interval" (v_offset || ''seconds''); end;' language 'plpgsql'; -create function timezone__get_rawoffset (integer, timestamp) returns interval as ' +create function timezone__get_rawoffset (integer, timestamptz) returns interval as ' declare p_tz_id alias for $1; p_time alias for $2; @@ -217,7 +226,7 @@ return v_offset; end;' language 'plpgsql'; -create function timezone__get_abbrev (integer, timestamp) returns varchar as ' +create function timezone__get_abbrev (integer, timestamptz) returns varchar as ' declare p_tz_id alias for $1; p_time for $2; @@ -234,13 +243,13 @@ -- Returns a formatted date with timezone info appended -create function timezone__get_date (integer, timestamp, varchar, boolean) returns varchar as ' +create function timezone__get_date (integer, timestamptz, varchar, boolean) returns varchar as ' declare p_tz_id alias for $1; p_timestamp alias for $2; p_format alias for $3; p_append_timezone_p alias for $4; - v_timestamp timestamp; + v_timestamp timestamptz; v_abbrev text; v_date text; begin @@ -269,7 +278,7 @@ end;' language 'plpgsql'; -- Returns 't' if timezone is currently using DST -create function timezone__isdst_p (integer, timestamp) returns boolean as ' +create function timezone__isdst_p (integer, timestamptz) returns boolean as ' declare p_tz_id alias for $1; p_time alias for $2; @@ -284,7 +293,7 @@ return v_isdst_p; end;' language 'plpgsql'; -create function timezone__get_zone_offset (integer, integer, timestamp) returns interval as ' +create function timezone__get_zone_offset (integer, integer, timestamptz) returns interval as ' declare p_tz_this alias for $1; p_tz_other alias for $2; Index: openacs-4/packages/ref-timezones/sql/postgresql/ref-timezones-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ref-timezones/sql/postgresql/ref-timezones-drop.sql,v diff -u -r1.3 -r1.3.4.1 --- openacs-4/packages/ref-timezones/sql/postgresql/ref-timezones-drop.sql 26 Oct 2001 18:43:10 -0000 1.3 +++ openacs-4/packages/ref-timezones/sql/postgresql/ref-timezones-drop.sql 2 Mar 2003 22:51:16 -0000 1.3.4.1 @@ -29,9 +29,9 @@ drop function timezone__get_id (varchar); drop function timezone__add_rule (varchar, varchar, integer, varchar, varchar, varchar, varchar, varchar); drop function timezone__convert_to_utc (integer, varchar); -drop function timezone__get_offset (integer, timestamp); -drop function timezone__get_rawoffset (integer, timestamp); -drop function timezone__get_abbrev (integer, timestamp); -drop function timezone__get_date (integer, timestamp, varchar, boolean); -drop function timezone__isdst_p (integer, timestamp); -drop function timezone__get_zone_offset (integer, integer, timestamp); +drop function timezone__get_offset (integer, timestamptz); +drop function timezone__get_rawoffset (integer, timestamptz); +drop function timezone__get_abbrev (integer, timestamptz); +drop function timezone__get_date (integer, timestamptz, varchar, boolean); +drop function timezone__isdst_p (integer, timestamptz); +drop function timezone__get_zone_offset (integer, integer, timestamptz); 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.4.1 -r1.7.4.2 --- openacs-4/packages/rss-support/sql/postgresql/rss-generation-create.sql 21 Jan 2003 13:51:55 -0000 1.7.4.1 +++ openacs-4/packages/rss-support/sql/postgresql/rss-generation-create.sql 2 Mar 2003 22:51:46 -0000 1.7.4.2 @@ -114,7 +114,7 @@ timeout integer constraint rss_gen_subscrs_timeout_nn not null, - lastbuild timestamp, + lastbuild timestamptz, last_ttb integer, channel_title varchar(200), channel_link varchar(1000), @@ -164,7 +164,7 @@ Used for display purposes. '; -create function rss_gen_subscr__new (integer,integer,varchar,integer,timestamp with time zone,varchar,timestamp with time zone,integer,varchar,integer) +create function rss_gen_subscr__new (integer,integer,varchar,integer,timestamptz,varchar,timestamptz,integer,varchar,integer) returns integer as ' declare p_subscr_id alias for $1; Index: openacs-4/packages/rss-support/sql/postgresql/rss-generation-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/sql/postgresql/rss-generation-drop.sql,v diff -u -r1.3 -r1.3.4.1 --- openacs-4/packages/rss-support/sql/postgresql/rss-generation-drop.sql 19 Nov 2001 04:02:28 -0000 1.3 +++ openacs-4/packages/rss-support/sql/postgresql/rss-generation-drop.sql 2 Mar 2003 22:51:46 -0000 1.3.4.1 @@ -16,6 +16,6 @@ select acs_object_type__drop_type('rss_gen_subscr','f'); drop table rss_gen_subscrs; -drop function rss_gen_subscr__new (integer,integer,varchar,integer,timestamp,varchar,timestamp,integer,varchar,integer); +drop function rss_gen_subscr__new (integer,integer,varchar,integer,timestamptz,varchar,timestamptz,integer,varchar,integer); drop function rss_gen_subscr__name (integer); drop function rss_gen_subscr__delete (integer); 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.2.2.2 -r1.2.2.3 --- openacs-4/packages/search/sql/postgresql/search-packages-create.sql 21 Jan 2003 13:52:10 -0000 1.2.2.2 +++ openacs-4/packages/search/sql/postgresql/search-packages-create.sql 2 Mar 2003 22:52:14 -0000 1.2.2.3 @@ -21,7 +21,7 @@ end;' language 'plpgsql'; -create function search_observer__dequeue(integer,timestamp with time zone,varchar) +create function search_observer__dequeue(integer,timestamptz,varchar) returns integer as ' declare p_object_id alias for $1; Index: openacs-4/packages/search/sql/postgresql/search-packages-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/search/sql/postgresql/search-packages-drop.sql,v diff -u -r1.1 -r1.1.4.1 --- openacs-4/packages/search/sql/postgresql/search-packages-drop.sql 2 Sep 2001 18:11:39 -0000 1.1 +++ openacs-4/packages/search/sql/postgresql/search-packages-drop.sql 2 Mar 2003 22:52:14 -0000 1.1.4.1 @@ -1,2 +1,2 @@ -drop function search_observer__dequeue(integer,timestamp,varchar); +drop function search_observer__dequeue(integer,timestamptz,varchar); drop function search_observer__enqueue(integer,varchar); Index: openacs-4/packages/search/sql/postgresql/search-tables-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/search/sql/postgresql/search-tables-create.sql,v diff -u -r1.5 -r1.5.2.1 --- openacs-4/packages/search/sql/postgresql/search-tables-create.sql 2 Jul 2002 01:52:39 -0000 1.5 +++ openacs-4/packages/search/sql/postgresql/search-tables-create.sql 2 Mar 2003 22:52:14 -0000 1.5.2.1 @@ -1,6 +1,6 @@ create table search_observer_queue ( object_id integer, - event_date timestamp default now(), + event_date timestamptz default current_timestamp, event varchar(6) constraint search_observer_queue_event_ck check (event in ('INSERT','DELETE','UPDATE'))