Hi, On 2026-09-11 14:51:52 -0400, Andres Freund wrote: > While looking at FOR PORTION OF (see [1]), some AI tool noted that FPO can > lead to issues with temporal foreign keys. I don't think the issues were > really related to FPO, hence this new thread.
Grmpf, it also found some stuff in temporal keys: - RelationFindReplTupleByIndex() skips equality checks for primary-key/replica-identity indexes without xs_recheck Temporal keys can use GiST, where a returned candidate need not be an exact match. That can lead to modifying the wrong row, which is ... not good. - The outer constraint scan honors NULLS NOT DISTINCT, but index_recheck_constraint() unconditionally treats an existing NULL as disproving a conflict. That is a problem when needing a recheck. See constraint.sql. Greetings, Andres Freund
constraint.sql
Description: application/sql
