How do I add PostGIS to PostgreSQL pgAdmin? How do I add PostGIS to PostgreSQL pgAdmin? postgresql postgresql

How do I add PostGIS to PostgreSQL pgAdmin?


Connect to the database using a superuser account (most often the user named postgres but in more recent versions the id of the user who installed the application.) Then issue the following SQL commands to enable PostGIS functionality.

 CREATE EXTENSION postgis; CREATE EXTENSION postgis_topology;

You can do this from within pgAdmin or via psql -U [superuser] [database] from a command line.

Alternately for the command adverse; as a superuser; from within pgAdmin right click on your database's Extensions and select New Extension. Then in the drop down associated with Name select the postgis* extensions needed.


Before adding PostGIS extension to Postgres. You first need to install PostGIS on Ubuntu 14.04

Add PPA from terminal

$ sudo add-apt-repository ppa:ubuntugis/ppa$ sudo apt-get update

Install PostGIS with apt-get

$ sudo apt-get install postgis postgresql-10-postgis-2.5

After successful installation open psql

$ sudo -u postgres psql

List all databases

postgres=# \l

Connect to specific database

postgres=# \c DATABASE_NAME

Run the following to add PostGIS extension to Postgres

CREATE EXTENSION postgis;CREATE EXTENSION postgis_topology;

Exit from psql

postgres=# \q

Thank you


You don't install it to pgAdmin, it is an extension to Postgres itself. Once it is installed, you add it to a particular database, and its functions, nearly 1000, a few views and the spatial_ref_sys table, will appear in pgAdmin in that db. You can also install it to the template1 db, and then it will be automatically included in any other database that you subsequently create. You can get a binary install from http://postgis.net/install/