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. -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general