Skip site navigation (1) Skip section navigation (2)

Re: ON DELETE CASCADE with multiple paths

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Max Khon <mkhon(at)swsoft(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: ON DELETE CASCADE with multiple paths
Date: 2007-05-17 14:50:15
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
Max Khon <mkhon(at)swsoft(dot)com> writes:
> "delete from foo" fails:

> ERROR: update or delete on table "bar" violates foreign key constraint
> "foobar_fk0" on table "foobar"
> SQL state: 23503
> Detail: Key (bar_id)=(1) is still referenced from table "foobar".
> Context: SQL statement "DELETE FROM ONLY "public"."bar" WHERE "foo_id" = $1"

I see no bug here.  There is no guarantee about the order in which
constraints are applied.

			regards, tom lane

In response to


pgsql-bugs by date

Next:From: Andrew SullivanDate: 2007-05-17 15:38:40
Subject: Re: strange problem with ip6
Previous:From: Max KhonDate: 2007-05-17 12:55:44
Subject: ON DELETE CASCADE with multiple paths

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group