the pvc will be just fine in the rain...considering it is primarily used for water pipes. Dont worry about the wood, you will get bored with the rail before you have to worry about rot.
what the fuck do you think pvc pipes are used for? transporting water adn liquids and shit they will be fine but after a long time the wood would rot for sure