i have a table Decision : id, id_request, id_decision, comment, date. a request can be sent many times as long as it is not accepted, once it is accepted it cannot be sent again, so my question is how can create a unique index like this :
CREATE INDEX unique_decision
ON Decision(id_request, id_decision)
where id_decision=1;
id_decision=1 means accepted