Fabien COELHO <[EMAIL PROTECTED]> 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 ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match