Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

postgresql
communitycreator

What are common data types used in PostgreSQL?

Osinachi Chukwujama

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Answers Code

Data types in PostgreSQL are the different kinds of data items that PostgreSQL supports. PostgreSQL supports a rich set of native data types (up to 43) that allow users to add all kinds of data to a database. If a data type isn’t supplied, it can be created using the CREATE TYPE command.

Most common data types

The most common data types in PostgreSQL are given in this table:

S/N Data Type Aliases Description
1 bigint int8 signed eight-byte integer
2 boolean bool logical Boolean (true/false)
3 date calendar date (year, month, day)
4 integer int, int4 signed four-byte integer
5 double precision float8 double precision floating-point number (8 bytes)
6 character varying [ (n) ]
7 text variable-length character string
8 uuid universally unique identifier

RELATED TAGS

postgresql
communitycreator

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Answers Code
Keep Exploring