Greg Rychlewski <greg(dot)rychlewski(at)gmail(dot)com> writes:
> My question is: how are the values meant to be interpreted for interval
> types? Thanks very much for your help.
Interval typmods include a fractional-seconds-precision field as well
as a bitmask indicating the allowed interval fields (per the SQL
standard's weird syntax such as INTERVAL DAY TO SECOND). Looking at
the source code for intervaltypmodout() might be helpful:
https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/backend/utils/adt/timestamp.c;h=69fe7860ede062fc8be42e7545b35e69c3e068c4;hb=HEAD#l1136
The referenced macros are mostly in utils/timestamp.h and
utils/datetime.h.
regards, tom lane