Skip to content

Commit

Permalink
fix: postgresql read schema_info with characters truncated if too long (
Browse files Browse the repository at this point in the history
#1935)

Co-authored-by: lingbao <[email protected]>
  • Loading branch information
bigcash and lingbao committed Sep 2, 2024
1 parent 76efa84 commit 8c6d96c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dbgpt/datasource/rdbms/conn_postgresql.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,10 @@ def table_simple_info(self):
"""
cursor = self.session.execute(text(_sql))
results = cursor.fetchall()
return results
results_str = []
for result in results:
results_str.append((str(result[0]), str(result[1])))
return results_str

def get_fields_wit_schema(self, table_name, schema_name="public"):
"""Get column fields about specified table."""
Expand Down

0 comments on commit 8c6d96c

Please sign in to comment.