skip to main content
DataDirect Connect Drivers : PostgreSQL Driver : Data Types
  
Data Types
The following table lists the data types supported by the PostgreSQL driver and describes how they are mapped to JDBC data types.
Table 55. PostgreSQL Data Types
PostgreSQL Data Type
JDBC Data Type
Bigint
BIGINT
Bigserial
BIGINT
Bit
BIT or BINARY 1
Bit varying
VARBINARY
Boolean
BOOLEAN
Bytea
LONGVARBINARY
Character
CHAR
Character varying
VARCHAR or LONGVARCHAR 2
Date
DATE
Double precision
DOUBLE
Integer
INTEGER
Numeric
NUMERIC
Real
REAL
Serial
INTEGER
Smallint
SMALLINT
Text
LONGVARCHAR
Time
TIMESTAMP
Time with time zone
TIMESTAMP
Timestamp
TIMESTAMP
Timestamp with time zone
TIMESTAMP
XML 3
SQLXML

1 Bit maps to -7 (BIT) when the length for the bit is 1. If the length is greater than 1, the driver maps the column to BINARY.

2 You may determine how these columns are described by setting the VarcharClobThreshold connection property.

3 The XML data type is supported in PostgreSQL versions 8.3 and higher.

Refer to "getTypeInfo()" in the DataDirect Connect Series for JDBC Reference for more information about data types.