A preliminary hearing or preliminary examination, often abbreviated as prelim, PX, or PH, is a hearing in felony cases in which a magistrate decides if there is enough evidence that the case can go to trial.
People v. Gonzalez (2012) 54 Cal.4th 1234, 1267.
Whitman v. Superior Court (1991) 54 Cal.3d 1063.
People v. Adams (1993) 19 Cal.App.4th 412, 432.
People v. Johns (1997) 56 Cal.App.4th 550, 554.
Penal Code 1347
Kicking people out of the courtroom
Exclusion of witnesses
The language of the statute seems to indicate it applies only to people who are witnesses for the preliminary hearing, not to people who could be witnesses at trial or other hearings. The Judges' Benchguide states this unequivocally.
Right to a public trial
Separate from whether witnesses can be excluded is the issue of non-witnesses attending. The defendant has a statutory right under PC868 to a public preliminary examination. (People v. Pompa-Ortiz (1980) 27 Cal.3d 519.) It is a substantial right, as important as the right to counsel, to cross-examine, or to present a defense, so denial of that right is an illegal commitment and subject to a PC995 motion. (Id. at p. 526)
Stroud v. Superior Court (2000) 23 Cal.4th 952 fn. 4.
995 vs review on appeal
People v. Matthews (1986) 183 Cal.App.3d 458 Moon v. Superior Court (2005) 134 Cal.App.4th 152 People v. Coleman (1988) 46 Cal.3d 749
Thus, a writ of prohibition is preferable to review on appeal. (People v. Anderson (2015) 234 Cal.App.4th 1411. Serrato v. Superior Court (1978) 76 Cal.App.3d 459.