Re: From select to delete - Mailing list pgsql-general

From Alban Hertroys
Subject Re: From select to delete
Date
Msg-id 48E030EF-9E06-4D30-9088-958DA960C265@gmail.com
Whole thread Raw
In response to Re: From select to delete  (Alexander Farber <alexander.farber@gmail.com>)
Responses Re: From select to delete  (Alexander Farber <alexander.farber@gmail.com>)
List pgsql-general
On 28 Oct 2011, at 19:02, Alexander Farber wrote:

> I'll try that.
>
> My own 3 commands suggested above fail with
>
> Foreign key violation: 7 ERROR: update or delete on table "pref_games"
> violates foreign key constraint "pref_scores_gid_fkey" on table
> "pref_scores" DETAIL: Key (gid)=(1998) is still referenced from table
> "pref_scores". CONTEXT: SQL statement "delete from pref_games where
> gid in (select gid from pref_scores where id= $1 )"


It would without cascades defined, yeah. Did you skip over the first paragraph of David's reply?

Alban Hertroys

--
If you can't see the forest for the trees,
cut the trees and you'll see there is no forest.


pgsql-general by date:

Previous
From: Craig Ringer
Date:
Subject: Re: PG_DUMP error : unexpected chunk number
Next
From: Gavin Flower
Date:
Subject: Re: nextval skips values between consecutive calls