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.

How to Update a View in PostgreSQL?

In PostgreSQL, an already created view can be altered by utilizing the UPDATE query followed by the view name and then specifying the column to be updated in the SET clause.

How to Sort a Table by Month Name in PostgreSQL

To sort a table by month name use the ORDER BY clause alongside the EXTRACT() and TO_DATE() functions. 'Month' must be specified as an argument to the EXTRACT() and TO_DATE() functions.

How to Use UPDATE RETURNING Clause in PostgreSQL

In PostgreSQL, the UPDATE RETURNING clause not only updates the selected rows but also retrieves the modified rows.

How to Drop a Sequence in PostgreSQL

To remove a Postgres sequence, execute the “DROP SEQUENCE” command followed by the sequence name to be dropped.

How to List Constraints of a Table in PostgreSQL?

In PostgreSQL, the “\d” command and “pg_catalog” schema with the “pg_constraint” and “pg_class” views are used to get the list of table constraints.

How to Select One Row From Each Group in PostgreSQL?

In PostgreSQL, the “SELECT DISTINCT ON” statement is used to select one row per group. The stated command selects and retrieves a random row from each group.

How Do I Use FILTER Clause to Have Multiple Counts in PostgreSQL?

In PostgreSQL, the FILTER clause can be used with the COUNT() function to do multiple counts on a particular table.

How Does the CONCAT_WS() Work in PostgreSQL

The CONCAT_WS() is an inbuilt string function and an extended form of the CONCAT() function which allows the users to put a specific separator between the strings to be concatenated

How to Get the Age in Years in PostgreSQL

In PostgreSQL, the AGE() function must be used with the DATE_PART() or the EXTRACT() function to get the age in years.

How to Get the Year Month and Day From an INTERVAL in PostgreSQL

In PostgreSQL, the DATE_PART() and EXTRACT() functions are used to get a specific date field such as a year, month, etc. from any date, timestamp, or interval.