13.6. Creating a Spatial Database

 < Day Day Up > 

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)

The project1 database is now ready for data loading. To quit psql, use the \q command.

     < Day Day Up > 


    Web Mapping
    Web Mapping Illustrated: Using Open Source GIS Toolkits
    ISBN: 0596008651
    EAN: 2147483647
    Year: 2005
    Pages: 138

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net