Postgres and Open Source Experts

Anytime. Anywhere. Since 1997.

Education

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.

How to Expand a Multi Range Into a Set of Range Values in PostgreSQL

In PostgreSQL, the UNNEST() function is used with a valid multirange type such as “int4multirange”, “tstzmultirange”, etc., to expand multi-range values into a set of range values

How to Check if the Lower Bound of the Given Range is Inclusive or Not

In PostgreSQL, the LOWER_INC() function accepts a range or multi-range as an argument and checks if the lower bound of the specified range is inclusive or exclusive.

Understanding Array Functions

PostgreSQL supports various built-in array functions, such as ARRAY_PREPEND(), ARRAY_CAT(), etc., to deal with the array's data efficiently.

How Does PostgreSQL LAG() Function Work?

The LAG() function in PostgreSQL is an SQL function that can be used to get the values from the previous row of the table using its parameters.

How to Get the Name of a Current Database in PostgreSQL

In Postgres, a couple of built-in methods, such as CURRENT_CATALOG, and CURRENT_DATABASE are used to get the names of the current database.

JSON_ARRAY_ELEMENTS_TEXT() Function in PostgreSQL

The JSON_ARRAY_ELEMENTS_TEXT() is a built-in JSON function that accepts a JSON array as an argument and expands its top-level elements into a set of text values.

How to Run PostgreSQL and pgAdmin Using Docker

To run PostgreSQL and pgAdmin using Docker, download Postgres and pgAdmin4 images from Docker Hub. Then, build and start the Postgres and pgAdmin4 containers.

How to Use NTH_VALUE Function in PostgreSQL

The NTH_VALUE function in PostgreSQL is used to get the Nth_value from the table using the column and offset to set the value from the column.

How to Install PostgreSQL Using Docker Compose

To install PostgreSQL using Docker Compose, specify the desired services in compose file. Then, start the compose service to build and run Postgres container.

How to Get the Name of the Current User in PostgreSQL

In PostgreSQL, the “CURRENT_USER”, “CURRENT_ROLE”, and “USER” methods are used to get the details of the current user.