Re: Bug in Rule+Foreing key constrain?

From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: Michele Bendazzoli <mickymouse(at)mickymouse(dot)it>
Cc: pgsql-sql <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Bug in Rule+Foreing key constrain?
Date: 2003-10-30 17:29:42
Message-ID: 3FA14A86.8080802@Yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-sql

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(at)Yahoo(dot)com #

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2003-10-30 17:34:20 Re: 7.4 compatibility question
Previous Message Manfred Spraul 2003-10-30 17:20:21 Re: O_DIRECT in freebsd

Browse pgsql-sql by date

  From Date Subject
Next Message Jan Wieck 2003-10-30 17:33:44 Re: strange postgresql failure
Previous Message sad 2003-10-30 16:12:36 varlena versus null-terminated strings