June 2005
Beginner to intermediate
372 pages
10h 1m
English
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 DATABASEIn 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.