There's more than one way to do things | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Ah, you were looking for a DEFERRABLE CONSTRAINT, which postpones the constraint-validation to the end of a transaction. So, you'd do (again, postgres):
This lets you mess about with non-unique states for the duration of a transaction. The constraint (here: uniqueness) is only then enforced. I can't imagine MariaDB does not have this functionality but I can't find it in the documentation. (I looked for DEFERRED or DEFERRABLE. The MariaDB docs list 'DEFERRED' as a reserved word but I see no functionality associated with it.) In reply to Re^5: [OT] MySQL recalibrating a sort-index
by erix
|
|