X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 5ECCCD1B58F for ; Thu, 30 Oct 2003 17:31:02 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 92010-09 for ; Thu, 30 Oct 2003 13:30:31 -0400 (AST) Received: from smtp011.mail.yahoo.com (smtp011.mail.yahoo.com [216.136.173.31]) by svr1.postgresql.org (Postfix) with SMTP id E55C6D1BA62 for ; Thu, 30 Oct 2003 13:30:21 -0400 (AST) Received: from pcp01341166pcs.wilog301.pa.comcast.net (HELO europa.janwieck.net) (janwieck@68.80.245.191 with login) by smtp.mail.vip.sc5.yahoo.com with SMTP; 30 Oct 2003 17:30:21 -0000 Received: from Yahoo.com (ismtp.afilias.com [216.217.55.254]) (authenticated) by europa.janwieck.net (8.11.6/8.11.6) with ESMTP id h9UHUH324279; Thu, 30 Oct 2003 12:30:17 -0500 Message-ID: <3FA14A86.8080802@Yahoo.com> Date: Thu, 30 Oct 2003 12:29:42 -0500 From: Jan Wieck User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Michele Bendazzoli Cc: pgsql-sql Subject: Re: Bug in Rule+Foreing key constrain? References: <1067517334.2371.26.camel@mickymouse.sintel> In-Reply-To: <1067517334.2371.26.camel@mickymouse.sintel> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/404 X-Sequence-Number: 15804 Michele Bendazzoli wrote: > I have found a strange behaviour that I don't know if is a bug or not. > > I have three tables: > * abilitazione with a primary key of (comuneid, cassonettoid, chiaveid) > * cassonetto with a primary key of (comuneid, cassonettoid) > * chiave with a primary key of (comuneid, chiaveid) > > and two foreign key from abilitazioni to cassonetto and chiave tables > respectivly. Here is the picture (I hope it will be clear) > > cassonetto abilitazioni chiave > |comuneid |--> |comuneid |<---|comuneid| > PK -> |cassonettoid|--> |cassonettoid| | | > |chiaveid |<---|chiaveid| > |abilitata | Not entirely. On which table(s) are the REFERENCES constraints and are they separate per column constraints or are they multi-column constraints? It's usually best to cut'n'paste the CREATE TABLE or ALTER TABLE statements that are used to create the constraints. That way we know exactly what you're talking about. Jan -- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #================================================== JanWieck@Yahoo.com #