SQL adaptation guide For PostgreSQL 8.x.y, 9.x.y / Data dictionary |
Informix® provides two data types to store dates and time information:
PostgreSQL provides the following data type to store date and time information:
Informix is able to convert quoted strings to DATE / DATETIME data if the string contents matches environment parameters (i.e. DBDATE, GL_DATETIME). As in Informix, PostgreSQL can convert quoted strings to date time data according to the DateStyle session parameter. PostgreSQL always accepts ISO date time strings.
PostgreSQL has the same DATE data type as Informix ( year, month, day ). So you can use PostgreSQL DATE data type for Informix DATE columns.
PostgreSQL TIME(0) WITHOUT TIME ZONE data type can be used to store Informix DATETIME HOUR TO SECOND values. The database interface makes the conversion automatically.
Informix DATETIME values with any precision from YEAR to FRACTION(n) can be stored in PostgreSQL TIMESTAMP(n+1) WITHOUT TIME ZONE columns. The database interface makes the conversion automatically. Missing date or time parts default to 1900-01-01 00:00:00.0. For example, when using a DATETIME HOUR TO MINUTE with the value of "11:45", the PostgreSQL TIMESTAMP value will be "1900-01-01 11:45:00.0".