Index: openacs-4/contrib/obsolete-packages/mp3-jukebox/mp3-jukebox.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/mp3-jukebox/mp3-jukebox.info,v diff -u -N -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/mp3-jukebox/mp3-jukebox.info 17 Oct 2001 19:44:08 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/mp3-jukebox/mp3-jukebox.info 16 Jan 2003 13:50:45 -0000 1.2 @@ -39,7 +39,6 @@ - @@ -115,7 +114,6 @@ - Index: openacs-4/contrib/obsolete-packages/photo-album-lite/photo-album-lite.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/photo-album-lite/photo-album-lite.info,v diff -u -N -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/photo-album-lite/photo-album-lite.info 20 Apr 2001 20:51:11 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/photo-album-lite/photo-album-lite.info 16 Jan 2003 13:54:40 -0000 1.2 @@ -9,7 +9,6 @@ oracle - postgresql Andrew Grumet A full-featured, easy-to-use photo storage and display application. Index: openacs-4/packages/forums/forums.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/forums.info,v diff -u -N -r1.15 -r1.16 --- openacs-4/packages/forums/forums.info 7 Jan 2003 18:59:07 -0000 1.15 +++ openacs-4/packages/forums/forums.info 16 Jan 2003 13:48:21 -0000 1.16 @@ -38,6 +38,7 @@ + @@ -53,6 +54,7 @@ + @@ -102,8 +104,6 @@ - - Index: openacs-4/packages/forums/sql/oracle/forums-messages-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/sql/oracle/forums-messages-create.sql,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/forums/sql/oracle/forums-messages-create.sql 30 Nov 2002 17:34:49 -0000 1.4 +++ openacs-4/packages/forums/sql/oracle/forums-messages-create.sql 16 Jan 2003 13:48:49 -0000 1.5 @@ -55,6 +55,10 @@ unique (tree_sortkey, forum_id) ); +-- We do a some big queries on forum_id (thread count on index.tcl) so create a second index +-- ordered so it's useful for them +create unique index forums_mess_forum_sk_un on forums_messages(forum_id, tree_sortkey); + create view forums_messages_approved as select * from forums_messages Index: openacs-4/packages/forums/sql/oracle/upgrade-0.2d-0.3d.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/sql/oracle/Attic/upgrade-0.2d-0.3d.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/forums/sql/oracle/upgrade-0.2d-0.3d.sql 16 Jan 2003 13:48:49 -0000 1.2 @@ -0,0 +1,6 @@ +-- forums/sql/oracle/upgrade-0.2d-0.3d.sql +-- +-- Changes for scalability davis@xarg.net + +create unique index forums_mess_forum_sk_un on forums_messages(forum_id, tree_sortkey); + 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 -N -r1.6 -r1.7 --- openacs-4/packages/forums/sql/postgresql/forums-messages-create.sql 30 Nov 2002 17:35:03 -0000 1.6 +++ openacs-4/packages/forums/sql/postgresql/forums-messages-create.sql 16 Jan 2003 13:49:10 -0000 1.7 @@ -55,6 +55,10 @@ unique (tree_sortkey, forum_id) ); +-- We do a some big queries on forum_id (thread count on index.tcl) so create a second index +-- ordered so it's useful for them +create unique index forums_mess_forum_sk_un on forums_messages(forum_id, tree_sortkey); + create view forums_messages_approved as select * 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 -N -r1.10 -r1.11 --- openacs-4/packages/forums/sql/postgresql/forums-messages-package-create.sql 21 Dec 2002 22:28:17 -0000 1.10 +++ openacs-4/packages/forums/sql/postgresql/forums-messages-package-create.sql 16 Jan 2003 13:49:10 -0000 1.11 @@ -105,7 +105,7 @@ return v_message_id; end; -' language 'plpgsql'; +' language 'plpgsql' with(isstrict,iscachable); select define_function_args ('forums_message__thread_open', 'message_id'); Index: openacs-4/packages/forums/sql/postgresql/upgrade-0.2d-0.3d.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/sql/postgresql/Attic/upgrade-0.2d-0.3d.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/forums/sql/postgresql/upgrade-0.2d-0.3d.sql 16 Jan 2003 13:49:10 -0000 1.2 @@ -0,0 +1,28 @@ +-- forums/sql/postgresql/upgrade-0.2d-0.3d.sql +-- +-- Changes for scalability davis@xarg.net + +create unique index forums_mess_forum_sk_un on forums_messages(forum_id, tree_sortkey); + +create or replace function forums_message__root_message_id (integer) +returns integer as ' +declare + p_message_id alias for $1; + v_message_id forums_messages.message_id%TYPE; + v_forum_id forums_messages.forum_id%TYPE; + v_sortkey forums_messages.tree_sortkey%TYPE; +begin + select forum_id, tree_sortkey + into v_forum_id, v_sortkey + from forums_messages + where message_id = p_message_id; + + select message_id + into v_message_id + from forums_messages + where forum_id = v_forum_id + and tree_sortkey = tree_ancestor_key(v_sortkey, 1); + + return v_message_id; +end; +' language 'plpgsql' with(isstrict,iscachable); Index: openacs-4/packages/forums/www/forum-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/forum-view.tcl,v diff -u -N -r1.14 -r1.15 --- openacs-4/packages/forums/www/forum-view.tcl 10 Jan 2003 15:13:11 -0000 1.14 +++ openacs-4/packages/forums/www/forum-view.tcl 16 Jan 2003 13:49:30 -0000 1.15 @@ -69,6 +69,8 @@ db_multirow -extend { last_child_post_pretty } messages $query {} { set last_child_post_pretty [lc_time_fmt $last_child_post_ansi "%x %X"] + set subject [ad_quotehtml $subject] + set user_name [ad_quotehtml $user_name] } set notification_chunk [notification::display::request_widget \ Index: openacs-4/packages/forums/www/index-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/Attic/index-oracle.xql,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/forums/www/index-oracle.xql 30 Nov 2002 17:35:39 -0000 1.4 +++ openacs-4/packages/forums/www/index-oracle.xql 16 Jan 2003 13:49:30 -0000 1.5 @@ -9,7 +9,7 @@ (select count(*) from forums_messages where forums_messages.forum_id = forums_forums_enabled.forum_id - and 1 = tree.tree_level(forums_messages.tree_sortkey)) as n_threads, + and parent_id is null) as n_threads, to_char(last_post, 'YYYY-MM-DD HH24:MI:SS') as last_post_ansi, case when last_post > (sysdate - 1) then 't' else 'f' end as new_p from forums_forums_enabled 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 -N -r1.5 -r1.6 --- openacs-4/packages/forums/www/index-postgresql.xql 21 Dec 2002 22:28:07 -0000 1.5 +++ openacs-4/packages/forums/www/index-postgresql.xql 16 Jan 2003 13:49:30 -0000 1.6 @@ -9,7 +9,7 @@ (select count(*) from forums_messages where forums_messages.forum_id = forums_forums_enabled.forum_id - and 1 = tree_level(forums_messages.tree_sortkey)) as n_threads, + and parent_id is null) as n_threads, to_char(last_post, 'YYYY-MM-DD HH24:MI:SS') as last_post_ansi, case when last_post > (now() - interval '1 day') then 't' else 'f' end as new_p from forums_forums_enabled Index: openacs-4/packages/forums/www/message-view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/message-view.adp,v diff -u -N -r1.12 -r1.13 --- openacs-4/packages/forums/www/message-view.adp 10 Jan 2003 14:12:03 -0000 1.12 +++ openacs-4/packages/forums/www/message-view.adp 16 Jan 2003 13:49:30 -0000 1.13 @@ -36,8 +36,8 @@ - <% set width [expr 100 - $responses(tree_level)] %> - + <% set width [expr 100 - [expr $responses(tree_level) - 1] * 3] %> + Index: openacs-4/packages/forums/www/search.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/search.tcl,v diff -u -N -r1.8 -r1.9 --- openacs-4/packages/forums/www/search.tcl 4 Dec 2002 09:46:40 -0000 1.8 +++ openacs-4/packages/forums/www/search.tcl 16 Jan 2003 13:49:30 -0000 1.9 @@ -39,6 +39,7 @@ db_multirow messages $query {} { set posting_date_pretty [lc_time_fmt $posting_date_ansi "%x %X"] + set subject [ad_quotehtml $subject] } } else { Index: openacs-4/packages/general-comments/general-comments.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/general-comments.info,v diff -u -N -r1.6 -r1.7 --- openacs-4/packages/general-comments/general-comments.info 23 Sep 2002 23:32:19 -0000 1.6 +++ openacs-4/packages/general-comments/general-comments.info 16 Jan 2003 13:49:51 -0000 1.7 @@ -44,7 +44,6 @@ - @@ -97,7 +96,6 @@ - Index: openacs-4/packages/lars-blogger/lars-blogger.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/lars-blogger.info,v diff -u -N -r1.11 -r1.12 --- openacs-4/packages/lars-blogger/lars-blogger.info 4 Jan 2003 09:36:17 -0000 1.11 +++ openacs-4/packages/lars-blogger/lars-blogger.info 16 Jan 2003 13:50:19 -0000 1.12 @@ -70,6 +70,8 @@ + + Index: openacs-4/packages/news/tcl/news-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/tcl/news-procs.tcl,v diff -u -N -r1.6 -r1.7 --- openacs-4/packages/news/tcl/news-procs.tcl 14 Jan 2003 17:35:19 -0000 1.6 +++ openacs-4/packages/news/tcl/news-procs.tcl 16 Jan 2003 13:51:05 -0000 1.7 @@ -108,7 +108,7 @@ @author Robert Locke } { - set package_id [db_string get_package_id {*SQL*} + set package_id [db_string get_package_id {*SQL*}] set url_stub [news_util_get_url news] db_1row get_item_id " Index: openacs-4/packages/news/tcl/news-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/tcl/news-procs.xql,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/news/tcl/news-procs.xql 14 Jan 2003 17:35:19 -0000 1.2 +++ openacs-4/packages/news/tcl/news-procs.xql 16 Jan 2003 13:51:05 -0000 1.3 @@ -19,4 +19,5 @@ where news_id=:object_id + Index: openacs-4/packages/notes/www/add-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notes/www/add-edit.tcl,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/notes/www/add-edit.tcl 5 Sep 2002 11:04:56 -0000 1.5 +++ openacs-4/packages/notes/www/add-edit.tcl 16 Jan 2003 13:51:28 -0000 1.6 @@ -1,28 +1,25 @@ # packages/notes/www/add-edit.tcl - ad_page_contract { @author rhs@mit.edu @creation-date 2000-10-23 @cvs-id $Id$ } { - note_id:integer,notnull,optional - {title:html,notnull,optional ""} - {body ""} + note_id:integer,notnull,optional } -properties { - context:onevalue + context:onevalue } set package_id [ad_conn package_id] if {[info exists note_id]} { - ad_require_permission $note_id write + ad_require_permission $note_id write - set context [list "Edit Note"] + set context [list "Edit Note"] } else { - ad_require_permission $package_id create - - set context [list "New Note"] + ad_require_permission $package_id create + + set context [list "New Note"] } template::form create new_note @@ -39,6 +36,9 @@ from notes where note_id = :note_id } +} else { + set title {} + set body {} } template::element create new_note title \ @@ -54,7 +54,10 @@ -html { rows 10 cols 40 wrap soft } \ -value $body + if [template::form is_valid new_note] { + form get_values new_note title body + set user_id [ad_conn user_id] set peeraddr [ad_conn peeraddr] @@ -85,4 +88,6 @@ ad_returnredirect "./" } +set title [ad_quotehtml $title] + ad_return_template Index: openacs-4/packages/notes/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notes/www/index.adp,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/notes/www/index.adp 5 Sep 2002 11:04:56 -0000 1.5 +++ openacs-4/packages/notes/www/index.adp 16 Jan 2003 13:51:28 -0000 1.6 @@ -29,12 +29,7 @@
- +
  - <% - regsub -all "\n" $notes(body) "
" body - adp_puts $body - %> -
@notes.body@
Index: openacs-4/packages/notes/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notes/www/index.tcl,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/notes/www/index.tcl 5 Sep 2002 11:04:56 -0000 1.2 +++ openacs-4/packages/notes/www/index.tcl 16 Jan 2003 13:51:28 -0000 1.3 @@ -39,6 +39,10 @@ and o.context_id = :package_id and acs_permission.permission_p(note_id, :user_id, 'read') = 't' order by creation_date +} { + set title [ad_quotehtml $title] + set body [ad_text_to_html $body] } + ad_return_template Index: openacs-4/packages/notes/www/view-one.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notes/www/view-one.tcl,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/notes/www/view-one.tcl 5 Sep 2002 11:04:56 -0000 1.2 +++ openacs-4/packages/notes/www/view-one.tcl 16 Jan 2003 13:51:28 -0000 1.3 @@ -17,5 +17,7 @@ where note_id = :note_id } +set title [ad_quotehtml $title] +set body [ad_text_to_html $body] ad_return_template Index: openacs-4/packages/notifications/notifications.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/notifications.info,v diff -u -N -r1.12 -r1.13 --- openacs-4/packages/notifications/notifications.info 30 Nov 2002 17:40:04 -0000 1.12 +++ openacs-4/packages/notifications/notifications.info 16 Jan 2003 13:51:59 -0000 1.13 @@ -7,7 +7,7 @@ f t - + oracle postgresql @@ -16,7 +16,7 @@ Notification Management 2002-08-19 - + @@ -33,7 +33,6 @@ - @@ -46,6 +45,7 @@ + @@ -74,22 +74,28 @@ - - - - - - + + + + + + + + + + + - - + + + Index: openacs-4/packages/notifications/sql/oracle/notifications-core-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/sql/oracle/notifications-core-create.sql,v diff -u -N -r1.8 -r1.9 --- openacs-4/packages/notifications/sql/oracle/notifications-core-create.sql 20 Sep 2002 21:18:58 -0000 1.8 +++ openacs-4/packages/notifications/sql/oracle/notifications-core-create.sql 16 Jan 2003 13:52:21 -0000 1.9 @@ -120,6 +120,8 @@ check (format in ('text', 'html')) ); +create index notification_requests_t_o_idx on notification_requests(type_id, object_id); + -- preferences -- -- for preferences that apply to each request, we're using the 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 -N -r1.7 -r1.8 --- openacs-4/packages/notifications/sql/postgresql/notifications-core-create.sql 20 Sep 2002 21:18:59 -0000 1.7 +++ openacs-4/packages/notifications/sql/postgresql/notifications-core-create.sql 16 Jan 2003 13:52:42 -0000 1.8 @@ -53,10 +53,10 @@ references acs_objects (object_id) constraint notif_type_type_id_pk primary key, - sc_impl_id integer not null + sc_impl_id integer not null constraint notif_deliv_meth_impl_id_fk references acs_sc_impls(impl_id), - short_name varchar(100) + short_name varchar(100) constraint notif_type_short_name_nn not null constraint notif_type_short_name_un @@ -136,6 +136,8 @@ check (format in ('text', 'html')) ); +create index notification_requests_t_o_idx on notification_requests(type_id, object_id); + -- preferences -- -- for preferences that apply to each request, we're using the Index: openacs-4/packages/notifications/tcl/notification-display-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/notification-display-procs.tcl,v diff -u -N -r1.7 -r1.8 --- openacs-4/packages/notifications/tcl/notification-display-procs.tcl 4 Jan 2003 09:30:31 -0000 1.7 +++ openacs-4/packages/notifications/tcl/notification-display-procs.tcl 16 Jan 2003 13:53:10 -0000 1.8 @@ -20,7 +20,8 @@ {-url:required} {-user_id ""} } { - Produce a widget for requesting notifications of a given type. + Produce a widget for requesting notifications of a given type. If the notifications package has not been + mounted then return the empty string. } { # Check that we're mounted if { [empty_string_p [apm_package_url_from_key [notification::package_key]]] } { @@ -46,6 +47,10 @@ set sub_chunk "[_ notifications.lt_You_may_a_hrefsub_url]" } + if { [empty_string_p $sub_url] } { + return "" + } + return "\[ $sub_chunk \]" } @@ -56,11 +61,17 @@ {-user_id:required} {-pretty_name} } { - Returns the URL that allows one to subscribe to a notification type on a particular object. + Returns the URL that allows one to subscribe to a notification type on a particular object. If the + notifications package has not been mounted return the empty string. } { set type_id [notification::type::get_type_id -short_name $type] set root_path [apm_package_url_from_key [notification::package_key]] + + if { [empty_string_p $root_path] } { + return "" + } + set subscribe_url "${root_path}request-new?[export_vars { type_id user_id object_id pretty_name {return_url $url} }]" return $subscribe_url @@ -73,6 +84,11 @@ Returns the URL that allows one to unsubscribe from a particular request. } { set root_path [apm_package_url_from_key [notification::package_key]] + + if { [empty_string_p $root_path] } { + return "" + } + set unsubscribe_url "${root_path}request-delete?request_id=$request_id&return_url=[ns_urlencode $url]" return $unsubscribe_url Index: openacs-4/packages/notifications/tcl/notification-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/notification-procs.tcl,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/notifications/tcl/notification-procs.tcl 30 Nov 2002 17:40:18 -0000 1.4 +++ openacs-4/packages/notifications/tcl/notification-procs.tcl 16 Jan 2003 13:53:10 -0000 1.5 @@ -78,16 +78,16 @@ {-notif_text ""} {-notif_html ""} } { - create a new notification + create a new notification if any notification requests exist for the object and type } { - # Set up the vars - set extra_vars [ns_set create] - oacs_util::vars_to_ns_set -ns_set $extra_vars -var_list {notification_id type_id object_id response_id notif_subject notif_text notif_html} + if { [notification::request::request_exists -object_id $object_id -type_id $type_id] } { + # Set up the vars + set extra_vars [ns_set create] + oacs_util::vars_to_ns_set -ns_set $extra_vars -var_list {notification_id type_id object_id response_id notif_subject notif_text notif_html} - # Create the request - set notification_id [package_instantiate_object -extra_vars $extra_vars notification] - - return $notification_id + # Create the request + package_instantiate_object -extra_vars $extra_vars notification + } } ad_proc -public delete { Index: openacs-4/packages/notifications/tcl/notification-request-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/notification-request-procs.tcl,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/notifications/tcl/notification-request-procs.tcl 30 Nov 2002 17:40:18 -0000 1.4 +++ openacs-4/packages/notifications/tcl/notification-request-procs.tcl 16 Jan 2003 13:53:10 -0000 1.5 @@ -52,6 +52,15 @@ return [db_string select_request_id {} -default {}] } + ad_proc -public request_exists { + {-type_id:required} + {-object_id:required} + } { + returns true if at least one request exists for this object and type + } { + return [expr { [db_string request_count {}] > 0 }] + } + ad_proc -public delete { {-request_id:required} } { Index: openacs-4/packages/notifications/tcl/notification-request-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/notification-request-procs.xql,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/notifications/tcl/notification-request-procs.xql 3 Jun 2002 22:27:00 -0000 1.3 +++ openacs-4/packages/notifications/tcl/notification-request-procs.xql 16 Jan 2003 13:53:10 -0000 1.4 @@ -12,4 +12,13 @@ + + + select count(*) + from notification_requests + where type_id = :type_id + and object_id = :object_id + + + Index: openacs-4/packages/notifications/tcl/reply-sweep-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/reply-sweep-init.tcl,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/notifications/tcl/reply-sweep-init.tcl 10 Sep 2002 22:23:11 -0000 1.2 +++ openacs-4/packages/notifications/tcl/reply-sweep-init.tcl 16 Jan 2003 13:53:10 -0000 1.3 @@ -8,6 +8,13 @@ } -ad_schedule_proc -thread t 60 notification::reply::sweep::scan_all_replies -ad_schedule_proc -thread t 60 notification::reply::sweep::process_all_replies +# Roberto Mello (12/2002): Added parameter and check for qmail queue scanning +set scan_replies_p [parameter::get \ + -package_id [apm_package_id_from_key notifications] \ + -parameter EmailQmailQueueScanP -default 0] + +if { $scan_replies_p == 1 } { + ad_schedule_proc -thread t 60 notification::reply::sweep::scan_all_replies + ad_schedule_proc -thread t 60 notification::reply::sweep::process_all_replies +} Index: openacs-4/packages/notifications/tcl/sweep-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/sweep-init.tcl,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/notifications/tcl/sweep-init.tcl 10 Sep 2002 22:23:11 -0000 1.4 +++ openacs-4/packages/notifications/tcl/sweep-init.tcl 16 Jan 2003 13:53:10 -0000 1.5 @@ -8,10 +8,10 @@ } -# Hack for now to test immediate deliveries -# FIXME -ad_schedule_proc -thread t 60 notification::sweep::cleanup_notifications +# DRB: The cleanup sweep interval should be made a parameter someday ... +ad_schedule_proc -thread t 900 notification::sweep::cleanup_notifications + foreach interval [notification::get_all_intervals] { set n_seconds [lindex $interval 2] if {$n_seconds > 0} { @@ -20,7 +20,15 @@ set batched_p 0 } - if {$n_seconds > 0} { + # Send weekly and daily notifications at defined times rather than a week after + # the server was started up, etc etc. Hourly, instant, and exotic custom + # intervals will run relative to the server startup time. + + if { $n_seconds == 24 * 60 * 60 } { + ad_schedule_proc -thread t -schedule_proc ns_schedule_daily [list 0 0] notification::sweep::sweep_notifications -interval_id [lindex $interval 1] -batched_p $batched_p + } elseif { $n_seconds == 7 * 24 * 60 * 60 } { + ad_schedule_proc -thread t -schedule_proc ns_schedule_weekly [list 0 0 0] notification::sweep::sweep_notifications -interval_id [lindex $interval 1] -batched_p $batched_p + } elseif {$n_seconds > 0} { ad_schedule_proc -thread t $n_seconds notification::sweep::sweep_notifications -interval_id [lindex $interval 1] -batched_p $batched_p } else { ad_schedule_proc -thread t 60 notification::sweep::sweep_notifications -interval_id [lindex $interval 1] -batched_p $batched_p Index: openacs-4/packages/notifications/tcl/sweep-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/sweep-procs-oracle.xql,v diff -u -N -r1.9 -r1.10 --- openacs-4/packages/notifications/tcl/sweep-procs-oracle.xql 20 Sep 2002 21:19:00 -0000 1.9 +++ openacs-4/packages/notifications/tcl/sweep-procs-oracle.xql 16 Jan 2003 13:53:10 -0000 1.10 @@ -5,41 +5,44 @@ - select notification_id + select notifications.notification_id from notifications - where sysdate - notif_date > 2 - and not exists (select notifications.notification_id - from notifications, - notification_requests, - notification_user_map - where notifications.type_id = notification_requests.type_id - and notifications.object_id = notification_requests.object_id - and notifications.notification_id = notification_user_map.notification_id(+) - and sent_date is null) + minus + select nnr.notification_id + from (select notification_id, user_id + from notifications, notification_requests + where notifications.type_id = notification_requests.type_id + and notifications.object_id = notification_requests.object_id) nnr, + notification_user_map + where nnr.notification_id = notification_user_map.notification_id(+) + and nnr.user_id = notification_user_map.user_id(+) + and notification_user_map.sent_date is null - select notifications.notification_id, - notif_subject, - notif_text, - notif_html, - notification_requests.user_id, - notification_requests.type_id, - notification_requests.delivery_method_id, - notifications.response_id - from notifications, - notification_requests, - notification_user_map - where notifications.type_id = notification_requests.type_id - and interval_id = :interval_id - and notifications.object_id = notification_requests.object_id - and notifications.notification_id = notification_user_map.notification_id(+) - and sent_date is null - and notifications.notif_date <= - (sysdate - (select n_seconds / 3600 / 24 from notification_intervals where interval_id= :interval_id)) - order by notification_requests.user_id, notification_requests.type_id + select nnr.* + from (select notifications.notification_id, + notifications.notif_subject, + notifications.notif_html, + notification_requests.user_id, + notification_requests.type_id, + notification_requests.delivery_method_id, + notification_requests.request_id, + notifications.response_id, + notifications.notif_date + from notifications, notification_requests + where notifications.type_id = notification_requests.type_id + and notifications.object_id = notification_requests.object_id + and notification_requests.interval_id = :interval_id) nnr, + notification_user_map, acs_objects + where nnr.notification_id = notification_user_map.notification_id(+) + and nnr.user_id = notification_user_map.user_id(+) + and notification_user_map.sent_date is null + and acs_objects.object_id = nnr.request_id + and acs_objects.creation_date <= nnr.notif_date + order by nnr.user_id, nnr.type_id Index: openacs-4/packages/notifications/tcl/sweep-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/sweep-procs-postgresql.xql,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/notifications/tcl/sweep-procs-postgresql.xql 20 Sep 2002 21:19:00 -0000 1.3 +++ openacs-4/packages/notifications/tcl/sweep-procs-postgresql.xql 16 Jan 2003 13:53:10 -0000 1.4 @@ -5,42 +5,33 @@ - select notification_id - from notifications - where now() - notif_date > 2 - and not exists (select notifications.notification_id - from notifications - inner join notification_requests - on ( - notifications.type_id = notification_requests.type_id - and notifications.object_id = notification_requests.object_id - ) - left outer join notification_user_map - on (notifications.notification_id = notification_user_map.notification_id) - where notification_user_map.sent_date is null) + select notification_id + from notifications + except + select distinct notification_id + from notifications inner join notification_requests using (type_id, object_id) + left outer join notification_user_map using (notification_id, user_id) + where sent_date is null - select notifications.notification_id, - notifications.notif_subject, - notifications.notif_text, - notifications.notif_html, - notification_requests.user_id, - notification_requests.type_id, - notification_requests.delivery_method_id, - notifications.response_id - from notifications - inner join notification_requests - on ( - notifications.type_id = notification_requests.type_id - and notifications.object_id = notification_requests.object_id - ) - left outer join notification_user_map - on (notifications.notification_id = notification_user_map.notification_id) - where notification_requests.interval_id = :interval_id - and notification_user_map.sent_date is null + select notification_id, + notif_subject, + notif_text, + notif_html, + user_id, + type_id, + delivery_method_id, + response_id + from notifications inner join notification_requests using (type_id, object_id) + inner join acs_objects on (notification_requests.request_id = acs_objects.object_id) + left outer join notification_user_map using (notification_id, user_id) + where sent_date is null + and creation_date <= notif_date + and interval_id = :interval_id + order by user_id, type_id Index: openacs-4/packages/notifications/tcl/sweep-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/sweep-procs.tcl,v diff -u -N -r1.11 -r1.12 --- openacs-4/packages/notifications/tcl/sweep-procs.tcl 30 Nov 2002 17:40:18 -0000 1.11 +++ openacs-4/packages/notifications/tcl/sweep-procs.tcl 16 Jan 2003 13:53:10 -0000 1.12 @@ -17,9 +17,10 @@ } ad_proc -public cleanup_notifications {} { - Clean up the notifications that have been sent out. + Clean up the notifications that have been sent out (DRB: inefficiently...). } { # Get the list of the ones to kill + set notification_id_list [db_list select_notification_ids {}] # Kill them @@ -52,14 +53,14 @@ # Batched sending foreach notif $notifications { - ns_log Notice "NOTIF-BATCHED: one notif $notif" + ns_log Debug "NOTIF-BATCHED: one notif $notif" if {$notif != "STOP"} { - ns_log Notice "NOTIF-BATCHED: NOT a stop codon" + ns_log Debug "NOTIF-BATCHED: NOT a stop codon" set user_id [ns_set get $notif user_id] set type_id [ns_set get $notif type_id] } else { - ns_log Notice "NOTIF-BATCHED stop codon!" + ns_log Debug "NOTIF-BATCHED stop codon!" set user_id "" set type_id "" } @@ -68,11 +69,11 @@ # if so, batch up previous stuff and send it if {$notif == "STOP" || $user_id != $prev_user_id || $type_id != $prev_type_id} { - ns_log Notice "NOTIF-BATCHED: batching things up for $prev_user_id" + ns_log Debug "NOTIF-BATCHED: batching things up for $prev_user_id" # If no content, keep going if {![empty_string_p $batched_content]} { - ns_log Notice "NOTIF-BATCHED: content to send!" + ns_log Debug "NOTIF-BATCHED: content to send!" db_transaction { ns_log Notice "NOTIF-BATCHED: sending content" # System name is used in the subject @@ -83,7 +84,7 @@ -content $batched_content \ -delivery_method_id $prev_deliv_method_id - ns_log Notice "NOTIF-BATCHED: marking notifications" + ns_log Debug "NOTIF-BATCHED: marking notifications" foreach not_id $list_of_notification_ids { # Mark it as sent notification::mark_sent \ @@ -96,7 +97,7 @@ set list_of_notification_ids [list] set batched_content "" } else { - ns_log Notice "NOTIF-BATCHED: NO content to send!" + ns_log Debug "NOTIF-BATCHED: NO content to send!" } } Index: openacs-4/packages/notifications/www/manage-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/www/manage-oracle.xql,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/notifications/www/manage-oracle.xql 20 Sep 2002 21:19:01 -0000 1.1 +++ openacs-4/packages/notifications/www/manage-oracle.xql 16 Jan 2003 13:53:40 -0000 1.2 @@ -10,21 +10,7 @@ from notification_types where notification_types.type_id = notification_requests.type_id) as type, - decode ((select short_name - from notification_types - where notification_types.type_id = - notification_requests.type_id), - 'forums_forum_notif', - (select name - from forums_forums - where forum_id = - notification_requests.object_id), - 'forums_message_notif', - (select subject - from forums_messages - where message_id = - notification_requests.object_id), - '') as object_name, + acs_object.name(notification_requests.object_id) as object_name, (select name from notification_intervals where notification_intervals.interval_id = Index: openacs-4/packages/notifications/www/manage-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/www/manage-postgresql.xql,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/notifications/www/manage-postgresql.xql 30 Nov 2002 17:40:36 -0000 1.2 +++ openacs-4/packages/notifications/www/manage-postgresql.xql 16 Jan 2003 13:53:40 -0000 1.3 @@ -10,7 +10,7 @@ from notification_types where notification_types.type_id = notification_requests.type_id) as type, - acs_object__name(notification_requests.object_id) as object_name, + acs_object__name(notification_requests.object_id) as object_name, (select name from notification_intervals where notification_intervals.interval_id = Index: openacs-4/packages/notifications/www/manage.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/www/manage.adp,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/notifications/www/manage.adp 8 Nov 2002 10:04:23 -0000 1.2 +++ openacs-4/packages/notifications/www/manage.adp 16 Jan 2003 13:53:40 -0000 1.3 @@ -18,7 +18,7 @@ @notifications.type@ @notifications.object_name@ - @notifications.interval@ + @notifications.interval@ (#notifications.Change#) #notifications.Unsubscribe#
Index: openacs-4/packages/notifications/www/manage.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/www/manage.tcl,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/notifications/www/manage.tcl 20 Sep 2002 21:19:01 -0000 1.1 +++ openacs-4/packages/notifications/www/manage.tcl 16 Jan 2003 13:53:40 -0000 1.2 @@ -9,7 +9,8 @@ set user_id [ad_conn user_id] set return_url [ad_conn url] +set context [list "Manage Notifications"] db_multirow notifications select_notifications {} -ad_return_template \ No newline at end of file +ad_return_template Index: openacs-4/packages/notifications/www/request-change-frequency-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/www/Attic/request-change-frequency-oracle.xql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/notifications/www/request-change-frequency-oracle.xql 16 Jan 2003 13:53:40 -0000 1.2 @@ -0,0 +1,17 @@ + + + + oracle8.1.6 + + + + + select type_id, interval_id, + acs_object.name(notification_requests.object_id) as object_name + from notification_requests + where request_id = :request_id + + + + + Index: openacs-4/packages/notifications/www/request-change-frequency-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/www/Attic/request-change-frequency-postgresql.xql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/notifications/www/request-change-frequency-postgresql.xql 16 Jan 2003 13:53:40 -0000 1.2 @@ -0,0 +1,17 @@ + + + + postgresql7.1 + + + + + select type_id, interval_id, + acs_object__name(notification_requests.object_id) as object_name + from notification_requests + where request_id = :request_id + + + + + Index: openacs-4/packages/notifications/www/request-change-frequency.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/www/request-change-frequency.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/notifications/www/request-change-frequency.adp 16 Jan 2003 13:53:40 -0000 1.2 @@ -0,0 +1,6 @@ + +@page_title@ +@context@ + + + Index: openacs-4/packages/notifications/www/request-change-frequency.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/www/request-change-frequency.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/notifications/www/request-change-frequency.tcl 16 Jan 2003 13:53:40 -0000 1.2 @@ -0,0 +1,37 @@ +ad_page_contract { + + Request a new notification - Ask for more stuff + + @author Tracy Adams (teadams@alum.mit.edu)) + @creation-date 2002-09-03 + @cvs-id $Id: request-change-frequency.tcl,v 1.2 2003/01/16 13:53:40 jeffd Exp $ +} { + request_id:integer,notnull + return_url +} + +set user_id [ad_conn user_id] + +# get the notification information + +db_1row select_notification_request {} + +set page_title "Edit Frequency of $object_name Notification" +set context [list "Edit Frequency"] + +set intervals [notification::get_intervals -type_id $type_id] + +ad_form -name change_frequency -export {request_id return_url} -form { + {interval_id:integer(select) {label "Notification Interval"} + {options $intervals} + {value $interval_id}} +} -on_submit { + + db_dml update_notification_frequency {} + + ad_returnredirect $return_url + ad_script_abort + +} + +ad_return_template Index: openacs-4/packages/notifications/www/request-change-frequency.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/www/Attic/request-change-frequency.xql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/notifications/www/request-change-frequency.xql 16 Jan 2003 13:53:40 -0000 1.2 @@ -0,0 +1,16 @@ + + + + + + + + update notification_requests + set interval_id = :interval_id + where request_id = :request_id + + + + + + Index: openacs-4/packages/notifications/www/request-new.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/www/request-new.tcl,v diff -u -N -r1.6 -r1.7 --- openacs-4/packages/notifications/www/request-new.tcl 8 Nov 2002 10:04:23 -0000 1.6 +++ openacs-4/packages/notifications/www/request-new.tcl 16 Jan 2003 13:53:40 -0000 1.7 @@ -17,7 +17,6 @@ # Check that the object can be subcribed to notification::security::require_notify_object -object_id $object_id - if {[empty_string_p $pretty_name]} { set page_title "[_ notifications.Request_Notification]" } else { @@ -26,27 +25,16 @@ set context [list "[_ notifications.Request_Notification]"] +set intervals [notification::get_intervals -type_id $type_id] +set delivery_methods [notification::get_delivery_methods -type_id $type_id] -form create subscribe +ad_form -name subscribe -export {type_id object_id return_url} -form { + {interval_id:integer(select) {label "[_ notifications.lt_Notification_Interval]"} + {options $intervals}} + {delivery_method_id:integer(select) {label "[_ notifications.Delivery_Method]"} + {options $delivery_methods}} +} -on_submit { -element create subscribe type_id \ - -label "[_ notifications.Type_ID]" -datatype integer -widget hidden - -element create subscribe object_id \ - -label "[_ notifications.Object_ID]" -datatype integer -widget hidden - -element create subscribe return_url \ - -label "[_ notifications.Return_URL]" -datatype text -widget hidden - -element create subscribe interval_id \ - -label "[_ notifications.lt_Notification_Interval]" -datatype integer -widget select -options [notification::get_intervals -type_id $type_id] - -element create subscribe delivery_method_id \ - -label "[_ notifications.Delivery_Method]" -datatype integer -widget select -options [notification::get_delivery_methods -type_id $type_id] - -if {[form is_valid subscribe]} { - template::form get_values subscribe type_id object_id return_url interval_id delivery_method_id - # Add the subscribe notification::request::new \ -type_id $type_id \ @@ -58,7 +46,5 @@ ad_returnredirect $return_url ad_script_abort } - -element set_properties subscribe type_id -value $type_id -element set_properties subscribe object_id -value $object_id -element set_properties subscribe return_url -value $return_url + +ad_return_template Index: openacs-4/packages/notifications/www/test-cleanup.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/www/test-cleanup.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/notifications/www/test-cleanup.tcl 16 Jan 2003 13:53:40 -0000 1.2 @@ -0,0 +1,13 @@ +ad_page_contract { + + Simple script to test the cleanup of notifications that have been sent to + users. + + To use this for testing remove your local copy of ../tcl/sweep-init.tcl, restart + your server and use ../www/test to send notifications for a particular interval. + Afterwards run this script to verify that sent notifications are properly cleaned up. + +} + +notification::sweep::cleanup_notifications +ns_return 200 text/html "done" Index: openacs-4/packages/notifications/www/test.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/www/test.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/notifications/www/test.adp 16 Jan 2003 13:53:40 -0000 1.2 @@ -0,0 +1 @@ + Index: openacs-4/packages/notifications/www/test.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/www/test.tcl,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/notifications/www/test.tcl 29 May 2002 05:12:01 -0000 1.2 +++ openacs-4/packages/notifications/www/test.tcl 16 Jan 2003 13:53:40 -0000 1.3 @@ -1,7 +1,22 @@ +ad_page_contract { -# Send it all out -foreach interval [notification::get_all_intervals] { - notification::sweep::sweep_notifications -interval_id [lindex $interval 1] + Simple script to allow one to sweep the notifications queue for a particular + interval. + + To use this for testing remove your local copy of ../tcl/sweep-init.tcl, restart + your server and use ../www/test-cleanup.tcl to clean up notifications that have + been sent. + } -doc_body_append "done" +set intervals [notification::get_all_intervals] + +ad_form -name sweep -form { + {interval_id:integer(select) {label "Choose interval"} + {options $intervals}} +} -on_submit { + notification::sweep::sweep_notifications -interval_id $interval_id + ad_script_abort +} + +ad_return_template Index: openacs-4/packages/openfts-driver/openfts-driver.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/openfts-driver/openfts-driver.info,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/openfts-driver/openfts-driver.info 30 Nov 2002 17:40:53 -0000 1.5 +++ openacs-4/packages/openfts-driver/openfts-driver.info 16 Jan 2003 13:54:04 -0000 1.6 @@ -17,7 +17,6 @@ - Index: openacs-4/packages/payment-gateway/payment-gateway.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/payment-gateway/payment-gateway.info,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/payment-gateway/payment-gateway.info 30 Nov 2002 17:42:00 -0000 1.4 +++ openacs-4/packages/payment-gateway/payment-gateway.info 16 Jan 2003 13:54:22 -0000 1.5 @@ -31,7 +31,6 @@ - Index: openacs-4/packages/press/press.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/press/press.info,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/press/press.info 23 Sep 2002 23:32:27 -0000 1.2 +++ openacs-4/packages/press/press.info 16 Jan 2003 13:55:08 -0000 1.3 @@ -31,7 +31,6 @@ - @@ -64,7 +63,6 @@ - Index: openacs-4/packages/ref-timezones/ref-timezones.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ref-timezones/ref-timezones.info,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/ref-timezones/ref-timezones.info 15 Oct 2001 19:33:35 -0000 1.3 +++ openacs-4/packages/ref-timezones/ref-timezones.info 16 Jan 2003 13:55:35 -0000 1.4 @@ -19,7 +19,7 @@ This is the timezone data for the reference data package. - + Index: openacs-4/packages/rss-support/rss-support.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/rss-support.info,v diff -u -N -r1.7 -r1.8 --- openacs-4/packages/rss-support/rss-support.info 30 Nov 2002 17:43:28 -0000 1.7 +++ openacs-4/packages/rss-support/rss-support.info 16 Jan 2003 13:55:54 -0000 1.8 @@ -36,9 +36,16 @@ + + + + + + + Index: openacs-4/packages/schema-browser/schema-browser.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/schema-browser/schema-browser.info,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/schema-browser/schema-browser.info 23 Sep 2002 23:32:31 -0000 1.3 +++ openacs-4/packages/schema-browser/schema-browser.info 16 Jan 2003 13:56:12 -0000 1.4 @@ -24,7 +24,6 @@ - Index: openacs-4/packages/simple-survey/simple-survey.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simple-survey/simple-survey.info,v diff -u -N -r1.8 -r1.9 --- openacs-4/packages/simple-survey/simple-survey.info 10 May 2002 00:47:04 -0000 1.8 +++ openacs-4/packages/simple-survey/simple-survey.info 16 Jan 2003 13:56:37 -0000 1.9 @@ -46,7 +46,6 @@ - @@ -129,7 +128,6 @@ - Index: openacs-4/packages/site-wide-search/site-wide-search.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/site-wide-search/site-wide-search.info,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/site-wide-search/site-wide-search.info 9 Mar 2002 02:00:02 -0000 1.2 +++ openacs-4/packages/site-wide-search/site-wide-search.info 16 Jan 2003 13:57:16 -0000 1.3 @@ -59,7 +59,6 @@ - Index: openacs-4/packages/spam/spam.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/spam/spam.info,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/spam/spam.info 23 Sep 2002 23:32:33 -0000 1.3 +++ openacs-4/packages/spam/spam.info 16 Jan 2003 13:57:54 -0000 1.4 @@ -7,7 +7,7 @@ f t - + oracle postgresql