saltstack/salt — pull request #1666 by kiall (2012-07-21 15:27:24+00:00)
Title: Extend the PostgreSQL state and module.

Postgres module:
- Ensure all methods retrieve connection parameters from config/pillar/defaults
- Ensure all methods correctly pass user/host/port options to
their respective subcommands.
- Add user_list(), user_exists(), user_update() and user_remove() methods.
- Updated user_create() to check if a user already exists before attempting to
issue the `createuser` command.
- Ensure that all psql/createdb/dropdb commands do not prompt for a password.

Postgres Database state:
- Add ability to specify a database owner.

Postgres User state:
- Initial version. Supports present/absent.