
38 Cal.2d 156 (1951)
THE CITY AND COUNTY OF SAN FRANCISCO et al., Petitioners,
v.
THE SUPERIOR COURT OF THE CITY AND COUNTY OF SAN FRANCISCO, Respondent.
S. F. No. 18442. 
Supreme Court of California. In Bank.  
Dec. 18, 1951.
 Dion R. Holm, City Attorney, and Norman Sanford Wolff, Deputy City Attorney, for Petitioners in S. F. No. 18442.
 Frank J. Hennessy and Kay Kimmell, United States Attorneys, William S. Tyson, United States Solicitor, Bessie Margolin, Assistant United States Solicitor, Kenneth C. Robertson, Regional Attorney, James F. Scott, Senior United States Attorney, Fred N. Howser and Edmund G. Brown, Attorneys General, Hartwell H. Linney, Chief Assistant Attorney General, Wilmer W. Morse and James E. Sabine, Deputy Attorneys General, Sullivan, Roche, Johnson & Farraher, Long & Levitt, George Rugland, Knight, Boland & Riordan, F. Eldred Boland, John H. Riordan and John H. Riordan, Jr., as Amici Curiae on behalf of Petitioners in S. F. No. 18442.
 Knight, Boland & Riordan, F. Eldred Boland, John H. Riordan and John H. Riordan, Jr. for Petitioner in S. F. No. 18443.
 Milton Marks and Milton Marks, Jr., for Respondents.
 SHENK, J.
 The petitioners seek a writ prohibiting the enforcement of an order of the respondent superior court for the inspection of documents and data claimed to be in the records of official proceedings conducted by the Civil Service Commission of the City and County of San Francisco. An alternative writ was issued.
 In September, 1949, several hundred employees of the city and county, representing as well other employees similarly *158 situated, filed in the superior court a petition for the writ of mandate naming as respondents the city and county of San Francisco, its board of supervisors, and its civil service commission. The purpose of the petition was and is to compel the respondents to fix, establish and pay to each of the petitioners and to persons similarly situated for the fiscal year commencing July 1, 1949, and ending June 30, 1950, the rates of compensation for the respective classifications referred to in the petition in accordance with the requirements of section 151 of the charter of the city and county.
 Prior to July 1, 1949, but effective as of that date, the board of supervisors enacted salary standardization and annual salary ordinances providing for schedules of compensation to be paid officers and employees whose compensations were subject to the provisions of section 151 of the charter. That section as amended in 1943 provides that schedules of compensation for municipal employees shall be in accord with the generally prevailing rates of wages for like service and working conditions in private employment or in other comparable governmental organizations in the state. The schedules are required to be recommended by the civil service commission solely on the basis of facts and data obtained in a comprehensive investigation and survey. The commission is required to "set forth in the official records of its proceedings all of the data thus obtained" on the basis of which it makes findings and an order whereby a rate of pay for each classification is recommended to the board of supervisors. The section provides that the salaries and wages paid to employees shall be those fixed in the schedule of compensations adopted by the board as provided by the charter and in accord with the provisions of the ordinance enacted in pursuance thereof.
 It was alleged in the petition filed in the superior court that the commission made such a survey; that the commission transmitted its findings and recommendations to the board and that the salary ordinance was adopted in accordance therewith. The rates of compensation thus adopted for the several classifications were set forth at length. The rates of compensation for employees in the same classifications in private employment and other comparable governmental organizations were also set forth. It was charged that the commission and the board disregarded the generally prevailing rates of wages and that the established schedules were not in accord with the prevailing rates for the period 1949-1950 as required *159 by the charter provisions and as alleged. The adopted rates as to 49 classifications, listed on a comparative basis with those alleged to be prevailing, were stated to be grossly less than rates in private and other governmental employment. The petitioners also sought declaratory relief and the recovery of the difference between the ordinance rates and the alleged prevailing rates in outside employment.
 The defendants answered, making certain denials and admissions. The plaintiffs thereupon moved pursuant to section 1000 of the Code of Civil Procedure for an inspection of all the documents, papers and data including the complete survey in connection with the preparation of the adopted wage schedules. A hearing was had on the motion at which the respondents presented evidence of the confidential nature of the specific data sought to be examined, and the effect of disclosure on the public interest. In making the wage rate survey the commission solicited information from private employers on the written promise and agreement with each that the source of all information supplied would be held in confidence, that the wage scales and other data would not be identified except by a code known only to the commission. The defendants gave testimony to the effect that but for the written agreements and pledges to hold in confidence the source of and identity of the employers furnishing the information, it would be impossible to obtain the voluntary cooperation of the private employers in making the survey. The names of nearly 200 private employers are in the record, as are also the lists of wage rates assumed to have been submitted by them; but unprocurable except by compliance with the order for inspection is the data whereby to identify the employer submitting a specific wage list. It was also shown without conflict that disclosure would foment public disturbance and unrest in industrial employment relations and would interfere with the competitive activities of the employers in private industry.
 The trial court granted the motion for inspection and a stay order was entered for the purpose of permitting the filing of the present applications for the writ of prohibition. The members of the board of supervisors and of the civil service commission joined in filing one application (S. F. No. 18442), and Metropolitan Life Insurance Company, one of the employers affected, filed another application (S. F. No. 18443) for the writ to restrain the enforcement of the *160 order for inspection. Numerous briefs are also on file on behalf of the state personnel board, various employers, and the Secretary of Labor, United States Department of Labor, as amici curiae in support of the application for the writ of prohibition.
 [1] A preliminary question relates to the basis for the issuance of the writ of prohibition. That writ is an appropriate remedy to arrest the proceedings in a court when they are "without or in excess of" its jurisdiction and there is not a plain, speedy and adequate remedy in the ordinary course of law. (Code Civ. Proc.,  1102, 1103.)
 [2] Notwithstanding the fact that the respondent court unquestionably has jurisdiction to grant or deny the motion for inspection, this court may act in a proper case when it appears that otherwise a failure of justice will occur in a matter of public importance by a wrongful or excessive exercise of jurisdiction. The reviewing courts have frequently acted to resolve the problem on jurisdictional grounds where the public interest has indicated the necessity for prompt settlement of the issue. (See Spreckels Sugar Co. v. Industrial Acc. Com., 186 Cal. 256, 260-261 [199 P. 8]; Rodman v. Superior Court, 13 Cal.2d 262, 269-270 [89 P.2d 109]; Fortenbury v. Superior Court, 16 Cal.2d 405, 407-408 [106 P.2d 411]; Rescue Army v. Municipal Court, 28 Cal.2d 460, 466-467 [171 P.2d 8].) Thus the writ of prohibition has been held to lie to prevent the exercise of an unauthorized power in a matter as to which the subordinate tribunal has jurisdiction, no less than where the entire cause is without its jurisdiction; and has also been directed to prevent the enforcement of an order. (Evans v. Superior Court, 14 Cal.2d 563, 579- 581 [96 P.2d 107] and cases cited; Abelleira v. District Court of Appeal, 17 Cal.2d 280, 290-291 [109 P.2d 942, 132 A.L.R. 715].) In Franchise Tax Board v. Superior Court, 36 Cal.2d 538 [225 P.2d 905], the writ was issued to prohibit the enforcement of an order for inspection of tax returns; and in Kohn v. Superior Court, 12 Cal.App.2d 459 [55 P.2d 1186], the writ issued to restrain inspection of private documents as an unauthorized exercise of judicial power in a matter otherwise cognizable by the respondent court.
 In Coldwell v. Board of Public Works, 187 Cal. 510, 522 [202 P. 879], claimed confidential matter had been opened to public inspection and it was held that it had lost its confidential character; and to similar effect is People v. King, *161 122 Cal.App. 50, 57 [10 P.2d 89].) [3] Thus to leave the matter for possible correction on an appeal would be too late, would render that remedy inadequate and would result in a failure of justice. (See, also, Gorbacheff v. Justice's Court, 31 Cal.2d 178, 180 [187 P.2d 407].)
 [4] Tested by these and similar cases no good reason appears justifying the denial of the writ if otherwise the petitioners are entitled to protection against violation of the agreements of confidence. We shall not pause to consider whether the application filed by Metropolitan Life Insurance Company as one of the employers shows that it is entitled to the issuance of the writ. The question might be pertinent were that the only petitioner. But since the issuance of the writ in the proceeding brought by the city and county of San Francisco would inure to the benefit of that petitioner as well as all other employers who furnished information pursuant to the agreements of confidence, the matter does not require further notice.
 Section 1000 of the Code of Civil Procedure deals with the power of the court to permit inspection of documents in the possession of the adverse party or under his control which contain evidence relating to the merits of the action.
 Section 1032 of the Political Code provides that the public records and other matters in the office of any officer are at all times during office hours open to inspection of any citizen. Section 1888 of the Code of Civil Procedure states that all written acts or records of official bodies, tribunals and public officers are public writings. Section 1892 of the same code accords every citizen the right to inspect and take a copy of any public writing of this state except as otherwise expressly provided by statute; and section 1893 requires a public officer to give a certified copy thereof on demand and payment of the fee therefor.
 Section 1881, subdivision 5, of the Code of Civil Procedure, provides the exception to the foregoing by the requirement that a public officer may not be examined as to communications made to him in official confidence when the public interest would suffer by the disclosure. The petitioners invoke protection of the agreements of confidence pursuant to this section.
 The statutory policy of preserving official confidence inviolate has been recognized in appropriate cases. In Runyon *162 v. Board of Prison Terms and Paroles, 26 Cal.App.2d 183 [79 P.2d 101], the writ of mandate was sought for the purpose of inspecting communications made to that board as constituting public records. In denying the writ the court observed the confidential nature of the information bearing upon applicants for parole, some of which necessarily could be obtained only upon the understanding that the persons giving the information would be protected and their communications treated as confidential. The record in the present case without conflict likewise shows that the information could not be obtained from the private employers solicited except upon the express condition and pledge that the identity of the source of the material would be treated as confidential. To like effect are Franchise Tax Board v. Superior Court, supra, 36 Cal.2d 538, where every requested item of information was supplied with the exception of the identity of the individual taxpayers; Whelan v. Superior Court, 144 Cal. 548 [46 P. 468], and People v. King, supra, 122 Cal.App. 50, 56-57. (See, also, Opinions of the Attorney General of California, vol. 1, p. 144; vol. 5, p. 145; vol. 11, p. 41; vol. 13, p. 180; State v. Freedy, 198 Wis. 388 [223 N.W. 861]; Gilbertson v. State, 205 Wis. 168 [236 N.W. 539]; Lee v. Beach Pub. Co., 127 Fla. 600 [173 So. 440].)
 The foregoing and other cases demonstrate that the right of inspection may be curtailed in relation to communications or portions thereof where the public policy, enacted into our statutory law, demands that disclosure be prohibited. It has been well said by the United States Attorney General, now Justice Robert Jackson, (40 Op. Attorney General No. 8, April 30, 1941) that the concern should be to require the keeping of faith with confidential informants as an indispensable condition of future efficiency. The United States Supreme Court in Norwegian Nitrogen Prod. Co. v. United States, 288 U.S. 294 [53 S.Ct. 350, 77 L.Ed. 796], declared that although the plaintiff would be adversely affected it was not entitled to disclosure of information of business details, publication of which would reveal the identity of the manufacturers and might prove useful to competitors, where the information had been secured by public officials under pledges of secrecy. In United States v. Kohler Co. (E.D.Pa., 1949), 9 F.R.D. 289, (13 Fed. Rules Serv. 33,333), voluntary statements to FBI investigators were withheld from inspection since disclosure would seriously prejudice the future usefulness of the bureau and since the information was given *163 in confidence under pledge not to disclose its source. In Federal Life Ins. Co. v. Holod (D.C.Pa. 1939), 29 F.Supp. 852, the Secretary of War was protected from disclosing the defendant's draft records.
 The courts generally have concluded that the public interest in preserving confidential information outweighs in importance the interest of a private litigant in the absence of considerations involving life or liberty. In Gilbertson v. State, supra, 236 N.W. at 541, it was said that in all such situations a choice must be made between policies, each independently desirable; that not only are the courts faced with the necessity of making the choice, but with the extremely delicate question concerning the relation between the courts and other branches of the government; and that the right of the state to preserve the secret may be superior to that of the litigant to compel its disclosure even though he may thereby be handicapped as an unavoidable consequence. It is also here shown by affidavits and otherwise that the recognition of the right of inspection in such cases will have far-reaching adverse effect in other branches of government, both state and federal. In such other branches, as here, the desired information cannot be had at least from private employers without the similar agreements of confidence. Therefore, pending more thorough inquiry into the larger issues presented in the action, the court should not direct the respondent public officials to violate their agreements of confidence where the result may be so far-reaching and harmful and thus disrupt the functions of government both local and national.
 In answer to the contention that the charter provisions should override the agreements of confidence and the policy invoked by the petitioners, it may be said that we are not here determining the effect of the recognition of the agreements of confidence. In this proceeding we are concerned only with the question of the propriety of the respondent court's exercise of its power in granting the motion for inspection of the data relating to the source of the information agreed to be treated as confidential. There is no conflict in the evidence as to the adverse effect of disclosure on the public interest. On the evidence and the law it is concluded that the petitioners are entitled to have the confidential matter deemed privileged under section 1881(5) of the Code of Civil Procedure and that the respondent court misapplied and therefore exceeded its jurisdiction in granting the motion *164 for inspection. What may be the relation of the agreements of confidence to the alleged cause of action or defense is not a matter for consideration at this time. Questions of compliance by the commission and the board of supervisors with the charter requirements are deemed not to be involved in this proceeding. They are more properly to be treated with the larger issues presented in the pending mandamus proceeding. It is therefore not appropriate now to declare what application City & County of San Francisco v. Boyd, 22 Cal.2d 685 [140 P.2d 666], may have in the solution of those issues. The Boyd case involved a question of compliance with the same charter provisions in relation to the controller's refusal to pay wages in accordance with the adopted scale on the ground that it was higher than the prevailing rate. The city prevailed. The question whether compliance is sufficient for the purpose of establishing the validity of the wage scales when questioned by the employees can be decided only on the trial in the mandamus proceeding. Therefore consideration and determination of questions relating to the powers of the commission and the board, the effect of the agreements of confidence on the existence of bases or support for the adopted wage scales, and the validity of the ordinances are not precluded by the language herein nor by the granting of the writ in recognition of the official agreements of confidence. In view of the necessarily restricted issue here, other points do not require notice.
 The application for the peremptory writ of prohibition is granted as prayed.
 Gibson, C.J., Traynor, J., Schauer, J., and Spence, J., concurred.
 Edmonds, J., concurred in the judgment.
 CARTER, J.
 I concur in the result but not the reasoning in the majority opinion. As I understand the opinion, it holds that the court cannot properly compel the civil service commission to include, as a part of its public records, the names of the private employers and the information each gave on his wage scale, in spite of the charter provision ( 151) requiring the commission to "set forth in (its) official records of its proceedings all of the data thus obtained," that is, by its investigation. That result is reached by reasoning that inasmuch as the commission gave a pledge of secrecy, it *165 would be against public policy to compel it to divulge the information. I agree with that result. The opinion goes on to state, however, that it does not decide whether the charter requires the commission to include the information in its official records. It reserves that question for determination in the mandamus proceeding where it might be held that the charter provision compels those matters to be a part of the record, and inasmuch as the commission has not done so, it has not complied with the law (charter) in fixing the rates of pay. Thus on that ground alone the ordinance fixing the wage scale could be set aside. In that manner the commission would be required to keep faith with its pledge of secrecy by the court's refusal to compel it to break its pledge, but still the commission or the city would suffer, for the reason that all its procedure and ordinance fixing wages are a nullity. In other words, the city bears the brunt of the failure of its commission to follow the charter.
 This is an indirect approach for which I see no reason. The charter is clear and specifies that all the data obtained by the commission shall be set forth in its official records, and it should be so held at this time. If it is believed that data obtained by a promise of secrecy should not be used in this case even though the commission had no authority to give such a pledge, the more pertinent basis for such holding is estoppel. That is to say, the one giving the information, having done so on the assurance that it was confidential, may now claim that the city cannot reverse its position and betray that confidence. If it thus will not be permitted to comply with the law, it follows that the wage scale cannot stand, for it is not based upon the public record of the data obtained. The result is that the scale fixed is invalid on that ground alone and the trial court should be so advised to guide its decision in the mandamus action.
 It may be said that City & County of San Francisco v. Boyd, 22 Cal.2d 685 [140 P.2d 666], holds that the commission need not set forth the name of each private employer and his wage scale, but if it does it is incorrect, for it fails to consider the effect of such a ruling. It would mean that there could be no effective review of the commission's action. It is not clear from the face of the opinion, however, that that precise data was omitted from the public records of the commission in the Boyd case.
 My view is that the city is estopped from disclosing the data obtained in confidence, but the ordinance fixing the *166 wage scale, which is based upon said data, is invalid, and we should so hold. However, because of the pledge of secrecy the commission should not be required to divulge the information and therefore its order to the contrary should be made ineffective by prohibition, as is done by the majority opinion.
