Received: from mail01.phoenixdsl.com (mail.phoenixdsl.com [216.178.151.24]) by mail.postgresql.org (8.11.1/8.11.1) with SMTP id f02058L11256 for ; Mon, 1 Jan 2001 19:05:08 -0500 (EST) (envelope-from mdavis@sevainc.com) Received: (qmail 87407 invoked by uid 89); 2 Jan 2001 00:04:46 -0000 Received: from unknown (HELO SALLY) (64.32.157.45) by 0 with SMTP; 2 Jan 2001 00:04:46 -0000 Received: by localhost with Microsoft MAPI; Mon, 1 Jan 2001 17:04:44 -0700 Message-ID: <01C07414.F08156B0.mdavis@sevainc.com> From: Michael Davis Reply-To: "mdavis@sevainc.com" To: "'pgsql-sql@postgresql.org'" , "'pgsql-admin@postgresql.org'" Subject: Removing a constraint? Date: Mon, 1 Jan 2001 17:04:41 -0700 Organization: Seva Inc. X-Mailer: Microsoft Internet E-mail/MAPI - 8.0.0.4211 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Archive-Number: 200101/2 X-Sequence-Number: 372 Does anyone know how to completely and accurately remove or drop a constraint, specifically a foreign key constraint? I tried to remove a constraint by deleting it's trigger from pg_triggers. This caused some undesirable side effects with other tables involved with the constraint. I have several tables that I need to change the column constraints and foreign key constraints on. Recreating (drop and create) the table every time I need to change a column constraint is a pain because all the objects that reference the table would also need to be recreated (i.e. views and triggers). How do production DBAs successfully make changes to their tables? FYI, I was able to alter table add the same constraint many times. Is this a problem? This created a new trigger in pg_triggers every time.