From: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
---|---|
To: | Hannu Krosing <hannu(at)tm(dot)ee> |
Cc: | PostgreSQL HACKERS <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: is there a way to DROP foreign key constraint ? |
Date: | 2000-10-20 17:59:55 |
Message-ID: | Pine.BSF.4.10.10010201053470.96790-100000@megazone23.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, 20 Oct 2000, Hannu Krosing wrote:
> I'm unable to find the complementary function to
>
> ALTER TABLE t ADD FOREIGN KEY(id) REFERENCES pkt(pk);
Currently, ALTER TABLE ... DROP table constraint definition
doesn't exist.
> I would try DROP TRIGGER, but I've also been unable to
> find a way to name the constraint ;(
Umm, put the constraint name in the table constraint definition?
>From the SQL spec:
<table constraint definition> ::=
[ <constraint name definition> ]
<table constraint> [ <constraint attributes> ]
<constraint name definition> ::= CONSTRAINT <constraint name>
Currently, you need to drop the three triggers from pg_trigger
that are associated with the constraint. Easiest way to find
them if you don't have a constraint name is to look at the tg_args.
From | Date | Subject | |
---|---|---|---|
Next Message | Marten Feldtmann | 2000-10-20 18:02:47 | Re: INHERITS doesn't offer enough functionality |
Previous Message | Ross J. Reedstrom | 2000-10-20 17:56:32 | Re: Now 376175 lines of code |