Data type conversion table

Table 1. Data type conversion table (Informix® vs. PostgreSQL)
Informix data types PostgreSQL data types (before 8.4) PostgreSQL data types (since 8.4)
CHAR(n) CHAR(n) CHAR(n)
VARCHAR(n[,m]) VARCHAR(n) VARCHAR(n)
LVARCHAR(n[,m]) VARCHAR(n) VARCHAR(n)
NCHAR(n) N/A N/A
NVARCHAR(n[,m]) N/A N/A
BOOLEAN BOOLEAN BOOLEAN
SMALLINT INT2 INT2
INT / INTEGER INT4 INT4
BIGINT BIGINT BIGINT
INT8 BIGINT BIGINT
SERIAL[(start)] INTEGER (see notes) INTEGER (see notes)
BIGSERIAL[(start)] BIGINT (see notes) BIGINT (see notes)
SERIAL8[(start)] BIGINT (see notes) BIGINT (see notes)
DOUBLE PRECISION / FLOAT[(n)] FLOAT4 FLOAT4
REAL / SMALLFLOAT FLOAT8 FLOAT8
NUMERIC / DEC / DECIMAL(p,s) DECIMAL(p,s) DECIMAL(p,s)
NUMERIC / DEC / DECIMAL(p) DECIMAL (no precision = floating point) DECIMAL (no precision = floating point)
NUMERIC / DEC / DECIMAL DECIMAL DECIMAL
MONEY(p,s) DECIMAL(p,s) DECIMAL(p,s)
MONEY(p) DECIMAL(p,2) DECIMAL(p,2)
MONEY DECIMAL(16,2) DECIMAL(16,2)
DATE DATE DATE
DATETIME HOUR TO SECOND TIME(0) WITHOUT TIME ZONE TIME(0) WITHOUT TIME ZONE
DATETIME q1 TO q2 (different from above) TIMESTAMP(p+1) WITHOUT TIME ZONE TIMESTAMP(p+1) WITHOUT TIME ZONE
INTERVAL YEAR[(p)] TO MONTH CHAR(50) INTERVAL YEAR TO MONTH
INTERVAL YEAR[(p)] TO YEAR CHAR(50) INTERVAL YEAR
INTERVAL MONTH[(p)] TO MONTH CHAR(50) INTERVAL MONTH
INTERVAL DAY[(p)] TO FRACTION(n) CHAR(50) INTERVAL DAY TO SECOND(n)
INTERVAL DAY[(p)] TO SECOND CHAR(50) INTERVAL DAY TO SECOND(0)
INTERVAL DAY[(p)] TO MINUTE CHAR(50) INTERVAL DAY TO MINUTE
INTERVAL DAY[(p)] TO HOUR CHAR(50) INTERVAL DAY TO HOUR
INTERVAL DAY[(p)] TO DAY CHAR(50) INTERVAL DAY
INTERVAL HOUR[(p)] TO FRACTION(n) CHAR(50) INTERVAL HOUR TO SECOND(n)
INTERVAL HOUR[(p)] TO SECOND CHAR(50) INTERVAL HOUR TO SECOND(0)
INTERVAL HOUR[(p)] TO MINUTE CHAR(50) INTERVAL HOUR TO MINUTE
INTERVAL HOUR[(p)] TO HOUR CHAR(50) INTERVAL HOUR
INTERVAL MINUTE[(p)] TO FRACTION(n) CHAR(50) INTERVAL MINUTE TO SECOND(n)
INTERVAL MINUTE[(p)] TO SECOND CHAR(50) INTERVAL MINUTE TO SECOND(0)
INTERVAL MINUTE[(p)] TO MINUTE CHAR(50) INTERVAL MINUTE
INTERVAL SECOND[(p)] TO FRACTION(n) CHAR(50) INTERVAL SECOND(n)
INTERVAL SECOND[(p)] TO SECOND CHAR(50) INTERVAL SECOND(0)
INTERVAL FRACTION[(p)] TO FRACTION(n) CHAR(50) INTERVAL SECOND(n)
TEXT TEXT TEXT
BYTE BYTEA BYTEA