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.

What Does the LASTVAL() Function Do in PostgreSQL

In PostgreSQL, “LASTVAL()” is a built-in function that retrieves the most recently generated sequence value of the current session.

How to Alter IDENTITY Column in PostgreSQL

In PostgreSQL, the ALTER TABLE statement is used with ADD IDENTITY or DROP IDENTITY to add or remove an IDENTITY column to a Postgres table.

How Do I Create an IDENTITY Column in PostgreSQL

PostgreSQL 10 introduced a new feature named the "IDENTITY" column, which allows us to create a table’s column with auto-incrementing values.

How Does the SUM() Function Work With the GROUP BY Clause in PostgreSQL

In PostgreSQL, the SUM() function can be executed with the GROUP BY clause to compute the sum of a particular column grouped by single or multiple columns.

How to Increase Maximum Connections in PostgreSQL

To increase maximum connections in PostgreSQL, open the configuration file, locate the “max_connections” variable in that file, and increase its value according to your needs.

How to Specify the Start Value and the Increment Value for an IDENTITY Column in PostgreSQL

Use the sequence option to specify the start value and the increment value for an IDENTITY column in PostgreSQL.

What Does the CURRVAL() Function Do in PostgreSQL?

In PostgreSQL, “CURRVAL()” is a built-in function that returns the most recently retrieved value of the NEXTVAL() function for a specific sequence in the current session.

Can a User Override a SERIAL Column in PostgreSQL?

Yes! A SERIAL column can be overridden by the user by explicitly specifying the column name and corresponding value in the INSERT statement.

How to Fix “START value cannot be less than MINVALUE” When Creating a Sequence in PostgreSQL

In PostgreSQL, to fix the “START value can’t be less than MINVALUE” error, make sure that the starting value of the sequence is equal to or greater than the MINVALUE.

How to Fix “currval of sequence is not yet defined in this session” Error When Calling CURRVAL() in PostgreSQL

In PostgreSQL, the “currval of sequence is not yet defined in this session” error occurs when the NEXTVAL() function is invoked before the CURRVAL() function.