Laws regarding purchasing "pistol" ammunition are unenforcable. I'm 20 years old and buy .44 magnum ammunition. This round is a rifle round in my book, but just happens to fit my pistol. What rounds are you looking for? There are many 9mm rifles. I haven't seen any .38 rifles, but I'm sure there are a few. If you happen to have a pistol that fires a rifle round, it can't be proven legally that it's anything other than a coincidence.
On the other hand, I've fired a .30-30 pistol. Does that mean that .30-30 ammo should be restricted under "pistol" ammo?
"Void for vagueness" seems applicable here.
Usually the restriction is store policy, though.