A drunken man broke a pool cue over this thigh and ran with it at a garda in an attempt to stab the officer.
Alex Johnston (38) had consumed alcohol, tablets and cannabis and does not remember the incident.
Judge Patricia McNamara ordered a pre-sentence report and adjourned sentencing to April.
The defendant, of Donomore Crescent, Tallaght, admitted before Tallaght District Court to possession of a sharp-ended pool cue handle at Cushlawn Park.
Sgt Michael Ahern said gardai were responding to another matter shortly after 2am last March 30 when they saw a very aggressive male in the middle of the road with a pool cue.
Sgt Ahern said Johnston was lashing out at a vehicle which was driving away and he was trying to chase it.
The sergeant said Johnston broke the pool cue over his thigh and he ran at Gda Mark Shortt with the cue in an attempt to stab him.
Sgt Ahern said Johnston was handcuffed and arrested.
The court heard the defendant has 24 previous convictions.
Defence solicitor Michael Hennessy said Johnston has "no memory of the incident".
Mr Hennessy said the only reason the matter took place was due to Johnston's levels of intoxication, and he had taken "hard liquor, tablets and cannabis".
He said it was "a wake-up call" for Johnston, who has sought treatment.