The current issue of the Lancet published a meta-analysis of multiple trials concerning the use of cannabis and its association with mental illness. There were 35 longitudinal studies selected for the analysis. All of them followed patients starting before any mental illness, and included cannabis use as a variable along with many other factors, such as personality, background, use of other drugs. 7 out of 35 trials concerned "psychosis" (ranging from 'mild symptoms' to 'schizophrenia') and were the only ones that showed any connection with cannabis use. Conditions of mental illness such as depression, mood disturbances, or others did not have any connection.
The study's authors rightly point out that there can be no way to say for certain that there is a direct causal link between smoking pot and experiencing at least one major psychotic episode (and the definitions are a bit of a problem for me here as well), but that caution, especially in folks with a personal or family history, is warranted. In the end, I would have to agree -- but this is true of any medicine, really...
There is a brief (6-minute) interview with the study's author here.