The best way to build a rail, if that's what you mean is to buy an equally long 2 by 4 and mount the pvc pipe on there. You can do this by drilling up through the 2x4 into the bottom of the pipe so it stays on there. Then, attach a 2x8 or 2x10 on to the end perpendicular to the 2x4, that being the 'feet' of the rail. Then make it sturdy by cutting parts of another 2x4 and screwing it onto the sides on the pipe so the pipe won't move around. Sorta like this
thats for a rail rather low to the ground