Re:Postgres 15 improves UNIQUE and NULL
by evv on Monday July 11, 2022 @04:25PM
(#32061327)
Agree its a bit unnatural, but it seems workable. My problem with the auxiliary table is, I wouldn't know how to implement the unique constraint.
[ Parent
| on HN ]
Re:Postgres 15 improves UNIQUE and NULL
by SnowHill9902 on Monday July 11, 2022 @05:26PM
(#32062109)
In your current implementation you either have no unique constraint or it is a more particular case of UNIQUE(ancestor, descendant).