PostgreSQL Data Types

PostgreSQL supports various data types, and this page provides a compilation of commonly used data types in PostgreSQL.

  1. bigint

    PostgreSQL bigint is an integer data type provided by PostgreSQL that is typically used to store integers that exceed the range of standard integer types.
  2. bigserial

    bigserial data type is a data type in PostgreSQL database used for automatically generating unique identifiers.
  3. boolean

    The boolean data type in PostgreSQL is used to store boolean values, which represent true or false.
  4. box

    box is a data type in PostgreSQL used to represent a rectangular region on a plane.
  5. char

    The char data type is a data type in PostgreSQL used to store fixed-length strings.
  6. cidr

    cidr is a data type in PostgreSQL used to store IPv4 or IPv6 addresses and subnet masks.
  7. circle

    The PostgreSQL circle data type represents a circle on a plane.
  8. citext

    The citext data type in PostgreSQL is a case-insensitive text type that allows ignoring case when performing text comparisons.
  9. date

    In PostgreSQL, date is a data type used to store date values.
  10. decimal

    In PostgreSQL, decimal is a fixed precision numeric data type that allows storing high-precision numbers with specified precision and scale.
  11. double precision

    The PostgreSQL double precision data type is a floating-point number with a precision of 15-17 digits, offering higher precision and a wider range compared to the float data type.
  12. enum

    The PostgreSQL enum data type is a data type used to define enumerated types.
  13. inet

    The PostgreSQL inet data type is used for storing and processing IPv4 or IPv6 addresses.
  14. integer

    In PostgreSQL, integer is used to define the integer data type.
  15. interval

    The PostgreSQL interval data type represents the difference between two dates or times.
  16. json

    The PostgreSQL json data type can be used to store and query unstructured data.
  17. jsonb

    The PostgreSQL jsonb data type can be used to store and query unstructured data.
  18. line

    In PostgreSQL, the line data type can be used for storing and querying spatial data.
  19. lseg

    In PostgreSQL, the lseg data type can be used for storing and querying spatial data.
  20. numeric

    The PostgreSQL numeric data type is used to store numbers with arbitrary precision.
  21. path

    PostgreSQL path can store paths in two-dimensional planes, such as curves or polylines composed of multiple line segments.
  22. point

    The PostgreSQL point type is a data type in PostgreSQL used to store points in a two-dimensional Cartesian coordinate system.
  23. polygon

    PostgreSQL polygon data type is used to store closed planar polygons.
  24. real

    The real data type in PostgreSQL is a floating-point type that can store single-precision floating-point numbers (32 bits).
  25. serial

    The serial data type in PostgreSQL is a special data type used for automatically generating sequential numbers.
  26. smallint

    In PostgreSQL, smallint is a fixed-length integer data type used to store integers in the range of -32768 to 32767.
  27. text

    In PostgreSQL, the text data type is used to store variable-length strings.
  28. time

    In PostgreSQL, the time data type is used to store time values, including hours, minutes, seconds, and microseconds.
  29. timestamp

    The timestamp data type is a commonly used data type in PostgreSQL for storing date and time information.
  30. timestamptz

    The timestamptz (timestamp with time zone) data type in PostgreSQL is used to store timestamps with timezone information.
  31. timetz

    The timetz data type is one of the data types in PostgreSQL used to store time with time zone information.
  32. uuid

    The uuid data type in PostgreSQL is used to store 128-bit globally unique identifiers (UUIDs), also known as GUIDs (Globally Unique Identifiers).
  33. varchar

    varchar is a commonly used data type in PostgreSQL for storing variable-length strings.