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.1 -r1.2
--- openacs-4/contrib/obsolete-packages/bboard/sql/postgresql/bboard-views.sql	29 Jun 2001 20:31:14 -0000	1.1
+++ openacs-4/contrib/obsolete-packages/bboard/sql/postgresql/bboard-views.sql	19 Nov 2001 19:34:23 -0000	1.2
@@ -25,15 +25,19 @@
 
 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);
+    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,
