Skip to content

Commit 015b881

Browse files
authored
Release 4.2.0 commit (#901)
1 parent f478950 commit 015b881

File tree

9 files changed

+51
-16
lines changed

9 files changed

+51
-16
lines changed

CHANGELOG.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,28 @@ Community PostgreSQL Collection Release Notes
44

55
.. contents:: Topics
66

7+
v4.2.0
8+
======
9+
10+
Release Summary
11+
---------------
12+
13+
This is a minor release of the ``community.postgresql`` collection.
14+
This changelog contains all changes to the modules and plugins in this collection
15+
that have been made after the previous release.
16+
17+
Minor Changes
18+
-------------
19+
20+
- postgresql_privs - support MAINTAIN privilege on tables (added in PostgreSQL 17) (https://github.com/ansible-collections/community.postgresql/pull/888).
21+
22+
Bugfixes
23+
--------
24+
25+
- postgresql_db - Fix connection limit not being set when value is "0" (https://github.com/ansible-collections/community.postgresql/issues/879).
26+
- postgresql_db - fixed ``session_role`` parameter that was being ignored for raw connections (https://github.com/ansible-collections/community.postgresql/pull/865)
27+
- postgresql_db - restoring from ``.sql`` files would execute the file twice. The module now avoids using both ``--file`` and stdin redirection simultaneously (https://github.com/ansible-collections/community.postgresql/issues/882).
28+
729
v4.1.0
830
======
931

changelogs/changelog.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,3 +1094,27 @@ releases:
10941094
- 4.1.0.yml
10951095
- 858-negated-change-report.yml
10961096
release_date: '2025-05-30'
1097+
4.2.0:
1098+
changes:
1099+
bugfixes:
1100+
- postgresql_db - Fix connection limit not being set when value is "0" (https://github.com/ansible-collections/community.postgresql/issues/879).
1101+
- postgresql_db - fixed ``session_role`` parameter that was being ignored for
1102+
raw connections (https://github.com/ansible-collections/community.postgresql/pull/865)
1103+
- postgresql_db - restoring from ``.sql`` files would execute the file twice.
1104+
The module now avoids using both ``--file`` and stdin redirection simultaneously
1105+
(https://github.com/ansible-collections/community.postgresql/issues/882).
1106+
minor_changes:
1107+
- postgresql_privs - support MAINTAIN privilege on tables (added in PostgreSQL
1108+
17) (https://github.com/ansible-collections/community.postgresql/pull/888).
1109+
release_summary: 'This is a minor release of the ``community.postgresql`` collection.
1110+
1111+
This changelog contains all changes to the modules and plugins in this collection
1112+
1113+
that have been made after the previous release.'
1114+
fragments:
1115+
- 4.2.0.yml
1116+
- 865-postgresql_db-session_role-fix.yml
1117+
- 879-fix-conn-limit-zero.yml
1118+
- 882-postgresql_db-restore-fix.yml
1119+
- 888-postgresql-priv-maintain.yml
1120+
release_date: '2025-12-04'

changelogs/fragments/865-postgresql_db-session_role-fix.yml

Lines changed: 0 additions & 2 deletions
This file was deleted.

changelogs/fragments/879-fix-conn-limit-zero.yml

Lines changed: 0 additions & 2 deletions
This file was deleted.

changelogs/fragments/882-postgresql_db-restore-fix.yml

Lines changed: 0 additions & 2 deletions
This file was deleted.

changelogs/fragments/888-postgresql-priv-maintain.yml

Lines changed: 0 additions & 2 deletions
This file was deleted.

galaxy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
namespace: community
22
name: postgresql
3-
version: 4.1.0
3+
version: 4.2.0
44
readme: README.md
55
authors:
66
- Ansible PostgreSQL community

plugins/module_utils/postgres.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
from ansible.module_utils.common.text.converters import to_native
2121
from ansible.module_utils.basic import missing_required_lib
22-
from ansible.module_utils.six import iteritems
2322
from ansible_collections.community.postgresql.plugins.module_utils.version import \
2423
LooseVersion
2524

@@ -323,7 +322,7 @@ def get_conn_params(module, params_dict, warn_db_default=True):
323322
module.warn('Database name has not been passed, '
324323
'used default database to connect to.')
325324

326-
kw = dict((params_map[k], v) for (k, v) in iteritems(params_dict)
325+
kw = dict((params_map[k], v) for (k, v) in params_dict.items()
327326
if k in params_map and v != '' and v is not None)
328327

329328
# If a login_unix_socket is specified, incorporate it here.
@@ -505,7 +504,7 @@ def convert_elements_to_pg_arrays(obj):
505504
obj (dict or list): Object with converted elements.
506505
"""
507506
if isinstance(obj, dict):
508-
for (key, elem) in iteritems(obj):
507+
for (key, elem) in obj.items():
509508
if isinstance(elem, list):
510509
obj[key] = list_to_pg_array(elem)
511510

plugins/module_utils/saslprep.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,9 @@
2020
in_table_d1, in_table_d2)
2121
from unicodedata import normalize
2222

23-
from ansible.module_utils.six import text_type
24-
2523

2624
def is_unicode_str(string):
27-
return True if isinstance(string, text_type) else False
25+
return True if isinstance(string, str) else False
2826

2927

3028
def mapping_profile(string):
@@ -149,7 +147,7 @@ def saslprep(string):
149147
# Validate the string is a Unicode string
150148
# (text_type is the string type if PY3 and unicode otherwise):
151149
if not is_unicode_str(string):
152-
raise TypeError('input must be of type %s, not %s' % (text_type, type(string)))
150+
raise TypeError('input must be of type %s, not %s' % (str, type(string)))
153151

154152
# RFC4013: 2.1. Mapping.
155153
string = mapping_profile(string)

0 commit comments

Comments
 (0)