Common Data Types in PostgreSQL

By Hemanta Sundaray on 2022-12-02

Below is a summary of common data types in PostgreSQL:

Data Type Representation Value Display
integer whole number 224 224
decimal floating-point number 26.1432 26.1432
money fixed floating point number with 2 decimal places 6.17 $6.17
boolean logic TRUE, FALSE t, f
char(n) fixed length string, removes trailing blanks '123 ' '123'
varchar(n) variable length string '123 ' '123 '
text unlimited length string '123 ' '123 '

Join the Newsletter