title: YYYY-MM column type in PostgreSQL
body: <p>I need to a value associated to a month and a user in a table. And I want to perform queries on it. I don't know if there is a column data type for this type of need. If not, should I:</p>
  
  <ul>
  <li>Create a string field and build year-month concatenation (2017-01)</li>
  <li>Create a int field and build year-month concatenation (201701)</li>
  <li>Create two columns (one year and one month)</li>
  <li>Create a date column at the beginning of the month (2017-01-01 00:00:00)</li>
  <li>Something else?</li>
  </ul>
  
  <p>The objective is to run queries like (pseudo-SQL):</p>
  
  <pre><code>SELECT val FROM t WHERE year_month = THIS_YEAR_MONTH and user_id='adc1-23...';
  </code></pre>