diff --git a/web/pgadmin/utils/driver/psycopg2/__init__.py b/web/pgadmin/utils/driver/psycopg2/__init__.py index 2b85c6561..fcfc3f3b8 100644 --- a/web/pgadmin/utils/driver/psycopg2/__init__.py +++ b/web/pgadmin/utils/driver/psycopg2/__init__.py @@ -859,16 +859,22 @@ class Driver(BaseDriver): return result @staticmethod - def qtIdent(value): + def qtIdent(conn, *args): + # We're not using the conn object at the moment, but - we will modify the + # logic to use the server version specific keywords later. + res = None + value = None - if (len(value) == 0): - return value + for val in args: + if len(val) == 0: + continue - result = value; + value = val - if (Driver.needsQuoting(result, False)): - result.replace("\"", "\"\"") - return "\"" + result + "\"" - else: - return result; + if (Driver.needsQuoting(val, False)): + value.replace("\"", "\"\"") + value = "\"" + value + "\"" + res = ((res and res + '.') or '') + value + + return res