postgresql-charms-single-kernel 16.1.5__py3-none-any.whl → 16.1.6__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: postgresql-charms-single-kernel
3
- Version: 16.1.5
3
+ Version: 16.1.6
4
4
  Summary: Shared and reusable code for PostgreSQL-related charms
5
5
  Author: Canonical Data Platform
6
6
  Author-email: Canonical Data Platform <data-platform@lists.launchpad.net>
@@ -5,7 +5,7 @@ single_kernel_postgresql/config/__init__.py,sha256=k9Ud5ZZNd3l0nn8xi8AIlT45oZk8h
5
5
  single_kernel_postgresql/config/literals.py,sha256=88r33TBX7SXqgpV6EEXtZmSJrfOtsFiVJ_omop0RuBo,643
6
6
  single_kernel_postgresql/utils/__init__.py,sha256=VwAEW3wYjs99q38bid47aS6Os4s3catK4H5HfdPkp94,121
7
7
  single_kernel_postgresql/utils/filesystem.py,sha256=7sMR64DavtuIKlwf8p5UWG5l1x0B3NgCSV8Yg52mpb4,1832
8
- single_kernel_postgresql/utils/postgresql.py,sha256=JkthsMDB9kzF-UNQuR3ShxeNWKwxgcEaQKPLJpXizGE,83334
9
- postgresql_charms_single_kernel-16.1.5.dist-info/WHEEL,sha256=xDCZ-UyfvkGuEHPeI7BcJzYKIZzdqN8A8o1M5Om8IyA,79
10
- postgresql_charms_single_kernel-16.1.5.dist-info/METADATA,sha256=LXXeKnVtFD0n55PYaThWI7iuK4jqqD6dQhDUdGLBU5M,13662
11
- postgresql_charms_single_kernel-16.1.5.dist-info/RECORD,,
8
+ single_kernel_postgresql/utils/postgresql.py,sha256=ZhyBU47F2idaLCzOY41ypgkUKeBoXv_-hd1tWLhPnTw,83440
9
+ postgresql_charms_single_kernel-16.1.6.dist-info/WHEEL,sha256=RRVLqVugUmFOqBedBFAmA4bsgFcROUBiSUKlERi0Hcg,79
10
+ postgresql_charms_single_kernel-16.1.6.dist-info/METADATA,sha256=c0HwkwL4DEnZDNqiCDIryxrhhL0z17tu7gB_d9aeWYw,13662
11
+ postgresql_charms_single_kernel-16.1.6.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: uv 0.9.17
2
+ Generator: uv 0.9.21
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -644,6 +644,7 @@ class PostgreSQL:
644
644
  with self._connect_to_database(
645
645
  database
646
646
  ) as connection, connection.cursor() as cursor:
647
+ cursor.execute(SQL("RESET ROLE;"))
647
648
  cursor.execute(
648
649
  SQL("REASSIGN OWNED BY {} TO {};").format(
649
650
  Identifier(user), Identifier(self.user)
@@ -653,6 +654,7 @@ class PostgreSQL:
653
654
 
654
655
  # Delete the user.
655
656
  with self._connect_to_database() as connection, connection.cursor() as cursor:
657
+ cursor.execute(SQL("RESET ROLE;"))
656
658
  cursor.execute(SQL("DROP ROLE {};").format(Identifier(user)))
657
659
  except psycopg2.Error as e:
658
660
  logger.error(f"Failed to delete user: {e}")