mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-07-31 15:47:05 +00:00
fix: postgresql read schema_info with characters truncated if too long (#1935)
Co-authored-by: lingbao <xueming.hou@maimenggroup.com>
This commit is contained in:
parent
76efa841f8
commit
8c6d96cbd0
@ -192,7 +192,10 @@ class PostgreSQLConnector(RDBMSConnector):
|
||||
"""
|
||||
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."""
|
||||
|
Loading…
Reference in New Issue
Block a user