diff options
| author | Peter Eisentraut | 2024-11-07 10:13:06 +0000 |
|---|---|---|
| committer | Peter Eisentraut | 2024-11-07 10:13:06 +0000 |
| commit | d7a2b5bd8718a6207fb364318d7f7cccdf6219c3 (patch) | |
| tree | 2e5cea9e7cb7b4ea5a1d09faf278be3dbdab3554 /src/backend/commands/tablecmds.c | |
| parent | 987027bcc04397f963bb961092a83067c0e406bb (diff) | |
Clarify a foreign key error message
Clarify the message about type mismatch in foreign key definition to
indicate which column the referencing and which is the referenced one.
Reported-by: Jian He <[email protected]>
Discussion: https://www.postgresql.org/message-id/CACJufxEL82ao-aXOa=d_-Xip0bix-qdSyNc9fcWxOdkEZFko8w@mail.gmail.com
Diffstat (limited to 'src/backend/commands/tablecmds.c')
| -rw-r--r-- | src/backend/commands/tablecmds.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index 4345b96de5e..eaa81424270 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -9961,7 +9961,7 @@ ATAddForeignKeyConstraint(List **wqueue, AlteredTableInfo *tab, Relation rel, (errcode(ERRCODE_DATATYPE_MISMATCH), errmsg("foreign key constraint \"%s\" cannot be implemented", fkconstraint->conname), - errdetail("Key columns \"%s\" and \"%s\" " + errdetail("Key columns \"%s\" of the referencing table and \"%s\" of the referenced table " "are of incompatible types: %s and %s.", strVal(list_nth(fkconstraint->fk_attrs, i)), strVal(list_nth(fkconstraint->pk_attrs, i)), |
