Skip to content

PG18: FK constraint names changed in tests #8126

@m3hm3t

Description

@m3hm3t
SELECT tbl.relname, fk."Constraint", fk."Definition"
FROM pg_catalog.pg_class tbl
JOIN public.table_fkeys fk ON tbl.oid = fk.relid
WHERE tbl.relname LIKE '%_89%'
ORDER BY 1, 2;

- sensors_2020_01_01_8970002 | sensors_2020_01_01_8970002_measureid_eventdatetime_fkey
+ sensors_2020_01_01_8970002 | fkey_from_child_to_parent_8970002_1

- sensors_8970000            | sensors_8970000_measureid_eventdatetime_fkey
+ sensors_8970000            | fkey_from_parent_to_parent_8970000_1

Suspected Upstream Change

PostgreSQL commit: Restructure foreign key handling code for ATTACH/DETACH

postgres/postgres@53af949

This refactor adjusts how FKs are represented/propagated when attaching/detaching partitions (especially when the referenced side is partitioned). A side effect is which FK instance “wins” and how clones are named/deduplicated—leading to _1 suffixed explicit names and suppression of the previous auto‑generated …_fkey names.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions