From 0d7c36c3173da26440a1774e9fda2800ba77f8f9 Mon Sep 17 00:00:00 2001 From: wagner Date: Tue, 25 Nov 2025 21:28:44 -0600 Subject: [PATCH] Update cli.py Check table schema to CURRENT_SCHEMA if in connection_string use option search_path set to custom schema. example: postgresql://postgres:postgres@localhost:5432/demo?options=--search_path%3Dschema_xxx --- cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli.py b/cli.py index 0a62cc0..98fc562 100644 --- a/cli.py +++ b/cli.py @@ -80,7 +80,7 @@ def examine_database(connection_string: str) -> tuple[bool, int, str]: with conn.cursor() as cur: cur.execute(""" SELECT COUNT(*) FROM information_schema.tables - WHERE table_schema = 'public' AND table_type = 'BASE TABLE' + WHERE table_schema = CURRENT_SCHEMA AND table_type = 'BASE TABLE' """) table_count = cur.fetchone()[0] conn.close()