YYYY-MM column type in PostgreSQL
问题 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: Create a string field and build year-month concatenation (2017-01) Create a int field and build year-month concatenation (201701) Create two columns (one year and one month) Create a date column at the beginning of the month (2017-01-01 00:00:00) Something else? The objective is to run queries like (pseudo-SQL)