Re: From select to delete

From: Alban Hertroys <haramrae(at)gmail(dot)com>
To: Alexander Farber <alexander(dot)farber(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: From select to delete
Date: 2011-10-29 17:05:59
Message-ID: 48E030EF-9E06-4D30-9088-958DA960C265@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message hubert depesz lubaczewski 2011-10-30 06:24:09 Why is there no 8.3.16 rpm with _id ?
Previous Message Craig Ringer 2011-10-29 16:05:34 Re: PG_DUMP error : unexpected chunk number