Problem Description Setup In one of the recent services we have developed in my day job, we had a constraint that a device should not have duplicate active entries of the same configuration key in the database. This was initially achieved by a UNIQUE INDEX: CREATE UNIQUE INDEX ON device (id, key) WHERE…