support reflection of Postgresql INTERVAL types including the full set of discriminators

Issue #3959 resolved
lv created an issue

as mentioned Ilja Everilä according to this code,

there is only 'interval': INTERVAL, 'interval year to month': INTERVAL, 'interval day to second': INTERVAL, and no others
YEAR
MONTH
DAY
HOUR
MINUTE
SECOND
YEAR TO MONTH
DAY TO HOUR
DAY TO MINUTE
DAY TO SECOND
HOUR TO MINUTE
HOUR TO SECOND
MINUTE TO SECOND

types of interval ?

found 460 ticket but there only two additional types 'interval year to month', 'interval day to second'

Comments (5)

  1. Mike Bayer repo owner

    workaround for pre-1.2 is to populate sqlalchemy.dialects.postgresql.base.ischema_names at import time with the additional values your application needs to reflect.

  2. Mike Bayer repo owner

    Support Postgresql INTERVAL fields spec/reflection

    Added support for all possible "fields" identifiers when reflecting the Postgresql INTERVAL datatype, e.g. "YEAR", "MONTH", "DAY TO MINUTE", etc.. In addition, the :class:.postgresql.INTERVAL datatype itself now includes a new parameter :paramref:.postgresql.INTERVAL.fields where these qualifiers can be specified; the qualifier is also reflected back into the resulting datatype upon reflection / inspection.

    Change-Id: I33816e68c533b023e0632db6f4e73fefd2de4721 Fixes: #3959

    → <<cset b39b6023c57b>>

  3. Log in to comment