Skip to content

Commit bff7715

Browse files
committed
Fix Python 3.12 SyntaxWarning in orphaned_toast_tables_check.py
Use raw string literal (r""") for SQL query in orphaned_toast_tables_check.py to avoid SyntaxWarning on Python 3.12. The query contains `\d` for PostgreSQL regex which Python 3.12 incorrectly interprets as an invalid escape sequence, causing test failures on Ubuntu 24.04. See: #1686
1 parent fa061c1 commit bff7715

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

gpMgmt/bin/gpcheckcat_modules/orphaned_toast_tables_check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def __init__(self):
2525
# pg_depend back to pg_class, and if the table oids don't match and/or
2626
# one is missing, the TOAST table is considered to be an orphan.
2727
# Note: Handles toast tables <pg_toast_temp_*> which is created/used by InitTempTableNamespace().
28-
self.orphaned_toast_tables_query = """
28+
self.orphaned_toast_tables_query = r"""
2929
SELECT
3030
gp_segment_id AS content_id,
3131
toast_table_oid,

0 commit comments

Comments
 (0)