salt.states.postgres_database

### Navigation

- index
- modules |
- next |
- previous |
- « SaltStack.org |
- Documentation home
- Full list of builtin state modules »

# salt.states.postgres_database

## Management of PostgreSQL databases (schemas).

The postgres_database module is used to create and manage Postgres databases. Databases can be set as either absent or present

    frank:
      postgres_database.present

`salt.states.postgres_database.` `absent`(name, runas=None)

  Ensure that the named database is absent

  name
    The name of the database to remove
  runas
    System user all operation should be preformed on behalf of

`salt.states.postgres_database.` `present`(name, tablespace=None, encoding=None, locale=None, lc_collate=None, lc_ctype=None, owner=None, template=None, runas=None)

  Ensure that the named database is present with the specified properties. For more information about all of these options see man createdb(1)

  name
    The name of the database to manage
  tablespace
    Default tablespace for the database
  encoding
    The character encoding scheme to be used in this database
  locale
    The locale to be used in this database
  lc_collate
    The LC_COLLATE setting to be used in this database
  lc_ctype
    The LC_CTYPE setting to be used in this database
  owner
    The username of the database owner
  template
    The template database from which to build this database
  runas
    System user all operation should be preformed on behalf of

## Comments

comments powered by Disqus

### Navigation

- index
- modules |
- next |
- previous |
- « SaltStack.org |
- Documentation home
- Full list of builtin state modules »