PostgreSQL data type
|
JDBC data type
|
ODBC data type
|
BIGINT
|
BIGINT
|
SQL_BIGINT(-5)
|
BIGSERIAL
|
BIGINT
|
SQL_BIGINT(-5)
|
BIT
|
BIT or BINARY
|
SQL_BIT(-7) or SQL_BINARY(-2)
|
BIT VARYING
|
BINARY
|
SQL_BINARY(-2)
|
BOOLEAN
|
BOOLEAN
|
SQL_BIT(-7)
|
BYTEA
|
LONGVARBINARY
|
SQL_LONGVARBINARY(4)
|
CHARACTER
|
CHAR
|
SQL_WCHAR(-8) or SQL_CHAR(1)
|
CHARACTER VARYING
|
VARCHAR
|
SQL_WVARCHAR(-9) or SQL_VARCHAR(12)
|
DATE
|
DATE
|
SQL_TYPE_DATE(91)
|
DOUBLE PRECISION
|
DOUBLE
|
SQL_DOUBLE(8)
|
INTEGER
|
INTEGER
|
SQL_INTEGER(4)
|
NUMERIC
|
NUMERIC
|
SQL_NUMERIC(2)
|
REAL
|
REAL
|
SQL_REAL(7)
|
SERIAL
|
INTEGER
|
SQL_INTEGER(4)
|
SMALLINT
|
SMALLINT
|
SQL_SMALLINT(5)
|
TEXT
|
LONGVARCHAR
|
SQL_WLONGVARCHAR(-10) or SQL_LONGVARCHAR(-1)
|
TIME
|
TIMESTAMP
|
SQL_TYPE_TIME(93)
|
TIME WITH TIMEZONE
|
TIMESTAMP
|
SQL_TYPE_TIMESTAMP(93)
|
TIMESTAMP
|
TIMESTAMP
|
SQL_TYPE_TIMESTAMP(93)
|
TIMESTAMP WITH TIMEZONE
|
TIMESTAMP
|
SQL_TYPE_TIMESTAMP(93)
|
XML
|
SQLXML
|
SQL_WLONGVARCHAR(-10) or SQL_LONGVARCHAR(-1)
|