Postgres and Open Source Experts

24x7x365 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 Fix Error “function ntile() Does Not Exist” in PostgreSQL

In PostgreSQL, the error “function ntile() Does Not Exist” basically arises when we do not provide any argument to the ntile() function.

How to Create a Tablespace in PostgreSQL

To create a tablespace in PostgreSQL, the “CREATE TABLESPACE” statement is used with the “LOCATION” clause. It refers to the location on the disk where all the data for a database is stored.

How to Use REAL Data Type in PostgreSQL

The REAL data type is a numeric data type used to store the single-precision floating point numbers. It requires fewer storage constraints as compared to the DOUBLE PRECISION data type.

How to Get the First, Last, and nth value of a Partition in Postgres

In PostgreSQL, users can get the first, last, and any nth values from each partition using the FIRST_VALUE(), LAST_VALUE(), and NTH_VALUE(), respectively.

How to Run PostgreSQL Queries in psql

First, establish a connection with the postgres database from psql, after that, you can run all the PostgreSQL queries like DDL and DML in psql in similar ways as you run them in pgAdmin.

PostgreSQL json_extract_path() Vs json_extract_path_text() - What's the Difference

The Postgres json_extract_path() function and json_extract_path_text() function both are JSON functions that are used to extract the nested values from JSON values specified at a certain path.

Postgres Drop Function If Exists

In PostgreSQL, the DROP and DROP IF EXISTS statements are used to delete any existing database object. We can drop a database, table, column, function, any extension, etc. in Postgres by using the DROP or DROP IF EXISTS statements. These statements do the same job of dropping an object but they also have a difference in their working. We will specifically talk about the DROP FUNCTION IF EXISTS statement.

The …

How to Extract First N or Last N Characters From a Column in PostgreSQL

We can extract the first and last n characters from a table column and use them as per our needs. This can be done by utilizing the LEFT() and RIGHT() functions of PostgreSQL.

How to Use inet_client_port() and inet_server_port() Functions in Postgres

The inet_client_port() function gives the IP port number of the current client and the inet_server_port() function returns the IP port number of the server

How to Drop a Tablespace in PostgreSQL

To drop a tablespace in Postgres, execute the DROP TABLESPACE statement followed by the name of the tablespace to be discarded.