Hi,
Goerz/Bryant mentions a P.H. for Polizeischule Hannover. The 18 probably represents the unit within the school and 97 is the weapon's number. The fact that the old marking also has the same '97' weapons number and the same PH marking, suggests that a regrouping of units within the school occured and this gun moved from unit 4 to unit 18.
As schools always seem to get surplus crap it doesn't surprise me that this gun does not meet police specifications