pgbelt 0.9.3__tar.gz → 0.9.4__tar.gz
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.
- {pgbelt-0.9.3 → pgbelt-0.9.4}/PKG-INFO +1 -1
- {pgbelt-0.9.3 → pgbelt-0.9.4}/pgbelt/util/postgres.py +15 -0
- {pgbelt-0.9.3 → pgbelt-0.9.4}/pyproject.toml +1 -1
- {pgbelt-0.9.3 → pgbelt-0.9.4}/LICENSE +0 -0
- {pgbelt-0.9.3 → pgbelt-0.9.4}/README.md +0 -0
- {pgbelt-0.9.3 → pgbelt-0.9.4}/pgbelt/__init__.py +0 -0
- {pgbelt-0.9.3 → pgbelt-0.9.4}/pgbelt/cmd/__init__.py +0 -0
- {pgbelt-0.9.3 → pgbelt-0.9.4}/pgbelt/cmd/convenience.py +0 -0
- {pgbelt-0.9.3 → pgbelt-0.9.4}/pgbelt/cmd/helpers.py +0 -0
- {pgbelt-0.9.3 → pgbelt-0.9.4}/pgbelt/cmd/login.py +0 -0
- {pgbelt-0.9.3 → pgbelt-0.9.4}/pgbelt/cmd/preflight.py +0 -0
- {pgbelt-0.9.3 → pgbelt-0.9.4}/pgbelt/cmd/schema.py +0 -0
- {pgbelt-0.9.3 → pgbelt-0.9.4}/pgbelt/cmd/setup.py +0 -0
- {pgbelt-0.9.3 → pgbelt-0.9.4}/pgbelt/cmd/status.py +0 -0
- {pgbelt-0.9.3 → pgbelt-0.9.4}/pgbelt/cmd/sync.py +0 -0
- {pgbelt-0.9.3 → pgbelt-0.9.4}/pgbelt/cmd/teardown.py +0 -0
- {pgbelt-0.9.3 → pgbelt-0.9.4}/pgbelt/config/__init__.py +0 -0
- {pgbelt-0.9.3 → pgbelt-0.9.4}/pgbelt/config/config.py +0 -0
- {pgbelt-0.9.3 → pgbelt-0.9.4}/pgbelt/config/models.py +0 -0
- {pgbelt-0.9.3 → pgbelt-0.9.4}/pgbelt/config/remote.py +0 -0
- {pgbelt-0.9.3 → pgbelt-0.9.4}/pgbelt/main.py +0 -0
- {pgbelt-0.9.3 → pgbelt-0.9.4}/pgbelt/util/__init__.py +0 -0
- {pgbelt-0.9.3 → pgbelt-0.9.4}/pgbelt/util/asyncfuncs.py +0 -0
- {pgbelt-0.9.3 → pgbelt-0.9.4}/pgbelt/util/dump.py +0 -0
- {pgbelt-0.9.3 → pgbelt-0.9.4}/pgbelt/util/logs.py +0 -0
- {pgbelt-0.9.3 → pgbelt-0.9.4}/pgbelt/util/pglogical.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pgbelt
|
|
3
|
-
Version: 0.9.
|
|
3
|
+
Version: 0.9.4
|
|
4
4
|
Summary: A CLI tool used to manage Postgres data migrations from beginning to end, for a single database or a fleet, leveraging pglogical replication.
|
|
5
5
|
License-File: LICENSE
|
|
6
6
|
Author: Varjitt Jeeva
|
|
@@ -326,6 +326,21 @@ async def compare_tables_without_pkeys(
|
|
|
326
326
|
elif isinstance(value, bytes):
|
|
327
327
|
hex_val = value.hex()
|
|
328
328
|
where_clauses.append(f"\"{key}\" = '\\x{hex_val}'")
|
|
329
|
+
elif isinstance(value, list):
|
|
330
|
+
# Handle PostgreSQL arrays - format as '{val1, val2, ...}'
|
|
331
|
+
# Need this and not in the PK comparison because these rows are compared by row here only, not by row there also broken by column.
|
|
332
|
+
escaped_elements = []
|
|
333
|
+
for elem in value:
|
|
334
|
+
if elem is None:
|
|
335
|
+
escaped_elements.append("NULL")
|
|
336
|
+
else:
|
|
337
|
+
# Escape double quotes and backslashes in array elements
|
|
338
|
+
escaped_elem = (
|
|
339
|
+
str(elem).replace("\\", "\\\\").replace('"', '\\"')
|
|
340
|
+
)
|
|
341
|
+
escaped_elements.append(f'"{escaped_elem}"')
|
|
342
|
+
array_literal = "{" + ",".join(escaped_elements) + "}"
|
|
343
|
+
where_clauses.append(f"\"{key}\" = '{array_literal}'")
|
|
329
344
|
else:
|
|
330
345
|
# Escape single quotes in string values
|
|
331
346
|
escaped_val = str(value).replace("'", "''")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "pgbelt"
|
|
3
|
-
version = "0.9.
|
|
3
|
+
version = "0.9.4"
|
|
4
4
|
description = "A CLI tool used to manage Postgres data migrations from beginning to end, for a single database or a fleet, leveraging pglogical replication."
|
|
5
5
|
authors = ["Varjitt Jeeva <varjitt.jeeva@autodesk.com>"]
|
|
6
6
|
readme = "README.md"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|