jOOQ binds TIMESTAMP WITH TIME ZONE to java.time.OffsetDateTime by default.
Domains are currently not supported by the jOOQ code generator. You will have to apply a data type rewriting to all relevant columns if you want out-of-the-box behaviour. Why do you need that domain, though? PostgreSQL's TIMESTAMP WITH TIME ZONE type is really just a UTC timestamp... The timezone setting is a configuration parameter: https://www.postgresql.org/docs/current/static/runtime-config-client.html#GUC-TIMEZONE 2018-05-08 14:12 GMT+02:00 Ben Hood <[email protected]>: > Hi Lukas, > > What is the current idiomatic way to bind to a TIMESTAMP WITH TIME ZONE in > Postgres? > > I’ve seen the pointer to implement a Binding > > https://www.jooq.org/doc/3.10/manual/code-generation/custom- > data-type-bindings/ > > So I was wondering if there is an example somewhere for TIMESTAMP WITH > TIME ZONE? > > For reference, my schema has aliased TIMESTAMP WITH TIME ZONE in this way > (to enforce UTC everywhere): > > CREATE DOMAIN UTC_TIMESTAMP AS TIMESTAMP WITH TIME ZONE CHECK > (EXTRACT(TIMEZONE FROM VALUE) = 0); > CREATE TYPE UTC_RANGE AS RANGE ( SUBTYPE = UTC_TIMESTAMP ); > > Cheers, > > Ben > > > > -- > You received this message because you are subscribed to the Google Groups > "jOOQ User Group" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "jOOQ User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
