"CN" <cnliou9@fastmail.fm> writes:
> Is creating a function that eats DATE as argument to build that index my
> only solution?
You haven't really explained what your problem is. In general I'd not
guess that "year >= X and month >= Y" is a useful operation if Y is
different from 1. You'd be selecting a very discontinuous set of
dates ...
regards, tom lane