Thursday , June 13 2024

PostgreSQL Data Type Limits

In today’s article, we will learn about integer data types and the last values they will take in the range section.

These values are given in the table below.

For example, you cannot enter more than 32767 in a column with data type smallint.

When you try to insert the number 32768 into the column with the smallint data type, you will get the error “ERROR: smallint out of range”. This is because you exceed the 2 byte limit of the smallint data type.

Therefore, when designing the table, you need to choose the data types carefully.

Loading

About Faruk Erdem

Leave a Reply

Your email address will not be published. Required fields are marked *

Categories