Add NULLS NOT DISTINCT index support (PostgreSQL)#36
Conversation
|
Hey @mr-fatalyst this is just a proposal - there are many postgres features that other dbs don't have, and I totally understand if this is going too far! For dedupe/idempotency in a task queue, I had to write a custom migration to support basically: That enforces: “only one active task for this queue/type/key.” With Useful for one active sync per tenant/resource.. one active scheduled job per logical slot.. singleton queue jobs where optional scope fields can be NULL.. idempotency keys where missing key should still mean “same default key”.. things like that |
Summary
Adds PostgreSQL
NULLS NOT DISTINCTsupport for table-level Oxyde indexes:This lets unique indexes treat NULL values as equal on PostgreSQL 15+.
Changes
Tests
test_migrations_pipeline.py python/oxyde/tests/unit/test_migrations_execution.py