you could either paint it or buy pressure treated wood. Pressure treated wood is more expansive than your average piece of wood but it will never rot or corrode or anything.
i saw just build the rail and then when you're done just buy some spray paint and paint it. That way, even if the pvc pipe breaks, the frame will still last and you can just put a new piece of pvc pipe on it.
don't buy pressure treated wood atleast where i live it like 10x more expensive
what i did was just built my rail and then just bought some patio beher (sp?) wood finish that protects it form the sun,water and snow it was like 10 bucks and i still have like 80% of it still (put 3 coats on a 12foot long rail wood) its worked great so far and ya pvc dont last very long i say change it bout every year