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.

How to Create a Postgres Database From Command Line

PostgreSQL supports various commands to create a database from the command line, including “createdb” and “CREATE DATABASE”.

How to use PostgreSQL NTILE Function

The NTILE function is used to divide the rows of the table into groups provided by the users in the argument of the function called buckets in PostgreSQL.

How to Use JSON_ARRAY_ELEMENTS() Function in PostgreSQL

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

How to Use/Execute PostgreSQL Query in Docker Container

To execute PostgreSQL Query in Docker container, run Postgres container and interact with it. Then, connect to database server and execute PostgreSQL commands.

How to Check if the Upper Bound of the Given Range is Inclusive or Exclusive

In PostgreSQL, the UPPER_INC() function accepts a range or multi-range as an argument and checks if the upper bound of the specified range is included in the range or not.

How to Find the Length of a JSON Array in PostgreSQL?

In PostgreSQL, a built-in function named “JSON_ARRAY_LENGTH()” is used to determine the length of a JSON array.

How to Get PostgreSQL Server Start Time

PostgreSQL offers a built-in “pg_postmaster_start_time()” function that provides the exact timestamp when the server was initiated.


In PostgreSQL, the JSON_ARRAY_ELEMENTS() and the JSON_ARRAY_ELEMENTS_TEXT() functions are used to expand the top-level elements of the given JSON array into a set of values

Howthe LEAD Function Works in PostgreSQL

The LEAD is a PostgreSQL function that can be used to get the values from the following row of the table using its parameters like expression, offset, etc.

How to Get the Name of the Current Schema in PostgreSQL

In PostgreSQL, the “CURRENT_SCHEMA” and “CURRENT_SCHEMAS” functions are used to get the details of the current schema.