Index: openacs-4/packages/bug-tracker/sql/postgresql/upgrade-0.9d1-1.2d2.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/sql/postgresql/upgrade-0.9d1-1.2d2.sql,v diff -u -r1.1.2.2 -r1.1.2.3 --- openacs-4/packages/bug-tracker/sql/postgresql/upgrade-0.9d1-1.2d2.sql 11 Mar 2003 15:10:09 -0000 1.1.2.2 +++ openacs-4/packages/bug-tracker/sql/postgresql/upgrade-0.9d1-1.2d2.sql 11 Mar 2003 15:30:02 -0000 1.1.2.3 @@ -1477,6 +1477,7 @@ -- ******* Drop temporary upgrade tables drop table code_keyword_map_temp; +drop table bug_type_keyword_map_temp; drop table bt_bugs_temp; drop table project_temp; Index: openacs-4/packages/bug-tracker/sql/postgresql/upgrade-1.2d5-1.2d6.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/sql/postgresql/upgrade-1.2d5-1.2d6.sql,v diff -u -r1.1.2.1 -r1.1.2.2 --- openacs-4/packages/bug-tracker/sql/postgresql/upgrade-1.2d5-1.2d6.sql 11 Mar 2003 15:10:09 -0000 1.1.2.1 +++ openacs-4/packages/bug-tracker/sql/postgresql/upgrade-1.2d5-1.2d6.sql 11 Mar 2003 15:30:02 -0000 1.1.2.2 @@ -1,4 +1,5 @@ -- The bt_project__delete proc had a misspelled call to bt_project__keyword_delete. +-- The upgrade-0.9d1-1.2d2.sql upgrade script forgot to delete a temporary table -- -- @author Lars Pind -- @creation-date 2003-03-11 @@ -49,3 +50,24 @@ return 0; end; ' language 'plpgsql'; + + +create or replace function inline_0 () +returns integer as ' +declare + v_count integer; +begin + select count(*) + into v_count + from pg_class + where relname = ''bug_type_keyword_map_temp''; + + if v_count > 0 then + drop table bug_type_keyword_map_temp; + end if; + + return 0; +end;' language 'plpgsql'; +select inline_0(); +drop function inline_0(); +