@@ -14,8 +14,7 @@ async def list_schemas(conn_id: str):
1414 """List all non-system schemas in the database."""
1515 query = """
1616 SELECT
17- schema_name,
18- obj_description(pg_namespace.oid) as description
17+ schema_name
1918 FROM information_schema.schemata
2019 JOIN pg_namespace ON pg_namespace.nspname = schema_name
2120 WHERE
@@ -30,9 +29,7 @@ async def list_schema_tables(conn_id: str, schema: str):
3029 """List all tables in a specific schema with their descriptions."""
3130 query = """
3231 SELECT
33- t.table_name,
34- obj_description(format('"%s"."%s"', t.table_schema, t.table_name)::regclass::oid) as description,
35- pg_stat_get_tuples_inserted(format('"%s"."%s"', t.table_schema, t.table_name)::regclass::oid) as total_rows
32+ t.table_name
3633 FROM information_schema.tables t
3734 WHERE
3835 t.table_schema = $1
@@ -49,8 +46,7 @@ async def get_table_columns(conn_id: str, schema: str, table: str):
4946 c.column_name,
5047 c.data_type,
5148 c.is_nullable,
52- c.column_default,
53- col_description(format('%s.%s', c.table_schema, c.table_name)::regclass::oid, c.ordinal_position) as description
49+ c.column_default
5450 FROM information_schema.columns c
5551 WHERE
5652 c.table_schema = $1 AND
@@ -66,7 +62,6 @@ async def get_table_indexes(conn_id: str, schema: str, table: str):
6662 SELECT
6763 i.relname as index_name,
6864 pg_get_indexdef(i.oid) as index_definition,
69- obj_description(i.oid) as description,
7065 am.amname as index_type,
7166 ARRAY_AGG(a.attname ORDER BY k.i) as column_names,
7267 ix.indisunique as is_unique,
@@ -112,7 +107,6 @@ async def get_table_constraints(conn_id: str, schema: str, table: str):
112107 WHEN c.contype = 'x' THEN 'EXCLUSION'
113108 ELSE 'OTHER'
114109 END as constraint_type_desc,
115- obj_description(c.oid) as description,
116110 pg_get_constraintdef(c.oid) as definition,
117111 CASE
118112 WHEN c.contype = 'f' THEN
@@ -149,7 +143,6 @@ async def get_index_details(conn_id: str, schema: str, table: str, index: str):
149143 SELECT
150144 i.relname as index_name,
151145 pg_get_indexdef(i.oid) as index_definition,
152- obj_description(i.oid) as description,
153146 am.amname as index_type,
154147 ix.indisunique as is_unique,
155148 ix.indisprimary as is_primary,
@@ -202,7 +195,6 @@ async def get_constraint_details(conn_id: str, schema: str, table: str, constrai
202195 WHEN c.contype = 'x' THEN 'EXCLUSION'
203196 ELSE 'OTHER'
204197 END as constraint_type_desc,
205- obj_description(c.oid) as description,
206198 pg_get_constraintdef(c.oid) as definition,
207199 CASE
208200 WHEN c.contype = 'f' THEN
0 commit comments