What data type mappings are supported when reading from PostgreSQL to Spark using Databricks?
When reading from PostgreSQL to Spark using Databricks, the following data type mappings are supported:

| PostgreSQL type | Spark type |
| --- | --- |
| numeric | DecimalType |
| int2 | ShortType |
| int4 (if not signed) | IntegerType |
| int8, oid, xid, int4 (if signed) | LongType |
| float4 | FloatType |
| double precision, float8 | DoubleType |
| char | CharType |
| name, varchar, tid | VarcharType |
| bpchar, character varying, json, money, point, super, text | StringType |
| bytea, geometry, varbyte | BinaryType |
| bit, bool | BooleanType |
| date | DateType |
| tabstime, time, time with time zone, timetz, time without time zone, timestamp with time zone, timestamp, timestamptz, timestamp without time zone* | TimestampType/TimestampNTZType |
| Postgresql array type** | ArrayType |

*When you read from Postgresql, Postgresql Timestamp is mapped to Spark TimestampType if preferTimestampNTZ = false (default). Postgresql Timestamp is mapped to TimestampNTZType if preferTimestampNTZ = true.

**Limited array types are supported.