To avoid a de-facto national gun registry, though, the checks need to be destroyed after the sale completes. They were originally destroyed immediately after the sale finalized, but Janet Reno changed the rules to retain the checks for 6 months, ostensibly for two reasons: to police the government (so that unauthorized checks against random non gun-purchasers by corrupt officials could be caught) and to guard against gun purchases made under stolen identities.
Garland’s opinion was that if the law required the records destroyed immediately, Congress would have specified a timeframe. Given the ambiguity of the law, had Garland imposed a timeframe on the government he would have been legislating from the bench.
Not completely true. Brady Bill Sec 3 (3) (i) says: "Prohibitions Relating to Establishment of Registration Systems With Respect to Firearms.--No department, agency, officer, or employee of the United States may...(2) use the system...to establish any system for the registration of firearms, firearm owners, or firearm transactions or dispositions, except with respect to persons prohibited...from receiving a firearm."
You may want to argue that the 180 day rule written by Reno to "guard against gun purchases made under stolen identities" used by prohibited persons, but this kind of registry necessarily ensnares all allowed persons - thus violating the intent of the law. The registration of prohibited persons is specifically covered under 28 CFR 25.9 and is limited to only creating a log of denied transactions.
Your code should be more efficient!