Data Types
- Last Updated: September 2, 2020
- 1 minute read
- DataDirect Connectors
- ODBC
- Cloudera Impala 7.1
- dBase 7.1
- Flat files/Text 7.1
- MySQL 7.1
- Pervasive (Btrieve) 7.1
- XML 7.1
- Documentation
The following table shows how the Greenplum data types are mapped to the standard ODBC data types.
| Greenplum | ODBC |
|---|---|
| Bigint | SQL_BIGINT |
| Bigserial | SQL_BIGINT |
| Bit1 | SQL_BIT |
| Bit varying | SQL_VARBINARY |
| Boolean | SQL_BIT |
| Bytea | SQL_VARBINARY |
| Character | SQL_CHAR |
| Character varying | SQL_VARCHAR |
| Citext2,3 | SQL_LONGVARCHAR |
| Date | SQL_TYPE_DATE |
| Double Precision | SQL_DOUBLE |
| Float | SQL_REAL |
| Integer | SQL_INTEGER |
| Money | SQL_DOUBLE |
| Name | SQL_VARCHAR |
| Numeric4 | SQL_NUMERIC |
| Real | SQL_REAL |
| Serial | SQL_INTEGER |
| Smallint | SQL_SMALLINT |
| Text | SQL_LONGVARCHAR |
| Time5 | SQL_TYPE_TIME |
| Timestamp | SQL_TYPE_TIMESTAMP |
| Timestamp with timezone 6 | SQL_VARCHAR |
| Tinyint | SQL_SMALLINT |
| Wchar | SQL_CHAR |
| Wvarchar | SQL_VARCHAR |
See Retrieving Data Type Information for more information about data types.
1 Bit maps to SQL_BIT when the length for the bit is 1. If the length
is greater than 1, the driver maps the column to SQL_BINARY.
2 The Citext data type behaves the
same as the Text data type, except that it is case-insensitive. The select operations
performed on Citext columns return case-insensitive results.
3 Supported for Greenplum versions 5.3 and
higher.
4 Numeric maps to SQL_NUMERIC if the precision of the Numeric is
less than or equal to 38. If the precision is greater than 38, the driver maps the column to
SQL_VARCHAR.
5 Time mapping changes based on the setting of the Fetch TWFS as
Time option.
6 Timestamp with timezone mapping changes based
on the setting of the Fetch TSWTZ as Timestamp option.