pgsql: Include all columns in default names for foreign key constraints

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Include all columns in default names for foreign key constraints
Date: 2019-03-13 13:28:25
Message-ID: E1h43vl-0005nu-Pq@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(at)gmail(dot)com>
Reviewed-by: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Discussion: https://www.postgresql.org/message-id/flat/CAF+2_SFjky6XRfLNRXpkG97W6PRbOO_mjAxqXzAAimU=c7w7_A(at)mail(dot)gmail(dot)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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2019-03-13 17:21:05 pgsql: Revert setting client_min_messages to 'debug1' in new tests.
Previous Message Robert Haas 2019-03-13 12:57:34 pgsql: Allow ALTER TABLE .. SET NOT NULL to skip provably unnecessary s