If you were cav,you would get one issued to you.If you're artillery,you have a cannon,so no worries.But infantry,you had to become an officer before you could drop the musket for a saber.But we know that some 2nd Lts carried rifles after they were promoted simply because they didn't have the money for a pistol and saber.Most officers didn't start carrying pistols until they reached senior officer as that was when an officer could afford one.It's not to say that jr officers didn't carry pistols,but it was just not as scene,unless the officer had money or connections.
We know that in some cases,officers would give up the long butterknife for something that shoots.During Sherman's Carolina Campaign,many officers carried regular guns (usually something a little bit better than enlisted weapons),to both give them the fire power and to also help them appear more like enlisted men when guerrilla tactics were being used.
Regulations state that corporals would not carry a sword.Would get in the way of formation.
South Union Guard
"Always carry a flagon of whiskey in case of snakebite, and furthermore always carry a small snake"~W.C. Fields
"When I drink whiskey, I drink whiskey; and when I drink water, I drink water."~Michaleen Flynn 'The Quiet Man'