pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Davis <mdavis@sevainc.com>
To: 'pgsql-sql@postgresql.org' <pgsql-sql@postgresql.org>
To: 'pgsql-admin@postgresql.org' <pgsql-admin@postgresql.org>
Subject: Removing a constraint?
Date: Mon, 1 Jan 2001 17:04:41 -0700
Message-ID: <01C07414.F08156B0.mdavis@sevainc.com> (raw)

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.




view thread (3+ messages)  latest in thread

Message-ID: <01C07414.F08156B0.mdavis@sevainc.com>
Permalink:  ../01C07414.F08156B0.mdavis@sevainc.com/
Also on:    postgresql.org/message-id/01C07414.F08156B0.mdavis@sevainc.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: mdavis@sevainc.com, pgsql-admin@postgresql.org
  Subject: Re: Removing a constraint?
  In-Reply-To: <01C07414.F08156B0.mdavis@sevainc.com>
  References: <01C07414.F08156B0.mdavis@sevainc.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox