Refactor postgresql modules (#291)

* Refactor postgresql_idx to simplify code

Have refactored the postgresql_idx module to:
* Use the class schema in the drop function rather than a passed in one
* Remove the if/else and just return the bool in the drop and create
  functions

* Refactor postgresql_ext module

Have refactored the postgresql_ext module to:
* Remove an unused exception
* Simplify logic in the create and update functions
* Use list comprehension to simplify getting the available version

* Refactor postgresql_user_obj_stat_info module

Have refactored the postgresql_user_obj_stat_info module to:
* Simplify the logic in some of the functions
* Reduce duplicate code

* Add changelog fragment
This commit is contained in:
Thomas O'Donnell 2020-05-12 08:32:06 +02:00 committed by GitHub
commit 51b8e79203
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 57 additions and 75 deletions

View file

@ -0,0 +1,5 @@
---
minor_changes:
- postgresql_ext - refactor to simplify and remove dead code (https://github.com/ansible-collections/community.general/pull/291)
- postgresql_idx - refactor to simplify code (https://github.com/ansible-collections/community.general/pull/291)
- postgresql_user_obj_stat_info - refactor to simplify code (https://github.com/ansible-collections/community.general/pull/291)