Paul Neuhaus, a reference librarian at Santa Clara University, has assembled a wiki of state laws on the confidentiality of library records. This is a great resource providing instant access to the relevant statutes, such as New York’s:
New York State Statutes
Section 4509. Library [fig 1] records.
Library records, [fig 1] which contain names or other personally identifying details regarding the users of public, free association, school, college and university libraries and library systems of this state, including but not limited to records related to the circulation of library materials, computer database searches, interlibrary loan transactions, reference queries, requests for photocopies of library materials, title reserve requests, or the use of audio-visual materials, films or records, shall be confidential and shall not be disclosed except that such records may be disclosed to the extent necessary for the proper operation of such library and shall be disclosed upon request or consent of the user or pursuant to subpoena, court order or where otherwise required by statute.
[via LibraryLaw Blog]