I would call the first image a railing, or a handrail.
- railing
a fencelike barrier composed of one or more horizontal rails supported by widely spaced uprights; balustrade.
- handrail
a rail serving as a support or guard at the side of a stairway, platform, etc.
(Dictionary.com)
The second one, I would call it a rack, or a bike rack. It could also be called a stand.
A bicycle parking rack, usually shortened to bike rack and also called a bicycle stand, is a device to which bicycles can be securely attached for parking purposes.
(Wikipedia)
Wikipedia has a few specific names, like U-rack. It says the variant names are Staple and Sheffield rack.