Masthead

Creating New Databases

Creating a New Database

Creating a new database in PostgreSQL is very easy.

If you have to do is specify a "template" database to be copied to create your new database. This database must contain the "spatial_ref_sys" table which includes the spatial reference systems defined by PostGIS.

  1. Right click on "Databases" and select "New Database"
  2. Give the database a good, descriptive, and unique name.
  3. You'll need to select an existing database that includes the "spatial_ref_sys" table as the "template" on the "Definition" tab. This makes the table a "PostGIS" table.
  4. Click "OK" and the table should be created.
  5. If you recieve an error it is probably because the template database is currently in use. One way to avoid this is to create a new database from one like the "Natural Earth" database, remove all the tables except the "spatial_ref_sys" table and make this a template you use only to create other PostGIS tables.

© Copyright 2018 HSU - All rights reserved.