Re: Foreign key type checking patch

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Foreign key type checking patch
Date: 2004-03-01 18:11:59
Message-ID: 1151.1078164719@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> writes:
> I must admit that I do not understand your point.

> I wish I would have a WARNING if a foreign key is not declared exactly as
> the key it references.

The reason why people want such a warning is that the RI checks tend to
be slow if it's not the case. Accordingly, the warning should only
appear if the check is actually going to be slow.

You sound like you think it's a bug that Postgres supports cross-type FK
references at all. I disagree. It's a feature, albeit one whose
implementation could stand improvement. The warning ought to come out
in cases where people are going to be exposed to the implementation
weaknesses.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephan Szabo 2004-03-01 18:20:13 Re: Foreign key type checking patch
Previous Message Fabien COELHO 2004-03-01 17:58:43 Re: Foreign key type checking patch

Browse pgsql-patches by date

  From Date Subject
Next Message Stephan Szabo 2004-03-01 18:20:13 Re: Foreign key type checking patch
Previous Message Neil Conway 2004-03-01 18:01:15 minor doc improvement