Postgres generate series of years inclusive of end date year
I have, as part of a larger postgres query, a query whose purpose is to generate each year that exists between two given dates:
Unique constraint with nullable columns in Postgres 14
I am trying to create a hashed column consisting of other column values to use as a unique constraint for a table in PG14. This is a simplified example of what I am going for: