PostgreSQL data types

This topic defines the data types supported for PostgreSQL databases in the preview release of the PostgreSQL interface feature.

All types except NUMERIC are valid as primary keys, foreign keys, and secondary indexes. FLOAT8 columns used as a key column cannot store NaN values.

Supported PostgreSQL data types Description
bool / boolean Logical Boolean (true/false).
bytea Binary data ("byte array").
double precision / float8 IEEE-754 double-precision binary floating-point format number (8 bytes) (wikipedia link). The PostgreSQL float8 type follows Spanner float64 type semantics.
  • NaNs are sorted before all other non-null values.
  • NaNs are not considered equal.
int An alias for int8. In open-source PostgreSQL, int is a four-byte integer, but in PostgreSQL databases in the preview release of the PostgreSQL interface feature int maps to int8, a signed eight-byte integer.
int8 / bigint Signed eight-byte (64-bit) integer.
numeric / decimal Arbitrary length numeric data. Precision qualifiers (for example, numeric(18,4)) are supported in queries but not currently in CREATE/ALTER TABLE. See Working with NUMERIC data for more information. NUMERIC follows PostgreSQL semantics.
  • NaNs are greater than all non-null values.
  • NaNs are considered equal.
timestamptz / timestamp with time zone Date and time, including time zone.
varchar / text / character varying Variable-length character string. Maximum column width is 2621440.

All other PostgreSQL data types are currently not supported. For example, the following common types are not supported:

  • DATE
  • CHAR