Re: delete on cascade

From: Achilleas Mantzios <achill(at)matrix(dot)gatewaynet(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: delete on cascade
Date: 2006-10-23 10:28:01
Message-ID: 200610231328.02176.achill@matrix.gatewaynet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Στις Δευτέρα 23 Οκτώβριος 2006 12:50, ο/η Luca Ferrari έγραψε:
> On Monday 23 October 2006 11:00 Achilleas Mantzios's cat, walking on the
>
> keyboard, wrote:
> > not right!!!
> > ON DELETE CASCADE is specified in FOREIGN KEY contsraints.
> > So that would be in ass_sf table.
> > If you find ALTER TABLE ass_sf command hard to run, then drob your
> > ass_sf table and define it like
>
> Sorry, but this would define that when I delete a row on ass_sf also the
> skin and the family will be deleted, right?

Not right. This would specify quite the opposite.

> I would like to get the
> opposite behaviour: when I delete a skill also its association on ass_sf
> will be deleted. Is this possible?

Absolutely, and this is done in the way i just described.
In any case I would recommend reading the docs.

>
> Thanks,
> Luca
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq

--
Achilleas Mantzios

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Richard Broersma Jr 2006-10-23 15:41:16 Re: delete on cascade
Previous Message Luca Ferrari 2006-10-23 09:50:18 Re: delete on cascade