Experts in Postgres and Open Source Infrastructure

24x7, 365 Enterprise services 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.

PostgreSQL Aggregate Functions With Practical Examples

To perform calculations on a set of rows, the aggregate functions are used. These functions perform calculations on the table rows and return only a single row.

How to Use GROUP BY Clause in PostgreSQL

The GROUP BY clause in PostgreSQL is used with the collaboration of the SELECT statement to group several rows/items.

BIGSERIAL, SMALLSERIAL, and SERIAL Data Types in PostgreSQL

In PostgreSQL, the main difference between the BIGSERIAL, SMALLSERIAL, and SERIAL is the range of numbers they can hold/store.

PostgreSQL - DATEADD - Add Interval to DateTime

Postgres allows us to add intervals to date time using the “+” and “-” operators. This post demonstrated various examples of adding intervals to DateTime values.

How to Insert or Delete Multiple Rows in PostgreSQL

Use the INSERT query with comma-separated syntax to insert multiple rows into a Postgres table. To delete multiple rows, use the DELETE statement with IN clause.

PostgreSQL Create Table IF NOT EXISTS

In Postgres, creating a table that already exists will result in an error stating that the "relation already exists". To avoid such errors, the IF NOT EXISTS clause is used with the CREATE TABLE command.

PostgreSQL Date Types: Functions, Formats, and Intervals

This blog post explained date data types, functions, operators, formats, and intervals with the help of appropriate examples.

How to Check/Get PostgreSQL Version

To check which PostgreSQL version is active on your system, users can run “psql –version” command from the command prompt, or the “SELECT VERSION()” command from SQL Shell.

How to Kill a Process ID in PostgreSQL

To kill a process in Postgres, first, find the “pid” for all the processes, and then run the “pg_cancel_backend(pid)” and “pg_terminate_backend(pid)” commands.

Understanding PostgreSQL Sequence Functions

PostgreSQL provides various sequence functions like SETVAL(), NEXTVAL(), CURRVAL(), and LASTVAL() to work with sequences efficiently.