postgresTypeRegistry function
TypeRegistry
postgresTypeRegistry()
Native calendar values and UTC instants, without integer overflow. Local calendar types cover PostgreSQL's full finite range; UTC instants additionally respect Dart DateTime's range. Pass this registry to PoolSettings before borrowing a pool with PostgresDriver.borrow(temporal: true).
Implementation
pg.TypeRegistry postgresTypeRegistry() => pg.TypeRegistry(
codecs: {
pg.Type.date.oid!: _TemporalCodec('date'),
pg.Type.time.oid!: _TemporalCodec('time'),
pg.Type.timestampWithoutTimezone.oid!: _TemporalCodec('local_datetime'),
pg.Type.timestampWithTimezone.oid!: _TemporalCodec('instant'),
},
);