Re:SQL X-to-Y
by Footkerchief on Sunday November 01, 2020 @02:18PM
(#24961752)
A Postgres feature I took way too long to discover: exclusion constraints, which is essentially "unique by some function of a column value" instead of "unique by a column value":
https://www.postgresql.org/docs/13/ddl-constraints.html#DDL-...
[ Parent
| on HN ]
Re:SQL X-to-Y
by darksaints on Sunday November 01, 2020 @03:57PM
(#24962448)
You, probably like myself, took way too long to discover them because they have a fairly niche usage and are probably Postgres' least appropriately documented feature. It makes it hard to imagine the ways that it can be used. We should probably do something about that.