mirror of
https://github.com/postgres/postgres.git
synced 2025-06-22 02:52:08 +03:00
Include all columns in default names for foreign key constraints
When creating a name for a foreign key constraint when none is specified, use all column names instead of only the first one, similar to how it is already done for index names. Author: Paul Martinez <hellopfm@gmail.com> Reviewed-by: Peter Eisentraut <peter.eisentraut@2ndquadrant.com> Discussion: https://www.postgresql.org/message-id/flat/CAF+2_SFjky6XRfLNRXpkG97W6PRbOO_mjAxqXzAAimU=c7w7_A@mail.gmail.com
This commit is contained in:
@ -2109,7 +2109,8 @@ ChooseIndexName(const char *tabname, Oid namespaceId,
|
||||
* We know that less than NAMEDATALEN characters will actually be used,
|
||||
* so we can truncate the result once we've generated that many.
|
||||
*
|
||||
* XXX See also ChooseExtendedStatisticNameAddition.
|
||||
* XXX See also ChooseForeignKeyConstraintNameAddition and
|
||||
* ChooseExtendedStatisticNameAddition.
|
||||
*/
|
||||
static char *
|
||||
ChooseIndexNameAddition(List *colnames)
|
||||
|
Reference in New Issue
Block a user