Module Expr Str ImportFrom alias Import alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad FunctionDef arguments args defaults body Expr Str Return CompareIn Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore Dict Str Str Str Str Str NameLoad NameLoad Dict NameLoad Call AttributeLoad Str attr NameLoad NameLoad Assign NameStore Dict Str Str Str Str NameLoad NameLoad NameLoad NameLoad Assign NameStore Call SubscriptLoad NameLoad Index Str NameLoad NameLoad NameLoad Assign NameStore NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Call SubscriptLoad NameLoad Index Str NameLoad NameLoad keyword NameLoad NameLoad orelse Assign NameStore Str Assign NameStore NameLoad If NameLoad body Assign NameStore Str Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore SubscriptLoad NameLoad Index Str Index NameLoad Str orelse If CompareIsNot NameLoad NameLoad body Assign NameStore Str Assign SubscriptStore NameLoad Index Str NameLoad orelse Assign NameStore Str Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore Dict Str Str Str Str Str NameLoad NameLoad Dict NameLoad Str Assign NameStore Dict Str Str Str Str NameLoad NameLoad NameLoad NameLoad If Call SubscriptLoad NameLoad Index Str NameLoad NameLoad NameLoad body If Call SubscriptLoad NameLoad Index Str NameLoad NameLoad NameLoad body Assign SubscriptStore NameLoad Index Str Call AttributeLoad Str attr NameLoad NameLoad Assign SubscriptStore SubscriptLoad NameLoad Index Str Index NameLoad Str Return NameLoad orelse Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str Call AttributeLoad Str attr NameLoad Return NameLoad orelse Assign SubscriptStore NameLoad Index Str Call AttributeLoad Str attr NameLoad NameLoad Return NameLoad decorator_list
N/A N/A 
Management of PostgreSQL schemas
================================

The postgres_schemas module is used to create and manage Postgres schemas.

.. code-block:: yaml

    public:
      postgres_schema.present 'dbname' 'name'
 __future__ absolute_import N/A logging N/A log N/A N/A logging getLogger __name__ __virtual__ N/A N/A N/A N/A N/A 
    Only load if the postgres module is present
     N/A N/A postgres.schema_exists __salt__ N/A present N/A N/A dbname name owner db_user db_password db_host db_port N/A None None None None None N/A N/A 
    Ensure that the named schema is present in the database.

    dbname
        The database's name will work on

    name
        The name of the schema to manage

    db_user
        database username if different from config or default

    db_password
        user password if any password for a specified user

    db_host
        Database host if different from config or default

    db_port
        Database port if different from config or default
     N/A ret N/A dbname name changes result comment dbname name N/A True N/A N/A Schema {0} is already present in database {1} format name dbname N/A db_args N/A db_user db_password db_host db_port db_user db_password db_host db_port N/A schema_attr N/A N/A __salt__ N/A postgres.schema_get dbname name db_args N/A cret None N/A N/A schema_attr None N/A N/A cret N/A N/A __salt__ N/A postgres.schema_create dbname name owner owner db_args N/A N/A msg Schema {0} already exists in database {1} N/A cret None N/A cret N/A N/A msg Schema {0} has been created in database {1} N/A N/A ret N/A result True N/A N/A N/A ret N/A changes N/A name Present N/A N/A N/A cret None N/A N/A msg Failed to create schema {0} in database {1} N/A N/A ret N/A result False N/A N/A msg Schema {0} already exists in database {1} N/A N/A ret N/A result True N/A N/A ret N/A comment N/A N/A msg format name dbname N/A ret N/A absent N/A N/A dbname name db_user db_password db_host db_port N/A None None None None N/A N/A 
    Ensure that the named schema is absent

    dbname
        The database's name will work on

    name
        The name of the schema to remove

    db_user
        database username if different from config or default

    db_password
        user password if any password for a specified user

    db_host
        Database host if different from config or default

    db_port
        Database port if different from config or default
     N/A ret N/A name dbname changes result comment name dbname N/A True N/A db_args N/A db_user db_password db_host db_port db_user db_password db_host db_port N/A N/A N/A __salt__ N/A postgres.schema_exists dbname name db_args N/A N/A N/A N/A __salt__ N/A postgres.schema_remove dbname name db_args N/A N/A N/A ret N/A comment N/A N/A Schema {0} has been removed from database {1} format name dbname N/A N/A N/A ret N/A changes N/A name Absent N/A ret N/A N/A N/A ret N/A result False N/A N/A ret N/A comment N/A N/A Schema {0} failed to be removed format name N/A ret N/A N/A N/A ret N/A comment N/A N/A Schema {0} is not present in database {1}, so it cannot be removed format name dbname N/A ret N/A