Roy Badami <roy(at)gnomon(dot)org(dot)uk> writes:
> Which is where my comment about EXTRACT comes in. They can both be
> stored as 13 months, but EXTRACT (MONTH FROM ...) should return 1
> month or 13 months as appropriate. Surely this isn't a problem, you
> know the type of the interval?
EXTRACT doesn't have access to the typmod of its input, in general.
We associate typmods with stored columns but not with the results
of arbitrary expressions.
regards, tom lane