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.Fuertbauer@ebewe.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@postgresql.org
>