An indictment, accusation or information may be amended by the district attorney, and an amended complaint may be filed by the prosecuting attorney, without leave of court at any time before the defendant pleads or a demurrer to the original pleading is sustained.
The court in which an action is pending may order or permit an amendment of an indictment, accusation or information, or the filing of an amended complaint, for any defect or insufficiency, at any stage of the proceedings, or if the defect in an indictment or information be one that cannot be remedied by amendment, may order the case submitted to the same or another grand jury, or a new information to be filed. The defendant shall be required to plead to such amendment or amended pleading forthwith, or, at the time fixed for pleading, if the defendant has not yet pleaded and the trial or other proceeding shall continue as if the pleading had been originally filed as amended, unless the substantial rights of the defendant would be prejudiced thereby, in which event a reasonable postponement, not longer than the ends of justice require, may be granted. An indictment or accusation cannot be amended so as to change the offense charged, nor an information so as to charge an offense not shown by the evidence taken at the preliminary examination. A complaint cannot be amended to charge an offense not attempted to be charged by the original complaint, except that separate counts may be added which might properly have been joined in the original complaint. The amended complaint must be verified but may be verified by some person other than the one who made oath to the original complaint.
Ca. Pen. Code § 1009