Building a railing around the edge of a deck or above ground pool is a great project for the hobby DIY person, it combines carpentry and building within a relatively easy project that is both useful and extremely satisfying to build.
In some localities a deck or above ground platform that is 40 inches high requires a railing to prevent accidental falls over the edge, high enough to cause broken bones in most people, or at the very least a serious strain.
Building a railing on a platform that was not designed to take one can be challenging, and may require a fair bit of modification to fit the posts. Most of the strength of a railing is in the posts, so the timber needs to be strong, a minimum of 3×4, straight, and securely attached.
The base of the post needs to be attached to the joist of the deck, which may require removing the finishing timber and cutting into the deck boards to provide access for the posts. Cut away a third of the post at its base so that it partially sits on the joist, then bolt thru the side of the post and joist below the cut.
It is very important that if posts are not vertical, perhaps leaning out a few degrees, that they are bolted to the deck joists with at least four bolts in a two two or zigzag pattern. Fully vertical posts may be quite secure with just two or three bolts, although local regulations may alter this.
Space the posts for the railing no more than two yards apart, ensuring that the top and bottom of the posts are identically spaced. Add two or three 1×3 or 1×6 horizontal railings which need to be nailed or screwed to the posts, making sure the top rail sits slightly above the top of the post, and allowing enough tongue for a decorative rail to be pressed down onto it.