Index: openacs-4/contrib/obsolete-packages/bboard/bboard.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/bboard.info,v diff -u -r1.3 -r1.4 --- openacs-4/contrib/obsolete-packages/bboard/bboard.info 31 Oct 2001 20:42:07 -0000 1.3 +++ openacs-4/contrib/obsolete-packages/bboard/bboard.info 21 Nov 2001 01:26:11 -0000 1.4 @@ -21,6 +21,7 @@ + @@ -180,12 +181,12 @@ - - - - - + + + + + Index: openacs-4/contrib/obsolete-packages/bboard/sql/postgresql/bboard-views.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/sql/postgresql/bboard-views.sql,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/obsolete-packages/bboard/sql/postgresql/bboard-views.sql 19 Nov 2001 19:34:23 -0000 1.2 +++ openacs-4/contrib/obsolete-packages/bboard/sql/postgresql/bboard-views.sql 21 Nov 2001 01:26:11 -0000 1.3 @@ -7,57 +7,23 @@ -- @cvs-id $Id$ -- +-- DRB: This view is several orders of magnitude faster than the old one +-- using "in". It would be nice to avoid having two aggregate subselects +-- but there's no easy way to to do this. + create view bboard_messages_all as select m.message_id, m.reply_to, m.sent_date, m.sender, m.title, m.mime_type, m.content, f.forum_id, f.status, - (select count(1) from acs_messages m2 - where m2.message_id in (select mf.message_id - from bboard_forum_message_map mf) - and m2.tree_sortkey like m.tree_sortkey || '%') - as num_replies, - (select max(sent_date) from acs_messages m2 - where m2.message_id in (select mf.message_id - from bboard_forum_message_map mf) - and m2.tree_sortkey like m.tree_sortkey || '%') - as last_reply_date - from acs_messages_all m, bboard_forum_message_map f - where m.message_id = f.message_id; + (select count(1) from acs_messages m2, bboard_forum_message_map mf + where m2.message_id = mf.message_id + and m2.tree_sortkey like m.tree_sortkey || '%') as num_replies, + (select max(sent_date) from acs_messages m2, bboard_forum_message_map mf + where m2.message_id = mf.message_id + and m2.tree_sortkey like m.tree_sortkey || '%') as last_reply_date + from acs_messages_all m, bboard_forum_message_map f + where m.message_id = f.message_id; create view bboard_messages_by_category as select msg.*, cat.category_id from bboard_messages_all msg left join bboard_category_message_map cat on (msg.message_id = cat.message_id); --- create view bboard_messages_by_category as --- select msg.*, cat.category_id --- from bboard_messages_all msg, bboard_category_message_map cat --- where msg.message_id = cat.message_id --- UNION --- select msg.*, NULL as category_id --- from bboard_messages_all msg --- where 0 = (select count(1) from bboard_category_message_map cat --- where msg.message_id = cat.message_id); - - --- create or replace view bboard_messages_all as --- select m.message_id, m.reply_to, m.sent_date, m.sender, --- m.title, m.mime_type, m.content, f.forum_id, f.status, --- (select count(1) from acs_messages m2 --- where m2.message_id in (select mf.message_id --- from bboard_forum_message_map mf --- where mf.forum_id = f.forum_id) --- start with m2.message_id = m.message_id --- connect by m2.reply_to = prior m2.message_id) as num_replies, --- (select max(sent_date) from acs_messages m2 --- where m2.message_id in (select mf.message_id --- from bboard_forum_message_map mf --- where mf.forum_id = f.forum_id) --- start with m2.message_id = m.message_id --- connect by m2.reply_to = prior m2.message_id) as last_reply_date --- from acs_messages_all m, bboard_forum_message_map f --- where m.message_id = f.message_id; - --- create or replace view bboard_messages_by_category as --- select msg.*, cat.category_id --- from bboard_messages_all msg, bboard_category_message_map cat --- where msg.message_id = cat.message_id(+); - Index: openacs-4/packages/acs-bootstrap-installer/tcl/20-db-bootstrap-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-bootstrap-installer/tcl/20-db-bootstrap-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-bootstrap-installer/tcl/20-db-bootstrap-procs.tcl 12 Apr 2001 16:58:18 -0000 1.1 +++ openacs-4/packages/acs-bootstrap-installer/tcl/20-db-bootstrap-procs.tcl 21 Nov 2001 01:26:11 -0000 1.2 @@ -34,7 +34,8 @@ # where no AvailablePool parameters exist, as in that case the ACS # slurps up all pools. I expect mixed db environments to be more common # within the OpenACS community, though, so we should do a better job of - # checking. + # checking. This will especially be true of users migrating from an + # [Open]ACS 3.x site or ACS 4.x classic site. # # 2. There was no checking to make sure that *all* pools are correctly # configured. Even in an Oracle-only environment one could easy mistype a @@ -74,7 +75,7 @@ if { [string length $the_set] > 0 } { for {set i 0} {$i < [ns_set size $the_set]} {incr i} { - if { [ns_set key $the_set $i] == "AvailablePool" } { + if { [string tolower [ns_set key $the_set $i]] == "availablepool" } { lappend pools [ns_set value $the_set $i] } } Index: openacs-4/packages/acs-tcl/tcl/00-database-procs-postgresql.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/Attic/00-database-procs-postgresql.tcl,v diff -u -r1.27 -r1.28 --- openacs-4/packages/acs-tcl/tcl/00-database-procs-postgresql.tcl 20 Nov 2001 21:49:52 -0000 1.27 +++ openacs-4/packages/acs-tcl/tcl/00-database-procs-postgresql.tcl 21 Nov 2001 01:26:11 -0000 1.28 @@ -658,16 +658,24 @@ set pgpass "<<$pgpass" } - set pghost [db_get_dbhost] - if { ![string equal $pghost ""] } { - set pghost "-h $pghost" + # DRB: Submitted patch was in error - the driver opens a -h hostname connection + # unless the hostname is localhost. We need to do the same here. The submitted + # patch checked for a blank hostname, which fails in the driver. Arguably the + # driver's wrong but a lot of non-OpenACS folks use it, and even though I'm the + # maintainer we shouldn't break existing code over such trivialities... + + if { [string equal [db_get_dbhost] "localhost"] } { + set pghost "" + } else { + set pghost "-h [db_get_dbhost]" } cd [file dirname $file] if { $tcl_platform(platform) == "windows" } { set fp [open "|[file join [db_get_pgbin] psql] -h [ns_info hostname] $pgport $pguser -f $file_name [db_get_database]" "r"] } else { +ns_log Notice "Huh? |[file join [db_get_pgbin] psql] $pghost $pgport $pguser -f $file_name [db_get_database] $pgpass" set fp [open "|[file join [db_get_pgbin] psql] $pghost $pgport $pguser -f $file_name [db_get_database] $pgpass" "r"] }