But in the case of Ireland there was a definition of marriage written into the constitution, so to have it changed there was a constitutional requirement to put it to a ballot of the Irish people.
And according to all analysts the outcome is already clear, based on among other things by the huge voter turnout and the fact that even usually conservative constituencies have voted Tá/Yes. The only question now seems to be if any of the 43 constituencies will return a Níl/No-vote.
You can follow the counting here Irish referendum - Results by constituency. From there you can click on the detailed listing on the upper left of the page.
An Irish Cabinet minister, Leo Varadkar, who came out as gay at the start of the government's campaign, said: "We're the first country in the world to enshrine marriage equality in our constitution and do so by popular mandate. That makes us a beacon, a light to the rest of the world of liberty and equality. It's a very proud day to be Irish."