community[patch]: Don't set search path for unknown SQL dialects (#16047)

- **Description:** Made a small fix for the `SQLDatabase` highlighted in
an issue. The issue pertains to switching schema for different SQL
engines. 
  - **Issue:** #16023
@baskaryan
pull/16157/head
Mohammad Mohtashim 6 months ago committed by GitHub
parent 11327e6b64
commit 1fa056c324
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -409,8 +409,9 @@ class SQLDatabase:
# If anybody using Sybase SQL anywhere database then it should not
# go to else condition. It should be same as mssql.
pass
else: # postgresql and other compatible dialects
elif self.dialect == "postgresql": # postgresql
connection.exec_driver_sql("SET search_path TO %s", (self._schema,))
cursor = connection.execute(text(command))
if cursor.returns_rows:
if fetch == "all":

Loading…
Cancel
Save