Index: openacs-4/packages/contacts/sql/postgresql/upgrade/upgrade-1.0d16-1.0d17.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/sql/postgresql/upgrade/upgrade-1.0d16-1.0d17.sql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/contacts/sql/postgresql/upgrade/upgrade-1.0d16-1.0d17.sql	2 Feb 2006 23:25:03 -0000	1.2
+++ openacs-4/packages/contacts/sql/postgresql/upgrade/upgrade-1.0d16-1.0d17.sql	3 Feb 2006 00:21:39 -0000	1.3
@@ -4,9 +4,8 @@
 declare 
 	v_table_count   boolean;
 begin
+	v_table_count := ''1'' from pg_constraint where conname = ''contact_complaint_tracking'';
 
-	v_table_count := ''1'' from pg_class where relname = ''contact_complaint_tracking'';
-
         if v_table_count is true then 
             ALTER TABLE contact_complaint_tracking DROP CONSTRAINT contact_complaint_tracking_supplier_fk;
         end if;
@@ -18,3 +17,4 @@
 -- Calling and droping the function
 select inline_0();
 drop function inline_0();
+
