Thread: pgsql: Include all columns in default names for foreign keyconstraints
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 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/f177660ab01e53dd5597b195dcc8526baa5cfcbd Modified Files -------------- src/backend/commands/indexcmds.c | 3 +- src/backend/commands/statscmds.c | 3 +- src/backend/commands/tablecmds.c | 42 ++++++++- src/test/regress/expected/alter_table.out | 8 +- src/test/regress/expected/foreign_key.out | 140 +++++++++++++++++------------- src/test/regress/expected/rules.out | 12 +-- src/test/regress/sql/foreign_key.sql | 20 ++++- 7 files changed, 152 insertions(+), 76 deletions(-)