Bruce Momjian <[EMAIL PROTECTED]> writes:
> The reason I think we have to mention the constraint name is that you
> could have a multi-column primary/foreign key, so instead of mentioning
> each column, we just mention the constraint name, which should be easy
> to identify.
However, the complaint will be about one single column being of a
non-matching type. In the case of a multicolumn foreign key, giving
only the constraint name is unhelpful. Even for a one-column key,
it's not obvious to me why the constraint name is better than the column
[ thinks... ] I guess it could be that the same column is being used in
several different FK constraints, so if we just give column names then
it would also be important to mention the referenced column.
I'd suggest something along the lines of
NOTICE: foreign key constraint "constrname" will require a cross-type conversion
DETAIL: key columns "fkcol" and "pkcol" are of different types integer and double
if you want to be really complete.
I've got mixed feelings about the WARNING-vs-NOTICE issue. WARNING
seems too strong, like we are trying to tell them that it won't work at
all. Particularly with text like the above, which completely fails to
explain that the problem is only one of speed and not functionality.
If you want it to be a WARNING then we gotta work on the text some more.
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings