NAME

Module::Build::Database::PostgreSQL

SYNOPSIS

In Build.PL :

my $builder = Module::Build::Database->new(
    database_type => "PostgreSQL",
    database_options => {
        name   => "my_database_name",
        schema => "my_schema_name",
        # Extra items for scratch databases :
        append_to_conf => "text to add to postgresql.conf",
        post_initdb => q[add extension if not exists hstore;],
    },
    database_extensions => {
        postgis   => {
            schema => "public",
            # postgis.sql and spatial_ref_sys.sql should be under postgis_base (below)
        },
    },
);

perl Build.PL --postgis_base=/util/share/postgresql/contrib

DESCRIPTION

Postgres driver for Module::Build::Database.

NOTES

The environment variables understood by psql: PGUSER, PGHOST and PGPORT will be used when connecting to a live database (for install and fakeinstall). PGDATABASE will be ignored; the name of the database should be specified in Build.PL instead.