Friday , November 8 2024

PostgreSQL Data types

In today’s article, I will talk about PostgreSQL Data types to give general information and to meet our basic needs.

In database operations, there are character, number, date, geometric data types. Let’s talk about character data types from these data.

For example, you will create a table and enter address information, you can use “varchar”, text data types for this.

To give another example, you will create a city column and you do not want this column to be created with more than 20 letters, then you can use data types such as character(20),varchar(20).

In database systems, data types are required for data to be stored in columns. There is a separate column for your number value, a separate column for characters, separate data types for images, etc.

We need to make separate definitions for each data, that is, we need to enter separate data types.

For example, if you are dealing with geographic data, you can choose the path, polygon data type, if you are going to keep mac addresses, we can use macaddr, if you are going to keep monetary data types, we can use money, integer for number, time, timestamp for date data type.

There are data types and descriptions in the list below, you can use them as needed.

Loading

About Faruk Erdem

Leave a Reply

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