Depending On your local code. It might say different.
But this 2010 California Code.
505.6 Temperature, Pressure, and Vacuum Relief Devices. The installation of temperature, pressure, and vacuum relief devices or combinations thereof, and automatic gas shutoff devices, shall be installed in accordance with the terms of their listings and the manufacturer's instructions. A shutoff valve shall not be placed between the relief valve and the water heater or on discharge pipes between such valves and the atmosphere. The hourly Btu discharge capacity or the rated steam relief capacity of the device shall be not less than the input rating of the water heater. [NFPA 54:10.28.5]
608.4 Each pressure relief valve shall be an approved automatic type with drain, and each such relief valve shall be set at a pressure of not more than one-hundred and fifty (150) pounds per square inch (1,034 kPa). No shutoff valve shall be installed between the relief valve and the system or in the drain line.
608.5 Relief valves located inside a building shall be provided with a drain not smaller than the relief valve outlet of galvanized steel, hard-drawn copper piping and fittings, CPVC or listed relief valve drain tube with fittings that will not reduce the internal bore of the pipe or tubing (straight lengths as opposed to coils) and shall extend from the valve to the outside of the building, with the end of the pipe not more than two (2) feet (610 mm) nor less than six (6) inches (152 mm) above ground or the flood level of the area receiving the discharge and pointing downward. Such drains shall be permitted to terminate at other approved locations. Relief valve drains shall not terminate in a buildings crawl space. No part of such drain pipe shall be trapped or subject to freezing. The terminal end of the drain pipe shall not be threaded.