I got the sense that the police were calling for other measures to jail time for this very reason. Maybe more different approaches to rehab and actions to address underlying problems.
In the UK, jail time sometimes gets them off the drugs, but that depends on availability of drugs in prison, which is big problem.
Sounds like lessons could be learned from Portugal.