Whenever any judicial officer sitting as a court of inquiry binds over a defendant to appear at an appropriate court to answer any charge, it shall be the duty of the judicial officer to write on the warrant the names of each witness for the state who appeared at the commitment hearing.
OCGA § 17-7-31