Array and Custom Data Types in PostgreSQL


Just like every other database, PostgreSQL has its own set of basic datatypes, like Boolean, Varchar, Text, Date, Time, etc. We can easily store data like numbers, characters, date, time, etc. using these supported datatypes, but what if we need to store multiple data elements in a single column?

Suppose we are storing the data of employees in an organization and it’s obvious that most of the employees will have multiple contact numbers alternate contact numbers. How do we store them all in one column instead of having different columns for all the numbers? We can use of ARRAY