Informations charged defendants with possession of heroin, two sales of heroin and maintenance of a place for the sale of narcotics in violation of Health and Safety Code, sections 11500 and 11557. Their motions to set aside the informations on the ground that they had not been legally committed by a magistrate (Pen. Code, § 995) were denied and they now seek a writ of prohibition to prevent their trial.
Evidence at the preliminary hearing showed that police officers received information from two informers that defendants were selling narcotics in their apartment. The officers searched the two informers and removed all articles from their clothing. Each of the informers was given $20 in bills dusted with fluorescent powder. The serial numbers *829of the bills were recorded. The officers escorted the informers to defendants’ apartment. The informers entered the apartment separately and in a few minutes returned separately. They were then searched. The bills were gone and each informer had a bindle of heroin. The officers waited in front of the apartment door for about 10 or 15 minutes. Defendant Mitchell opened the door and was immediately placed under arrest. She dropped a package of heroin to the floor. The officers arrested defendant Flynn in the bedroom and found four bindles of heroin on his person. The officers found the bills given to one informer behind one of the dresser drawers, but they did not find the bills given to the other informer. There was fluorescent powder on both of Mitchell’s hands and on Flynn’s finger tips and shirt. On cross-examination the magistrate sustained objections to defendants’ questions seeking to ascertain the names of the informers.
We have concluded that it was error to deny defendants disclosure of the names of the two informers at the preliminary hearing on their cross-examination of the officer who testified to the participation of the informers but that prohibition does not lie to restrain the trial of defendants.
A defendant is entitled at his trial to ascertain on cross-examination the name of an informer who is a material witness on the issue of guilt. (People v. McShann, ante, p. 802 [330 P.2d 33]; People v. Lawrence, 149 Cal.App.2d 435, 450-451 [308 P.2d 821].) The reasons that require disclosure at the trial also require disclosure at the preliminary hearing, for the defendant has the right at such hearing to cross-examine the prosecution’s witnesses (Pen. Code, § 865) and to produce witnesses in his own behalf (Pen. Code, §§ 864, 866). The exercise of these rights at the preliminary hearing may enable the defendant to show that there is no reasonable cause to commit him for trial and thus to avoid the degradation and expense of a criminal trial.
Prohibition does not lie to review rulings of the magistrate on the admissibility of evidence at the preliminary hearing unless the commitment is based entirely on incompetent evidence. (Rogers v. Superior Court, 46 Cal.2d 3, 7-8 [291 P.2d 929].) Defendants do not contend that as a result of the magistrate’s error there is no competent evidence to support a finding of reasonable cause to commit them for trial. (Cf. Priestly v. Superior Court, ante, p. 812 [330 P.2d 39].) It is contended, however, that denial of the right of cross-examination at the preliminary hearing is not only a *830ruling on the admissibility of evidence but the denial of a constitutional right. It is unnecessary to resolve this contention, for there was not such an interference with the right of cross-examination in this case as to justify a writ of prohibition. It does not appear that disclosure of the names of the informers was demanded to enable defendants to discredit the prosecution’s evidence at the preliminary hearing or that they wished to use the informers as witnesses at that hearing. Indeed, defendants’ brief indicates otherwise: “The defendants did not present a defense other than cross-examination in the preliminary hearing. They were not required so to do and this Honorable Court is aware that not only is it rarely done, but would be a foolhardy thing to do.” The value to defendants of disclosure is that it might enable them to obtain information useful in their defense at the trial. It cannot be presumed that the superior' court will erroneously deny disclosure at the trial or fail to grant a continuance if it is necessary to enable defendants to locate and interview the informers in the preparation of their defense. Although the delay incident to such a continuance would have been obviated had the magistrate ruled correctly, his erroneous ruling on the admissibility of evidence does not raise a jurisdictional issue. (Rogers v. Superior Court, supra, 46 Cal.2d at 6-7.) Since there was competent evidence to justify committing defendants and disclosure of the names of the informers can be obtained at the trial, defendants were not prejudiced by the error or deprived of any substantial right. (See Pen. Code, § 1404.)
The alternative writ is discharged and the peremptory writ is denied.
Gibson, C. J., and Sehauer, J., concurred.