Deleting "parent" record

From: Félix Sánchez Rodríguez <fesanch(at)ciego(dot)cult(dot)cu>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: Deleting "parent" record
Date: 2009-04-24 15:00:45
Message-ID: 003801c9c4ed$732e09a0$3000a8c0@atenea
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi:

I can't delete a "parent" record from a table. The relation has "ON UPDATE CASCADE ON DELETE CASCADE". As far as know, that causes that when you delete a record from the parent table, the related one from the child table will be deleted as well. However, I had to first delete the child record and then delete the parent one. Is this normal on using PostgreSQL?? I first tried the removal by using PHP. When it failed, I thought it was a problem of my PHP code and I checked it manually from Navicat, it failed too.

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Chris Browne 2009-04-24 15:51:55 Re: Updating a very large table
Previous Message Michael Monnerie 2009-04-24 14:48:51 Re: Updating a very large table