From 7ff85903e4fe95f4dd918152e2577d80b0c577e8 Mon Sep 17 00:00:00 2001 From: Aditya Toshniwal Date: Mon, 10 Jun 2019 12:15:12 +0530 Subject: [PATCH] Fix issue where reverse engineered SQL was failing for foreign tables, if it had = in the options. Fixes #4171 --- docs/en_US/release_notes_4_9.rst | 1 + .../servers/databases/schemas/foreign_tables/__init__.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/en_US/release_notes_4_9.rst b/docs/en_US/release_notes_4_9.rst index b1c394cfa..ab1497ced 100644 --- a/docs/en_US/release_notes_4_9.rst +++ b/docs/en_US/release_notes_4_9.rst @@ -13,6 +13,7 @@ New features Bug fixes ********* +| `Bug #4171 `_ - Fix issue where reverse engineered SQL was failing for foreign tables, if it had "=" in the options. | `Bug #4253 `_ - Fix issue where new column should be created with Default value. | `Bug #4255 `_ - Prevent the geometry viewer grabbing key presses when not in focus under Firefox, IE and Edge. | `Bug #4320 `_ - Fix issue where SSH tunnel connection using password is failing, it's regression of Master Password. \ No newline at end of file diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/__init__.py index d85b5f3e1..41f8cfd6a 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/__init__.py +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/__init__.py @@ -1192,7 +1192,9 @@ class ForeignTableView(PGChildNodeView, DataTypeReader): if db_variables is not None: for row in db_variables: - var_name, var_value = row.split("=") + # The value may contain equals in string, split on + # first equals only + var_name, var_value = row.split("=", 1) var_dict = {'option': var_name, 'value': var_value}