Category: Types
-
User-Defined data type
In this section, we are going to understand the working of the PostgreSQL user-defined data type with the help of CREATE DOMAIN and CREATE TYPE command and see an example of it. What is PostgreSQL user-defined Data Type? In addition to built-in data types, PostgreSQL provides us to generate user-defined data types with the help of the below commands: Commands Description CREATE DOMAIN It generates a…
-
Array
In this section, we are going to understand the working of the PostgreSQL Array data type, examples of the array data type, and some accessible Array functions like unnest(), ANY(), which help us to handle array values more efficiently. And we also see the example of using the array elements within the WHERE clause. What is PostgreSQL array Data Type? In PostgreSQL, the Array data…
-
hstore
In this section, we are going to understand the working of the PostgreSQL hstore data type, examples of the hstore data type, and we also see the example of the hstore with WHERE clause, which helps us to handle the hstore data values more resourcefully. We will understand how we can add, update, deleting the key-values pairs in the PostgreSQL hstore data type. We will discuss the following…
-
JSON
In this section, we are going to understand the working of the PostgreSQL JSON data type, examples of the JSON data type, and some accessible functions json_each(), json_object_keys (), json_typeof(), etc. We also see JSON operator’s example with WHERE clause, which helps us to handle JSON data values more resourcefully, and we will use some aggregate function (SUM, MIN, AVG, MAX) to get the JSON data. What…
-
UUID
In this section, we are going to understand the working of the PostgreSQL UUID data type. And we also see examples of the UUID data type, and we also see some how to create UUID values with the help of a supplied module. What is PostgreSQL UUID Data Type? In PostgreSQL, the next data type is a Universally Unique Identifier, which…
-
Interval
In this section, we are going to understand the working of the PostgreSQL Interval data type, and we also see examples of the Interval data type. And mostly used Interval functions, for example, NOW(), TO_CHAR(), EXTRACT(), justify_days(), justify_hours(), justify_interval(). The Input and output format for PostgreSQL interval values. What is PostgreSQL Interval Data Type? In PostgreSQL, the Interval is another type of data type used to store and…
-
Timestamp
In this section, we are going to understand the working of the PostgreSQL Timestamp data type. And we also see examples of the Timestamp data type, and we also see some accessible timestamp functions like NOW(), CURRENT_TIMESTAMP, CURRENT_TIME, TIMEOFDAY(), and timezone(zone, timestamp), which help us to handle time values more efficiently. What is PostgreSQL Timestamp Data Type? In PostgreSQL, the next…
-
Time
In this section, we are going to understand the working of the PostgreSQL Time data type. And we also see examples of the Time data type, and we also see some accessible time functions, which help us to handle time values more efficiently. What is PostgreSQL Time Data Type? In PostgreSQL, the next data type is TIME, which stores the Time of…
-
Date
In this section, we are going to understand the working of the PostgreSQL Date data type, examples of the Date data type, and some accessible date functions, which help us to handle Date values more efficiently. What is PostgreSQL Date Data Type? Another data type in PostgreSQL is DATE, which is used to store the date values. In PostgreSQL, the Date data type format is YYYY-MM-DD,…
-
Serial
In this section, we are going to understand the working of PostgreSQL Serial pseudo-type, which allows us to define auto-increment columns in tables. And we also see examples of the PostgreSQL Serial pseudo-type. What is PostgreSQL Serial pseudo-type? In PostgreSQL, we have one particular kind of database object generator known as Serial, which is used to create a sequence of Integers that are frequently used as…