
42 Cal.App.2d 178 (1940)
GEORGE E. DUKE, Appellant,
v.
THE JUSTICE'S COURT OF THE CITY OF BERKELEY et al., Respondents.
Civ. No. 11209. 
California Court of Appeals. First Appellate District, Division One.  
December 30, 1940.
 Charles H. Seccombe for Appellant.
 Nathan G. Gray for Respondent.
 Knight, J.
 Plaintiff appeals from a judgment entered after trial on the merits denying him a peremptory writ of prohibition. The appeal was taken on the judgment roll, and *179 the facts appearing therefrom are these: On June 5, 1933, a money judgment was entered against appellant in the Justice's Court of the City of Berkeley, from which no appeal was taken; and on March 14, 1939, the judgment creditor presented a motion based on section 685 of the Code of Civil Procedure to have said judgment enforced and carried into execution. Appellant contested the motion, and at the conclusion of the hearing the motion was granted. On the following day, March 15, 1939, appellant instituted this proceeding in prohibition to restrain said justice's court and the presiding justice thereof from taking any further proceedings in the matter; but on the same day also, said justice's court, pursuant to the order granting said motion, issued a writ of execution, which was still outstanding at the time of the trial herein. The writ was issued, so the trial court found, without knowledge of the pendency of the prohibition proceeding.
 Respondent, Justice's Court of the City of Berkeley, is a justice's court of class A (sec. 81, Code Civ. Proc.). Its territorial jurisdiction extends over the entire city, which at all times herein mentioned had a population of more than 30,000; and section 685 of the Code of Civil Procedure provides as follows: "In all cases the judgment may be enforced or carried into execution after the lapse of five years from the date of its entry, by leave of the court, upon motion, and after due notice to the judgment debtor accompanied by an affidavit or affidavits setting forth the reasons for failure to proceed in compliance with the provisions of section 681 of this code. ..." The theory upon which appellant sought to obtain the writ of prohibition was that said justice's court was without jurisdiction to entertain or grant a motion under the provisions of the foregoing section.
 [1-3] We are of the opinion that the trial court's decision denying the writ is sustainable on any one of three grounds: First, a writ of prohibition may be resorted to only as a method of restraining the exercise of judicial functions; that is, to prevent the commission of a future act. It cannot be used to serve the purpose of a writ of certiorari for the review and nullification of a judicial act already performed. Moreover, it is not obtainable to prevent the commission of an act which is merely ministerial (Dunn v. Justice's Court, 136 Cal.App. 269 [28 PaCal.2d 690]; Valentine v. Police Court, 141 Cal. 615 [75 P. 336]; Donner Finance Co. v. Municipal Court, 28 Cal.App.2d 112 [81 PaCal.2d 1054]; sec. 1102, *180 Code Civ. Proc.; 21 Cal.Jur., p. 581). Here the judicial function the justice's court was called upon to exercise was to hear and determine the motion to enforce the judgment and carry it into execution; and that function was fully exercised and completed on March 14, 1939, when said court entered its order granting the motion. The issuance of the writ of execution on the following day was a ministerial act (Donner Finance Co. v. Municipal Court, supra; Dunn v. Justice's Court, supra); and in fact such act had been fully performed before respondents were aware of the pendency of the prohibition proceeding. Therefore, in that state of the record, it would have been idle to grant a peremptory writ of prohibition, because there was no judicial function about to be exercised by respondents which the writ could have restrained.
 [4] Secondly, a writ of prohibition will not lie where there is a plain, speedy and adequate remedy by way of appeal (Dunn v. Justice's Court, supra; Valentine v. Police Court, supra; Plocher v. Superior Court, 135 Cal.App. 337 [26 PaCal.2d 841]); and obviously appellant was afforded such remedy by sections 975 and 978 of the Code of Civil Procedure. The former section provides that a party dissatisfied with any special order made after judgment in a civil action in a police or justice's court may appeal therefrom in the manner provided in the preceding section; and section 978 declares that when an appeal is taken from an order made after judgment "the perfecting of the appeal from such order stays proceedings in a justice's or police court upon said order".
 [5] Thirdly, by virtue of the provisions of section 34 of the Code of Civil Procedure, as re-enacted in 1933 effective August 21, 1933, said section 685 is made applicable to all trial courts. In terms it provides: "The provisions of this code relating to the commencement and prosecution of, and the practice, procedure, and enforcement of judgments and decrees in, actions and proceedings in trial courts, shall apply to all such courts, except where special provision is made for particular courts, or where a general provision is not applicable by reason of jurisdictional limitations." And prior to the effective date of the foregoing section the provisions of section 685 were made available to municipal courts and to justices' courts in cities having a population of 30,000 or more, by virtue of sections 831d and 831h of said code. The former, with certain exceptions not pertinent here, provided: "The rules of pleading and practice applicable to the prosecution *181 of civil actions and enforcement of judgments in the superior court of this state shall apply to and govern the prosecution and maintenance of civil actions and enforcement of judgments in the municipal courts of this state ..."; whereas section 831h, governing justices' courts in cities having a population of 30,000 or more, in turn provided: "... the rules of pleading and practice applicable to the prosecution of civil actions and enforcement of judgments in the municipal courts of this state shall apply to and govern the prosecution and maintenance of civil actions and enforcement of judgments in said justices' courts." (All italics ours.) From the foregoing it will be seen that the Justice's Court of the City of Berkeley continuously from the time of the rendition of the judgment against appellant to and including the time of the granting of the order in question was vested with full statutory authority to exercise the powers and grant the relief embodied in said section 685. The case of Teel v. Justice's Court, 134 Cal.App. 109 [24 PaCal.2d 899], relied on by appellant, was decided September 6, 1933, and dealt with the law as it stood prior to the re-enactment of said section 34 and the repeal of Part 2, Title XI of the Code of Civil Procedure, which included section 901, upon which the decision in that case turned; and nothing appears in the decision therein indicating that, as here, the judicial township of the justice's court there involved had a population of 30,000 or more, so as to bring it within the purview of section 831h as in force prior to its repeal in 1933. It is apparent, therefore, that the decision in that case is not here controlling.
 For the reasons and upon the grounds stated, the judgment is affirmed.
 Peters, P. J., and Ward, J., concurred.
