Skip to content

Commit bbe9e2e

Browse files
authored
Update 20240428_01.md
1 parent 8d2f16f commit bbe9e2e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

202404/20240428_01.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ create table user_like_list (
7272
ERROR: 42804: foreign key constraint "user_like_list_friends_fkey" cannot be implemented
7373
DETAIL: Key columns "friends" and "uid" are of incompatible types: integer[] and integer.
7474
LOCATION: ATAddForeignKeyConstraint, tablecmds.c:9220
75-
```
75+
```
76+
77+
为了解决这个问题, 需要内核的支持, 或者在pk字段上使用check约束检查值是否在关联表的多值字段内存在, 为了保障性能需要在多值字段上添加gin索引.
7678

7779
外键相关参考信息:
7880

0 commit comments

Comments
 (0)