createdb.postgis(1)

NAME

createdb.postgis - Create Postgis database in a PostgreSQL server.

SYNTAX

createdb.postgis [options] database_name

DESCRIPTION

This program create a database for working with Postgis geometries.
Using this program any user with createdb permissions can create a spatial enabled database.

OPTIONS

<database_name>
    Database to be created.

<options>
    All options from createdb(1), except choice of template database, can be used here. Specifying an owner here will not be able to set ownership to the tables originating from the template database used, unless the template owner, that is calling this script, is dba. Otherwise, you could only build databases owned by the template owner.

The most significant option would be --template below.

--template=<templatedb>
    Set template name to be <templatedb>

Environment variable: TEMPLATEDB.

--help
    Output help information and exit.

ENVIRONMENT

TEMPLATEDB
    If $TEMPLATEDB is set, its value is used as the default template name.

FILES

The environment variables for template_gis creation, removal and usage may be stored in files, as follows:

/etc/default/postgis
    will designate default values for the whole system.

$HOME/.postgis/profile
    will designate the values used by the current user by default. Beware, this is the current SYSTEM user, not the dba or the database owner to become. As those values are more user specific, they supersede the ones in the system default file for the current user.

NOTES

The order of precedence of the variables definition:

1.  Command line options.

2.  Environment variables.

3.  The user specific profile file.

4.  The system wide default file.

The builtin (hardwired) values are not a good choice.

EXAMPLES

To run this program you can simply type:

# createdb.postgis mypostgis

AUTHORS

Alex Bodnaru <alexbodn@012.net.il>
Roberto Boati <roberto.boati@gmail.com>

SEE ALSO

createdb.postgis(1), createdb(1), dropdb(1)