Skip to content

Tag Archives: PostgreSQL-function

The PostgreSQL POSITION() function returns the location of a substring in a string. Syntax: POSITION(substring in string) Let’s analyze the above syntax: The substring argument… Read More
In PostgreSQL, the TRIM() function is used to remove the longest string consisting of spaces or any specified character from a string. By default, the… Read More
The PostgreSQL LPAD() function is used for padding a string to the left by a specified length with other specified characters. Syntax: LPAD(string, length[, fill])… Read More
In PostgreSQL, the UPPER function is used to convert a string into upper case. Syntax: UPPER(string_expression) Like the LOWER function, the UPPER function accepts a… Read More
In PostgreSQL, the LOWER function is used to convert a string, an expression, or values in a column to lower case. Syntax: LOWER(string or value… Read More
In PostgreSQL, the FORMAT() function is used to format arguments based on a format string. Syntax: FORMAT(format_string [, format_argument [, ....] ]) Let’s analyze the… Read More
In this article, we will look into the process of developing functions that returns a table. We will use the film table in the sample… Read More
PostgreSQL allows more than one function to have the same name, so long as the arguments are different. If more than one function has the same name,… Read More
PostgreSQL has 4 types of function parameters as listed below: IN OUT INOUT VARIADIC IN Parameter: To better understand these function parameters let’s first define… Read More
PostgreSQL uses the CREATE FUNCTION statement to develop user-defined functions. Syntax: CREATE FUNCTION function_name(p1 type, p2 type) RETURNS type AS BEGIN -- logic END; LANGUAGE… Read More
PostgreSQL has a NULLIF function to handle null values. The NULLIF function is one of the most common conditional expressions provided by PostgreSQL. Syntax:NULLIF(argument_1,argument_2); The… Read More
PostgreSQL provides the random() function that returns a random number between 0 and 1. In this article, we will look into the process of developing… Read More
The size of a value means the space needed to store a specific value in the database table.In this article we will look into function… Read More
In this article, we will look into the function that is used to get the size of the PostgreSQL database tablespace. The pg_tablespace_size() function is used… Read More
In this article, we will look into a function that is used to get the size of the PostgreSQL database indexes of a table. The… Read More