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 Migrate Local PostgreSQL Database to AWS RDS

Create a backup of the local PostgreSQL database and connect to the AWS RDS database. After that, simply restore the backup file to the RDS database.

How to Use for Loop to Iterate Over a Result Set in PostgreSQL

Postgres allows us to utilize the for loop to loop through a query’s result set. A record-type variable can be declared to keep the rows of a result set returned by the SELECT query.

How Do I Get the Current Time Without Time Zone in PostgreSQL

In Postgres, the “LOCALTIME” function is used to get the current time without zone information. It is executed without parentheses.

How Does the ORDER BY Clause Deal With the NULL Values in PostgreSQL

In PostgreSQL, the ORDER BY clause treats the null entries as the largest values. So, when a table is sorted ascendingly, then the null values will come at the bottom of the table.

How Do I Get the Week Number From a Specific Date in PostgreSQL

Use the EXTRACT() or DATE_PART() function along with the “week” argument to get a week number from a particular date or timestamp.

How to Use GROUP BY Clause on Multiple Columns in PostgreSQL

In PostgreSQL, multiple columns can be used with the GROUP BY clause. Specify a comma between the columns to be grouped when using the GROUP BY clause on multiple columns.

How to Fix the “must appear in the GROUP BY clause” Error in PostgreSQL

A "must appear in the GROUP BY clause" error occurs in PostgreSQL when a column is specified in the SELECT statement but it is not utilized in the GROUP BY clause or any aggregate function.

What Does JUSTIFY_INTERVAL() Function Do in PostgreSQL?

JUSTIFY_INTERVAL() is a built-in DateTime function that utilizes the JUSTIFY_DAYS() and JUSTIFY_HOURS() functions with sign adjustments to adjust the intervals.

How to Use JUSTIFY_HOURS() Function in PostgreSQL

In PostgreSQL, a built-in DateTime function named JUSTIFY_HOURS() is used to adjust the 24-hour time periods to days.

PostgreSQL CLOCK_TIMESTAMP() Function

In PostgreSQL, the “CLOCK_TIMESTAMP()” function helps us in getting the current DateTime of a database that may change during query execution.