
88 Cal.Rptr.2d 530 (1999)
74 Cal.App.4th 950
Albert Gary ALT, Petitioner,
v.
The SUPERIOR COURT of Shasta County, Respondent;
The People et al., Real Parties in Interest.
No. 3 Crim. C031558.
Court of Appeal, Third District.
September 7, 1999.
*531 Michael L. Jones for Petitioner.
No appearance for Respondent.
Bill Lockyer, Attorney General, Davis P. Druliner, Acting Chief Assistant Attorney General, Robert R. Anderson, Senior Assistant Attorney General, W. Scott Thorpe, Supervising Deputy Attorney General, Wayne K. Strumpfer, Deputy Attorney General for Real Parties In Interest.
DAVIS, Acting P.J.
In this writ of mandate proceeding, a police officer, Albert Gary Alt (Alt), seeks discovery of the personnel records of a fellow officer, Duane Morrison (Morrison). This matter arose after Morrison accused Alt of having engaged in insurance fraud. Citing Evidence Code section 1047 (prohibiting disclosure of records of peace officers not present during arrest or having no contact between arrest and booking), the trial court denied Alt's request for discovery of Morrison's records. (All further references to undesignated sections are to the Evidence Code unless otherwise indicated.)
We issued an alternative writ (order to show cause). We shall now issue a peremptory one. We conclude that section 1047 constitutes a specific exemption from the general discovery provisions of sections 1043 and 1045. Section 1047 applies if the request for discovery involves an issue concerning an arrest or a post-arrest/pre-booking incident or their functional equivalent; the section prohibits from discovery under sections 1043 and 1045, personnel records for peace officers who were not present during the arrest or who had no contact with the party seeking disclosure between the arrest and the booking.
In other words, we read section 1047 as setting forth a specific prohibition on discovery where the request for discovery involves an issue concerning a particular incident. We do not read the section, as the trial court effectively did, as setting forth a general standard for obtaining discoverythat is the job of sections 1043 and 1045. Since Alt's request for discovery does not involve an issue concerning his arrest or any conduct between his arrest and booking or any functionally equivalent incident, the specific prohibition on discovery set forth in section 1047 does not apply. Instead, the general discovery provisions of section 1043 and 1045 govern, and we direct the trial court to consider Alt's request in light of those sections.[1]

BACKGROUND
In his petition for writ of mandate, Alt alleges that Morrison informed the district attorney that Alt had filed a false insurance claim involving two saddles supposedly stolen from Alt in a burglary. According to Alt's petition, Morrison told the district attorney he was a friend of Alt's but he had to report the crime as a matter of integrity. Charges have now been levied against Alt.
*532 Alt moved to obtain information from Morrison's personnel records pursuant to what is commonly referred to as a "Pitchess motion" (after Pitchess v. Superior Court (1974) 11 Cal.3d 531, 113 Cal. Rptr. 897, 522 P.2d 305, the seminal decision in this area (Pitchess)). Alt supported his request with a declaration from his counsel. The declaration stated that Morrison had filed a sexual harassment complaint against Alt containing several false allegations; that Alt had complained against Morrison's work habits when the two of them had been assigned as partners (prior to the allegation of insurance fraud); that other officers had made similar complaints against Morrison (and Alt was questioned as a witness about the validity of these complaints); and that Morrison had made false complaints against other officers in retribution. Alt sought information from Morrison's personnel records to show that he (Alt) and Morrison were not friends, that he would not have confided in Morrison, and that Morrison had a motive to lie regarding the alleged insurance fraud.

DISCUSSION
In 1978, the California Legislature codified the privileges and discovery procedures comprising so-called "Pitchess motions" by enacting Penal Cod sections 832.7 and 832.8 and Evidence Code sections 1043 through 1045. (City of San Jose v. Superior Court (1993) 5 Cal.4th 47, 50-51, 19 Cal.Rptr.2d 73, 850 P.2d 621 (City of San Jose); City of Santa Cruz v. Municipal Court (1989) 49 Cal.3d 74, 81, 260 Cal.Rptr. 520, 776 P.2d 222 (City of Santa Cruz); Stats.1978, ch. 630, §§ 1-3, 5, 6, pp. 2082-2083.) (In Pitchess, the court held that a criminal defendant's fundamental right to a fair trial entitles a defendant, who is asserting self-defense to a charge of battery on the police officer who arrested him, to discovery of police personnel records. (11 Cal.3d at pp. 535-538, 113 Cal.Rptr. 897, 522 P.2d 305.))[2]
*533 The Penal Code provisions define "personnel records" (Pen.Code, § 832.8) and provide that such records are "confidential" and subject to discovery only pursuant to the procedures set forth in the Evidence Code (Pen.Code, § 832.7). (City of Santa Cruz, supra, 49 Cal.3d at pp. 81-82, 260 Cal.Rptr. 520, 776 P.2d 222.)
Sections 1043 and 1045 of the Evidence Code detail the discovery procedures. (City of Santa Cruz, supra, 49 Cal.3d at p. 82, 260 Cal.Rptr. 520, 776 P.2d 222.) Section 1043 requires a written motion to the court upon written notice to the government agency which has custody of the records sought, supported by an affidavit showing good cause for the discovery including "the materiality [of the discovery sought] to the subject matter involved in the pending litigation." (§ 1043, subd. (b)(3).) Once good cause for discovery has been established, section 1045 requires the court to examine the information in camera to determine its relevance to the case at issue; as part of this in camera process, the court must exclude from disclosure certain categories of information, including complaints more than five years old, the conclusions of any officer investigating a complaint, and facts that are so remote as to make disclosure of little or no practical benefit. (City of Santa Cruz, supra, 49 Cal.3d at p. 83, 260 Cal.Rptr. 520, 776 P.2d 222; People, v. Memro (1985) 38 Cal.3d 658, 679, 214 Cal.Rptr. 832, 700 P.2d 446 (Memro); People v. Superior Court (Gremminger) (1997) 58 Cal.App.4th 397, 403, 67 Cal.Rptr.2d 910.) Section 1045 also establishes general criteria to guide the court's determination and ensure that the privacy interests of the officers subject to the motion are protected. (City of Santa Cruz, supra.)
"The statutory scheme thus carefully balances two directly conflicting interests: the peace officer's just claim to confidentiality, and the criminal defendant's equally compelling interest in all information pertinent to his defense." (City of Santa Cruz, supra, 49 Cal.3d at p. *534 84, 260 Cal.Rptr. 520, 776 P.2d 222; see also Gremminger, supra, 58 Cal.App.4th at pp. 403-404, 67 Cal.Rptr.2d 910.)
"It is significant that [sections 1043 and 1045] do not limit discovery of [peace officer personnel] records to cases involving altercations between police officers and arrestees, the context in which Pitchess arose." (Memro, supra, 38 Cal.3d at p. 679, 214 Cal.Rptr. 832, 700 P.2d 446.)
That brings us to the statute at issue heresection 1047. Section 1047 was added to the statutory scheme in 1985, along with section 1046, and provides: "Records of peace officers, including supervisorial peace officers, who either were not present during the arrest or had no contact with the party seeking disclosure from the time of the arrest until the time of booking, shall not be subject to disclosure."[3]
The real parties in interest herethe City of Redding, presumably the custodian of the personnel records sought, and the People in the underlying criminal action against Alt (collectively, City)interpret section 1047 as setting forth a general condition for obtaining discovery. Under this view, since Morrison was neither present during Alt's arrest nor had any contact with Alt from the time of the arrest to the booking, Morrison's personnel records simply cannot be obtained in discovery. The trial court interpreted section 1047 in this way.
Alt interprets section 1047 as setting forth a specific discovery exemption from the general discovery provisions of sections 1043 and 1045. Under this view, since the request for Morrison's records is not based on an excessive force arrest or similar incident, this specific discovery exemption does not apply. Instead, the general discovery provisions of sections 1043 and 1045 apply.
We conclude that Alt has it right for the most part (our only caveat is that section 1047 speaks in terms of an arrest rather than in terms of an excessive force arrest).
Our function in interpreting a statute is to ascertain the intent of the Legislature so as to effectuate the purpose of the law. (Rudd v. California Casualty Gen. Ins. Co. (1990) 219 Cal.App.3d 948, 952, 268 Cal.Rptr. 624.) We first turn to the words of the statute. We must read the language in the context of the statutory framework as a whole. (Ibid.) When a statute is ambiguous, we can use extrinsic aids like legislative history to help determine legislative intent. (City of San Jose, supra, 5 Cal.4th at p. 54, 19 Cal.Rptr.2d 73, 850 P.2d 621; Morse v. Municipal Court (1974) 13 Cal.3d 149, 156, 118 Cal. Rptr. 14, 529 P.2d 46)
The language of section 1047, read in light of the statutory framework, prohibits discovery where the request for discovery involves an issue concerning a particular incident. The particular incident is an arrest or the conduct between the arrest and booking, and discovery of personnel records of officers not involved in that arrest or conduct is prohibited. We have previously adhered to this view: in Davis v. City of Sacramento (1994) 24 Cal.App.4th 393, 29 Cal.Rptr.2d 232, we stated that "section 1047 prohibits discovery of police department personnel records for officers not involved in the incident giving rise to particular litigation." (24 Cal.App.4th at p. 400, 29 Cal.Rptr.2d 232.) Read in this manner, the discovery prohibition of section 1047 does not apply here because Alt is not requesting discovery based on his arrest or on any conduct between his arrest and booking.
City reads section 1047 in isolation rather than within its statutory framework, claiming the section is clear on its face. As City explains in its briefing, "section *535 1047 clearly states that for personnel records to be discovered, the officer in question must be one involved in the arrest process of the complainant." Because City reads section 1047 in isolation, it sees the section as setting forth a general condition for obtaining discoveryi.e., the only time personnel records can be discovered is if they concern an officer who was present during the subject arrest or who had some sort of contact with the party seeking disclosure between the arrest and booking.
Reading section 1047 in this way would largely supplant the general discovery standards set forth in sections 1043 and 1045. City's interpretation of section 1047 would mean that police personnel information could be discovered only if there had been an arrest or contact between arrest and booking, and in no other situation. This reading runs counter to Memro's observation that sections 1043 and 1045 do not limit discovery of police personnel records to cases involving altercations between police officers and arrestees. (38 Cal.3d at p. 679, 214 Cal.Rptr. 832, 700 P.2d 446.) Furthermore, this interpretation leads to absurd consequences. To provide but one example, suppose a peace officer shot and killed a person who was not being arrested; according to City's interpretation, since there was no arrest, no personnel records could be obtained. In fact, taking City's interpretation to its logical extremesince a dead person cannot be arrested, City's interpretation would mean that death at the hands of the police would automatically foreclose discovery. We recognized this absurdity in Davis, supra, 24 Cal.App.4th at p. 400, 29 Cal.Rptr.2d 232.
Davis raises a related point which we must consider. Davis involved a man who was shot to death by police during a violent struggle. His wife and children sued for wrongful death. They sought discovery of police personnel records, including the personnel records of a retired deputy sheriff who was to testify as a defense expert; the wife and children argued in part that the discovery prohibition of section 1047 did not apply to the retired officer because that section "was intended to apply only ... where there ha[d] been an arrest," and no arrest had taken place. (24 Cal.App.4th at p. 400, 29 Cal.Rptr.2d 232.) We rejected this argument. (Ibid.)
At first blush, our rejection of the plaintiffs' argument in Davis that the section 1047 discovery prohibition applies only where there has been an arrest would seem to undercut the interpretation we have advanced in this opinion. After all, in this opinion we have interpreted section 1047 as a discovery prohibition that applies essentially to the arrest or booking context. Nevertheless, in Davis, we rejected the plaintiffs' argument in the following terms: "Although the language of Evidence Code section 1047, in particular the reference to `arrest' and `booking,' tends to support plaintiffs' argument the interpretation of that provision for which plaintiffs contend would lead to absurd results. Plaintiffs cannot reasonably argue decedent would not have been arrested on one or more charges had his resistance been overcome before he was shot, or if shot, had the wound not been fatal. Application of Evidence Code section 1047 does not turn on whether a suspect survives a confrontation with police long enough to be arrested." (24 Cal.App.4th at p. 400, 29 Cal.Rptr.2d 232.)
Thus, in Davis, we rejected only the argument that there had to be an actual arrest for the discovery prohibition of section 1047 to apply. We concluded that the functional equivalent of an arrest would suffice as well. We did not make any bold pronouncement in Davis that section 1047 establishes a general condition for obtaining discovery; had we done so, our analysis would have been much differentwe simply would have applied this condition. Instead, we recognized that section 1047 constitutes a discovery prohibition that applies in the context of an arrest or its functional equivalent. (See 2 Witkin, Cal. Evidence (3d ed. 1999 Supplement) *536 Discovery and Production of Evidence, § 1649, p. 465-66 [characterizing Davis's. interpretation of section 1047 as follows: "in wrongful death action arising from police officer's shooting of man in attempt to arrest him, statute applied to personnel records of retired sheriffs officer retained by defendants as expert witness"].) Thus, Davis is not only compatible with, but supports, the interpretation we have advanced here.[4]
We conclude the trial court erred in denying Alt discovery on the basis of section 1047. Section 1047 constitutes a specific prohibition on discovery that does not apply here since Alt's request for discovery does not involve an issue concerning his arrest or any conduct from the time of his arrest to booking or their functional equivalent. Instead, the general discovery provisions of sections 1043 and 1045 apply.

DISPOSITION
We issue a peremptory writ of mandate: we direct the trial court to vacate its denial of Alt's request for discovery based on section 1047 and to consider Alt's request in light of sections 1043 and 1045. The alternative writ is discharged. The stay of the trial proceedings is vacated. Petitioner is awarded his costs.
NICHOLSON, J., and CALLAHAN, J., concur.
NOTES
[1]  Alt's petition for writ of mandate also challenged the trial court's order denying his Penal Code section 995 motion. We previously denied that part of the petition summarily.

The parties stipulated that any psychological or psychiatric records are not in issue. (See sect; 1044.)
[2]  Penal Code section 832.7, subdivision (a), provides in pertinent part:

"Peace officer personnel records and records maintained by any state or local agency pursuant to Section 832.5 [relating to citizen complaints], or information obtained from these records, are confidential and shall not be disclosed in any criminal or civil proceeding except by discovery pursuant to Sections 1043 and 1046 of the Evidence Code."
Penal Code section 832.8 in pertinent part provides:
"As used in Section 832.7, `personnel records' means any file maintained under that individual's name by his or her employing agency and containing records relating to any of the following: [¶] (d) Employee advancement, appraisal, or discipline. [¶] (e) Complaints, or investigations of complaints, concerning an event or transaction in which he or she participated, or which he or she perceived, and pertaining to the manner in which he or she performed his or her duties. [¶] (f) Any other information the disclosure of which would constitute an unwarranted invasion of personal privacy."
Evidence Code section 1043 provides:
"(a) In any case in which discovery or disclosure is sought of peace officer personnel records or records maintained pursuant to Section 832.5 of the Penal Code or information from those records, the party seeking the discovery or disclosure shall file a written motion with the appropriate court or administrative body upon written notice to the governmental agency which has custody and control of the records. The written notice shall be given at the times prescribed by subdivision (b) of Section 1005 of the Code of Civil Procedure. Upon receipt of the notice the governmental agency served shall immediately notify the individual whose records are sought.
"(b) The motion shall include all of the following: [¶] (1) Identification of the proceeding in which discovery or disclosure is sought, the party seeking discovery or disclosure, the peace officer whose records are sought, the governmental agency which has custody and control of such records, and the time and place at which the motion for discovery or disclosure shall be heard, [¶] (2) A description of the type of records or information sought. [¶] (3) Affidavits showing good cause for the discovery or disclosure sought, setting forth the materiality thereof to the subject matter involved in the pending litigation and stating upon reasonable belief that the governmental agency identified has the records or information from the records.
"(c) No hearing upon a motion for discovery or disclosure shall be held without full compliance with the notice provisions of this section except upon a showing by the moving party of good cause for noncompliance, or upon a waiver of the hearing by the governmental agency identified as having the records."
Evidence Code section 1044 provides:
"Nothing in this article shall be construed to affect the right of access to records of medical or psychological history where such access would otherwise be available under Section 996 or 1016."
Evidence Code section 1045 provides:
"(a) Nothing in this article shall be construed to affect the right of access to records of complaints, or investigations of complaints, or discipline imposed as a result of such investigations, concerning an event or transaction in which the peace officer participated, or which he perceived, and pertaining to the manner in which he performed his duties, provided that such information is relevant to the subject matter involved in the pending litigation.
"(b) In determining relevance the court shall examine the information in chambers in conformity with Section 915, and shall exclude from disclosure: [¶] (1) Information consisting of complaints concerning conduct occurring more than five years before the event or transaction which is the subject of the litigation in aid of which discovery or disclosure is sought. [¶] (2) In any criminal proceeding the conclusions of any officer investigating a complaint filed pursuant to Section 832.5 of the Penal Code. [¶] (3) Facts sought to be disclosed which are so remote as to make disclosure of little or no practical benefit.
"(c) In determining relevance where the issue in litigation concerns the policies or pattern of conduct of the employing agency, the court shall consider whether the information sought may be obtained from other records maintained by the employing agency in the regular course of agency business which would not necessitate the disclosure of individual personnel records.
"(d) Upon motion seasonably made by the governmental agency which has custody or control of the records to be examined or by the officer whose records are sought, and upon good cause showing the necessity thereof, the court may make any order which justice requires to protect the officer or agency from unnecessary annoyance, embarrassment or oppression.
"(e) The court shall, in any case or proceeding permitting the disclosure or discovery of any peace officer records requested pursuant to Section 1043, order that the records disclosed or discovered may not be used for any purpose other than a court proceeding pursuant to applicable law."
[3]  Section 1046 states: "In any case, otherwise authorized by law, in which the party seeking disclosure is alleging excessive force by a peace officer in connection with the arrest of that party, the motion shall include a copy of the police report setting forth the circumstances under which the party was stopped and arrested."
[4]  The legislative history of section 1047 also supports our interpretation that the section sets forth a specific prohibition on discovery rather than a general condition for obtaining discovery.

Section 1047 was enacted about three months after the decision in Memro, supra, 38 Cal.3d 658, 214 Cal.Rptr. 832, 700 P.2d 446. (Stats.1985, ch. 539, p.1917.) The defendant in Memro claimed the confession he made in his post-arrest interrogation was coerced through excessive police force; he sought to discover complaints in the personnel records of 16 officers, only 4 of whom had participated in the interrogation. In one part of its decision, the Memro court held that defendant could discover complaints against the 12 noninterrogating officers if he could show a link between the noninterrogating and the interrogating officers such as training or substantial contacts. (38 Cal.3d at pp. 685-687, 214 Cal.Rptr. 832, 700 P.2d 446.)
The legislative history of section 1047 refers to Memro and characterizes the section as exempting from discovery the personnel records of officers not connected with a defendant's arrest or booking. (Legislative Counsel's Digest, AB 1112, ch. 539; August 30, 1985, Letter from Assemblyman Don Rogers to Governor George Deukmejian, p. 1; see also Sen, Cmte. on Judiciary, Report on AB 1112, p. 4.) Witkin goes as far as to say that section 1047 "repudiated [the] part of the Memro holding" regarding the 12 noninterrogating officers. (2 Witkin, Cal. Evidence (3d ed. 1986) Discovery and Production of Evidence, § 1649, p. 1592.) Section 1047 was enacted with section 1046 in the same bill (Assembly Bill 1112), a "bill" characterized in the legislative history as "perta[ing] to cases alleging the use of excessive force by a peace officer in connection with an arrest" and "[a]pplicable to arrest situations only." (Sen. Cmte. on Judiciary, Report on AB 1112, p. 4; § 1046 requires that a request for discovery based on an allegedly excessive force arrest be accompanied by the police report setting forth the circumstances of the arrest.)
