Greens MP Jeremy Buckingham lit up the usually staid NSW upper house on Wednesday, inhaling an electronic cigarette to highlight what he says are holes in laws governing the controversial devices.

Mr Buckingham had been barred from asking the house why there were no laws preventing people from "vaping" e-cigarettes in schools, buses or even in Parliament.

Determined not to let his stunt go up in smoke, Mr Buckingham returned to his seat and pulled the device from his pocket.

He then ignited the battery-powered device, in which a flavoured vapour containing nicotine or other chemicals is heated and inhaled – prompting outrage from the government benches.