• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

13. Managing a Spatial Database > 13.6. Creating a Spatial Database

Creating a Spatial Database

The template1 database is the default system template used when creating new databases. Don’t use it as an operational database! Instead, create a new database for your projects. New databases are created using the command-line program createdb, followed by the name that identifies the new database:

> createdb project1
CREATE DATABASE

In this case, the new database is called project1. The text that is printed out (CREATE DATABASE) confirms that the command ran and finished. Now when existing databases are listed, project1 should be included:

> psql -l
       List of databases
    Name    |   Owner  | Encoding
------------+----------+-----------
 project1   | tyler    | SQL_ASCII
 template0  | postgres | SQL_ASCII
 template1  | postgres | SQL_ASCII
(3 rows)

PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint