Re: drop constraint problem

From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: Wolfgang(dot)Fuertbauer(at)ebewe(dot)com
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: drop constraint problem
Date: 2002-05-22 02:59:29
Message-ID: 20020522105819.N66201-100000@houston.familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

If y;ou check the manual, you'll notice that Postgres doesn't support
dropping foreign key constraints just yet...

You'll need to delete the three constraints manually from pg_trigger.
This is tricky, but you can dlete them by their name and the oid of the
table that they're on...

Chris

On Tue, 21 May 2002 Wolfgang(dot)Fuertbauer(at)ebewe(dot)com wrote:

>
> Hi all,
>
> i'm running 7.2.1 and have problems with dropping constraints:
>
> fakt32=# alter table wkfaktzeilen
> add constraint printjobfk foreign key (printjob)
> references wkfaktdruck(printjob)
> match full
> on delete cascade
> on update cascade;
> >ALTER
>
> fakt32=# alter table wkfaktzeilen drop constraint printjobfk restrict;
> >ERROR: ALTER TABLE / DROP CONSTRAINT: printjobfk does not exist
>
> fakt32=# alter table wkfaktdruck drop constraint printjobfk restrict;
> >ERROR: ALTER TABLE / DROP CONSTRAINT: printjobfk does not exist
>
> but when dropping the table, the triggers are deleted and i can see the
> entries
> in pg_triggers??
>
> please help
> Wolfgang
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tille, Andreas 2002-05-22 07:35:57 Turning column into row
Previous Message tille 2002-05-21 20:42:40 Turning column into row