PostgreSQL Data Types Overview
Browse PostgreSQL numeric, character, date and time, Boolean, JSON, array, UUID, XML, and other data types with links to detailed guides.
PostgreSQL provides a wealth of data types, including numeric types, character types, date-time types, binary data types, currency types, Boolean types, enumeration types, JSON types, array types, collection types, URL types, UUID types, and XML types, interval type, bit string type, etc. In addition to that, you can also customize composite types.
-
PostgreSQL Characters
This article describes the three character data types in PostgreSQL:CHAR,VARCHAR, andTEXT. -
PostgreSQL Integers
Compare PostgreSQL SMALLINT, INTEGER, and BIGINT ranges and storage sizes; choose a type for columns and identity keys. -
PostgreSQL NUMERIC
Use PostgreSQL NUMERIC or DECIMAL for exact decimal values. Learn precision, scale, rounding, range limits, and when to choose integer or floating-point types. -
PostgreSQL Floating-Point Types
Compare PostgreSQL REAL, DOUBLE PRECISION, and FLOAT. See their storage, precision, ranges, and why these types store approximate values. -
PostgreSQL Boolean
Learn PostgreSQL BOOLEAN (BOOL) values, accepted true/false inputs, NULL handling, IS TRUE vs IS NOT TRUE, defaults, and runnable SQL examples. -
PostgreSQL DATE
PostgreSQL DATE stores calendar dates with day precision. ISO 8601 YYYY-MM-DD is recommended; other accepted formats can depend on DateStyle. -
PostgreSQL TIME
PostgreSQL TIME stores a time of day without a date. Learn its range, precision, input forms, and how it differs from time with time zone. -
PostgreSQL TIMESTAMP
PostgreSQL TIMESTAMP stores date/time fields without zone conversion; TIMESTAMPTZ stores a UTC instant and displays it in the session time zone. -
PostgreSQL INTERVAL
PostgreSQL INTERVAL stores time periods using year, month, day, and time fields; learn its type syntax, ISO 8601 input, precision, and output styles. -
PostgreSQL Arrays
This article describes how to use arrays to store multiple values in PostgreSQL. -
PostgreSQL JSON
This article describes how to use the JSON type in PostgreSQL and show you some useful functions for working with JSON data. -
PostgreSQL UUID
Learn PostgreSQL UUID storage, native UUIDv4 and UUIDv7 generation in PostgreSQL 18, and how to use a UUID as a primary key. -
PostgreSQL HSTORE
The PostgreSQLHSTOREdata types are used to store data of key-value pair type. -
PostgreSQL Enum
This article describes the PostgreSQL enum data type and its usage. -
PostgreSQL Range
This article introduces what is PostgreSQL range data type and how to use PostgreSQL range data type. -
PostgreSQL CREATE TYPE
This article will discuss how to create own data types in PostgreSQL.