Experts in Postgres and Open Source Infrastructure

24x7, 365 Enterprise services since 1997


Professional Postgres and Open Source support

Command Prompt, Inc., is the oldest Postgres Company in North America and one of the oldest Open Source firms still operating today. We serve our clients with best in class expertise and professionalism. You can read more about support and services here:

You have landed at the largest single source of Postgres education blogs in the world. At Command Prompt, we believe deeply that the education of the community is critical to the continued success of Postgres and related technologies. We hope you find content you are looking for and don't hesitate to Contact us today for all your Postgres and Open Source consulting and support needs.

ARRAY_CAT() Function in PostgreSQL

ARRAY_CAT() is another very convenient function in Postgres that is used to concatenate two arrays. It accepts two arrays as arguments and retrieves a concatenated array.

How to Filter Data Using PostgreSQL WHERE Clause

In PostgreSQL, the WHERE clause allows us to filter the result set retrieved by the UPDATE, SELECT, or DELETE query. The WHERE clause filters the data based on a specific condition or several conditions.

How to Insert Data Into an Array in PostgreSQL

In PostgreSQL, several syntaxes can be used to insert data into an array, such as using the ARRAY keyword with square brackets “[]” or curly braces enclosed within single quotes.

How to Rename a User/Role in PostgreSQL

In PostgreSQL, the RENAME TO clause is used along with the ALTER USER or the ALTER ROLE statement to rename a user/role.

How to Insert Bulk Data in PostgreSQL

In PostgreSQL, bulk data can be inserted into a table using an INSERT INTO statement or COPY command. In Postgres, the COPY command allows us to load bulk data from one or more files.

How to Create a User in PostgreSQL

To create a user in Postgres, specify the “CREATE USER” command followed by the user name, and after that, assign the privileges to the user using the “WITH” clause.

How to Concatenate a String and a Number in PostgreSQL

PostgreSQL allows us to concatenate a string with a number using a built-in “CONCAT()” function or a pipe concatenation operator “||”.

How to Use ALTER USER Statement in PostgreSQL

A Postgres user's attributes can be changed using the ALTER USER statement. Using the ALTER USER command, we can modify/alter the user's password, privileges, etc..

How to Find Logged In Users in PostgreSQL

To find the logged-in users in Postgres, the “pg_stat_activity” view is used. While to find all Postgres users, a system table named "pg_user" is used.

Postgres Length Functions With Practical Examples

Postgres offers various built-in length functions to calculate the length of a string, such as LENGTH(), BIT_LENGTH(), CHAR_LENGTH(), and BYTE_LENGTH().