| From: | Jean-Christian Imbeault <jc(at)mega-bucks(dot)co(dot)jp> |
|---|---|
| To: | Oliver Elphick <olly(at)lfix(dot)co(dot)uk> |
| Cc: | PostgreSQL general list <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: adding on delete cascade constraint? |
| Date: | 2003-09-19 13:02:26 |
| Message-ID: | 3F6AFE62.1030709@mega-bucks.co.jp |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Oliver Elphick wrote:
>>Foreign Key constraints: $1 FOREIGN KEY (pid) REFERENCES products(id) ON
>>UPDATE NO ACTION ON DELETE NO ACTION
>
> Drop the constraint; then add an amended one.
Ok, how do I drop the constraint, it has no name.
The documentation is rather poor on how to get the name of unamed
constraints:
"To remove a constraint you need to know its name. If you gave it a name
then that's easy. Otherwise the system assigned a generated name, which
you need to find out. The psql command \d tablename can be helpful here"
Secondly what is the correct syntax for adding a new constraint with ON
DELETE CASCADE?
Thanks,
Jean-Christian Imbeault
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Richard Huxton | 2003-09-19 13:11:16 | Re: Column defaults fail with rules on view |
| Previous Message | Daniel Schuchardt | 2003-09-19 12:53:37 | Re: psql and blob |