The incident resulted in a man being taken to hospital.
Kevin Pool, 28, from Dumfries, appeared in private before Sheriff Mark Thorley on Tuesday on a petition containing charges of malicious damage, assault to severe injury, permanent disfigurement and to the danger of life.
A spokesperson for the procurator fiscal at Dumfries said no plea or declaration was made and Pool was committed for further examination.