非互換
FUJITSU Enterprise Postgres 12では、外部キーのデフォルトの制約名を命名するときに、すべてのキー列の名前を使用します。
外部キーのデフォルトの制約名に最初の列名のみが含まれます。
[例]
=# CREATE TABLE tb1(c1 int,c2 int,PRIMARY KEY(c1,c2));
CREATE TABLE
=# CREATE TABLE tb2(id int,c1 int,c2 int,FOREIGN KEY(c1,c2) REFERENCES tb1);
CREATE TABLE
=# \d tb2
Table "public.tb2"
Column | Type | Collation | Nullable | Default
--------+---------+-----------+----------+---------
id | integer | | |
c1 | integer | | |
c2 | integer | | |
Foreign-key constraints:
"tb2_c1_fkey" FOREIGN KEY (c1, c2) REFERENCES tb1(c1, c2)外部キーのデフォルトの制約名にすべてのキー列の名前を使用します。
[例]
=# CREATE TABLE tb1(c1 int,c2 int,PRIMARY KEY(c1,c2));
CREATE TABLE
=# CREATE TABLE tb2(id int,c1 int,c2 int,FOREIGN KEY(c1,c2) REFERENCES tb1);
CREATE TABLE
=# \d tb2
Table "public.tb2"
Column | Type | Collation | Nullable | Default
--------+---------+-----------+----------+---------
id | integer | | |
c1 | integer | | |
c2 | integer | | |
Foreign-key constraints:
"tb2_c1_c2_fkey" FOREIGN KEY (c1, c2) REFERENCES tb1(c1, c2)対処方法
ありません。