aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gistvacuum.c
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2022-09-08 13:17:02 +0200
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2022-09-08 13:17:02 +0200
commit80ef25b1adb150b727dc411d5ec30261a19f6dca (patch)
tree02f82bf1d37e6ed0995577e6b16628f5c833af8f /src/backend/access/gist/gistvacuum.c
parentccbb54c72990d412552fbc50098b2e998b888359 (diff)
downloadpostgresql-80ef25b1adb150b727dc411d5ec30261a19f6dca.tar.gz
postgresql-80ef25b1adb150b727dc411d5ec30261a19f6dca.zip
Choose FK name correctly during partition attachment
During ALTER TABLE ATTACH PARTITION, if the name of a parent's foreign key constraint is already used on the partition, the code tries to choose another one before the FK attributes list has been populated, so the resulting constraint name was "<relname>__fkey" instead of "<relname>_<attrs>_fkey". Repair, and add a test case. Backpatch to 12. In 11, the code to attach a partition was not smart enough to cope with conflicting constraint names, so the problem doesn't exist there. Author: Jehan-Guillaume de Rorthais <jgdr@dalibo.com> Discussion: https://postgr.es/m/20220901184156.738ebee5@karst
Diffstat (limited to 'src/backend/access/gist/gistvacuum.c')
0 files changed, 0 insertions, 0 deletions