Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/templates/user_mappings/sql/default/create.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/templates/user_mappings/sql/default/create.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/templates/user_mappings/sql/default/create.sql	(date 1632816057703)
@@ -3,4 +3,4 @@
 CREATE USER MAPPING FOR {% if data.name == "CURRENT_USER" or data.name == "PUBLIC" %}{{ data.name }}{% else %}{{ conn|qtIdent(data.name) }}{% endif %} SERVER {{ conn|qtIdent(fdwdata.name) }}{%endif%}{% if data.umoptions %}{% if is_valid_options %}
 
     OPTIONS ({% for variable in data.umoptions %}{% if loop.index != 1 %}, {% endif %}
-{{ conn|qtIdent(variable.umoption) }} {{ variable.umvalue|qtLiteral }}{% endfor %}){% endif %}{% endif %};
\ No newline at end of file
+{{ conn|qtIdent(variable.umoption) }} {{ variable.umvalue|qtLiteral }}{% endfor %}){% endif %}{% endif %};
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/domains/__init__.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/domains/__init__.py	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/domains/__init__.py	(date 1632802255952)
@@ -768,7 +768,7 @@
         sql_header = """-- DOMAIN: {0}.{1}\n\n""".format(
             data['basensp'], data['name'])
 
-        sql_header += """-- DROP DOMAIN {0};\n
+        sql_header += """-- DROP DOMAIN IF EXISTS {0};\n
 """.format(self.qtIdent(self.conn, data['basensp'], data['name']))
         SQL = sql_header + SQL
 
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/create_sequence_ownedby_remove.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/create_sequence_ownedby_remove.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/create_sequence_ownedby_remove.sql	(date 1632803705115)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     INCREMENT 5
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/pg/default/alter_domain_comment.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/pg/default/alter_domain_comment.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/pg/default/alter_domain_comment.sql	(date 1632803261714)
@@ -1,6 +1,6 @@
 -- DOMAIN: public.Dom1_$%{}[]()&*^!@"'`\/#
 
--- DROP DOMAIN public."Dom1_$%{}[]()&*^!@""'`\/#";
+-- DROP DOMAIN IF EXISTS public."Dom1_$%{}[]()&*^!@""'`\/#";
 
 CREATE DOMAIN public."Dom1_$%{}[]()&*^!@""'`\/#"
     AS text
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/pg/default/alter_domain_null_type.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/pg/default/alter_domain_null_type.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/pg/default/alter_domain_null_type.sql	(date 1632803271941)
@@ -1,6 +1,6 @@
 -- DOMAIN: public.Dom1_$%{}[]()&*^!@"'`\/#
 
--- DROP DOMAIN public."Dom1_$%{}[]()&*^!@""'`\/#";
+-- DROP DOMAIN IF EXISTS public."Dom1_$%{}[]()&*^!@""'`\/#";
 
 CREATE DOMAIN public."Dom1_$%{}[]()&*^!@""'`\/#"
     AS text
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/pg/default/create_domain.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/pg/default/create_domain.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/pg/default/create_domain.sql	(date 1632803258122)
@@ -1,6 +1,6 @@
 -- DOMAIN: public.Dom1_$%{}[]()&*^!@"'`\/#
 
--- DROP DOMAIN public."Dom1_$%{}[]()&*^!@""'`\/#";
+-- DROP DOMAIN IF EXISTS public."Dom1_$%{}[]()&*^!@""'`\/#";
 
 CREATE DOMAIN public."Dom1_$%{}[]()&*^!@""'`\/#"
     AS text
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/pg/default/alter_domain_default_expression.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/pg/default/alter_domain_default_expression.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/pg/default/alter_domain_default_expression.sql	(date 1632803265076)
@@ -1,6 +1,6 @@
 -- DOMAIN: public.Dom1_$%{}[]()&*^!@"'`\/#
 
--- DROP DOMAIN public."Dom1_$%{}[]()&*^!@""'`\/#";
+-- DROP DOMAIN IF EXISTS public."Dom1_$%{}[]()&*^!@""'`\/#";
 
 CREATE DOMAIN public."Dom1_$%{}[]()&*^!@""'`\/#"
     AS text
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/pg/default/alter_domain_name.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/pg/default/alter_domain_name.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/pg/default/alter_domain_name.sql	(date 1632803268671)
@@ -1,6 +1,6 @@
 -- DOMAIN: public.Dom2_$%{}[]()&*^!@"'`\/#
 
--- DROP DOMAIN public."Dom2_$%{}[]()&*^!@""'`\/#";
+-- DROP DOMAIN IF EXISTS public."Dom2_$%{}[]()&*^!@""'`\/#";
 
 CREATE DOMAIN public."Dom2_$%{}[]()&*^!@""'`\/#"
     AS text
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/pg/default/create_domain_numeric.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/pg/default/create_domain_numeric.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/pg/default/create_domain_numeric.sql	(date 1632803275225)
@@ -1,6 +1,6 @@
 -- DOMAIN: public.Dom1_$%{}[]()&*^!@"'`\/#
 
--- DROP DOMAIN public."Dom1_$%{}[]()&*^!@""'`\/#";
+-- DROP DOMAIN IF EXISTS public."Dom1_$%{}[]()&*^!@""'`\/#";
 
 CREATE DOMAIN public."Dom1_$%{}[]()&*^!@""'`\/#"
     AS numeric(5,2)
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.2_plus/sql/create.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.2_plus/sql/create.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.2_plus/sql/create.sql	(date 1632810292151)
@@ -2,7 +2,7 @@
 {% import 'macros/privilege.macros' as PRIVILEGE %}
 {% import 'macros/default_privilege.macros' as DEFAULT_PRIVILEGE %}
 {% if data.name %}
-CREATE SCHEMA IF NOT EXISTS {{ conn|qtIdent(data.name) }}{% if data.namespaceowner %}
+CREATE SCHEMA{% if add_not_exists_clause %} IF NOT EXISTS{% endif %} {{ conn|qtIdent(data.name) }}{% if data.namespaceowner %}
 
     AUTHORIZATION {{ conn|qtIdent(data.namespaceowner) }}{% endif %}{% endif %};
 {#  Alter the comment/description #}
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/ppas/default/alter_domain_comment.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/ppas/default/alter_domain_comment.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/ppas/default/alter_domain_comment.sql	(date 1632803287263)
@@ -1,6 +1,6 @@
 -- DOMAIN: public.Dom1_$%{}[]()&*^!@"'`\/#
 
--- DROP DOMAIN public."Dom1_$%{}[]()&*^!@""'`\/#";
+-- DROP DOMAIN IF EXISTS public."Dom1_$%{}[]()&*^!@""'`\/#";
 
 CREATE DOMAIN public."Dom1_$%{}[]()&*^!@""'`\/#"
     AS text
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/ppas/default/alter_domain_null_type.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/ppas/default/alter_domain_null_type.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/ppas/default/alter_domain_null_type.sql	(date 1632803298575)
@@ -1,6 +1,6 @@
 -- DOMAIN: public.Dom1_$%{}[]()&*^!@"'`\/#
 
--- DROP DOMAIN public."Dom1_$%{}[]()&*^!@""'`\/#";
+-- DROP DOMAIN IF EXISTS public."Dom1_$%{}[]()&*^!@""'`\/#";
 
 CREATE DOMAIN public."Dom1_$%{}[]()&*^!@""'`\/#"
     AS text
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/ppas/default/create_domain.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/ppas/default/create_domain.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/ppas/default/create_domain.sql	(date 1632803302385)
@@ -1,6 +1,6 @@
 -- DOMAIN: public.Dom1_$%{}[]()&*^!@"'`\/#
 
--- DROP DOMAIN public."Dom1_$%{}[]()&*^!@""'`\/#";
+-- DROP DOMAIN IF EXISTS public."Dom1_$%{}[]()&*^!@""'`\/#";
 
 CREATE DOMAIN public."Dom1_$%{}[]()&*^!@""'`\/#"
     AS text
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/ppas/default/alter_domain_default_expression.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/ppas/default/alter_domain_default_expression.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/ppas/default/alter_domain_default_expression.sql	(date 1632803294140)
@@ -1,6 +1,6 @@
 -- DOMAIN: public.Dom1_$%{}[]()&*^!@"'`\/#
 
--- DROP DOMAIN public."Dom1_$%{}[]()&*^!@""'`\/#";
+-- DROP DOMAIN IF EXISTS public."Dom1_$%{}[]()&*^!@""'`\/#";
 
 CREATE DOMAIN public."Dom1_$%{}[]()&*^!@""'`\/#"
     AS text
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/ppas/default/alter_domain_name.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/ppas/default/alter_domain_name.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/ppas/default/alter_domain_name.sql	(date 1632803290998)
@@ -1,6 +1,6 @@
 -- DOMAIN: public.Dom2_$%{}[]()&*^!@"'`\/#
 
--- DROP DOMAIN public."Dom2_$%{}[]()&*^!@""'`\/#";
+-- DROP DOMAIN IF EXISTS public."Dom2_$%{}[]()&*^!@""'`\/#";
 
 CREATE DOMAIN public."Dom2_$%{}[]()&*^!@""'`\/#"
     AS text
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/ppas/default/create_domain_numeric.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/ppas/default/create_domain_numeric.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/ppas/default/create_domain_numeric.sql	(date 1632803307419)
@@ -1,6 +1,6 @@
 -- DOMAIN: public.Dom1_$%{}[]()&*^!@"'`\/#
 
--- DROP DOMAIN public."Dom1_$%{}[]()&*^!@""'`\/#";
+-- DROP DOMAIN IF EXISTS public."Dom1_$%{}[]()&*^!@""'`\/#";
 
 CREATE DOMAIN public."Dom1_$%{}[]()&*^!@""'`\/#"
     AS numeric(5,2)
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/__init__.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/__init__.py	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/__init__.py	(date 1632744060692)
@@ -1055,7 +1055,7 @@
         sql_header = """
 -- CATALOG: {0}
 
--- DROP SCHEMA {0};
+-- DROP SCHEMA IF EXISTS {0};
 
 """.format(old_data['name'])
 
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_seq_change_grantee_privs.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_seq_change_grantee_privs.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_seq_change_grantee_privs.sql	(date 1632803584375)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     CYCLE
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_seq_change_grantee_privs.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_seq_change_grantee_privs.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_seq_change_grantee_privs.sql	(date 1632803664063)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     CYCLE
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/__init__.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/__init__.py	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/__init__.py	(date 1632802386518)
@@ -860,7 +860,7 @@
 
         sql_header = """-- Text Search Dictionary: {0}.{1}\n\n""".format(
             res['rows'][0]['schema'], res['rows'][0]['name'])
-        sql_header += """-- DROP TEXT SEARCH DICTIONARY {0};\n
+        sql_header += """-- DROP TEXT SEARCH DICTIONARY IF EXISTS {0};\n
 """.format(self.qtIdent(self.conn, res['rows'][0]['schema'],
                         res['rows'][0]['name']))
 
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_ownedby_remove.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_ownedby_remove.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_ownedby_remove.sql	(date 1632803650109)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     INCREMENT 5
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/default/create_fts_dictionary.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/default/create_fts_dictionary.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/default/create_fts_dictionary.sql	(date 1632805746766)
@@ -1,6 +1,6 @@
 -- Text Search Dictionary: public.Dictionary1_$%{}[]()&*^!@"'`\/#
 
--- DROP TEXT SEARCH DICTIONARY public."Dictionary1_$%{}[]()&*^!@""'`\/#";
+-- DROP TEXT SEARCH DICTIONARY IF EXISTS public."Dictionary1_$%{}[]()&*^!@""'`\/#";
 
 CREATE TEXT SEARCH DICTIONARY public."Dictionary1_$%{}[]()&*^!@""'`\/#" (
     TEMPLATE = simple
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/default/alter_fts_dictionary_delete_options.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/default/alter_fts_dictionary_delete_options.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/default/alter_fts_dictionary_delete_options.sql	(date 1632803514158)
@@ -1,6 +1,6 @@
 -- Text Search Dictionary: public.Test Dictionary Edit#1
 
--- DROP TEXT SEARCH DICTIONARY public."Test Dictionary Edit#1";
+-- DROP TEXT SEARCH DICTIONARY IF EXISTS public."Test Dictionary Edit#1";
 
 CREATE TEXT SEARCH DICTIONARY public."Test Dictionary Edit#1" (
     TEMPLATE = simple
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/default/alter_fts_dictionary_options.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/default/alter_fts_dictionary_options.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/default/alter_fts_dictionary_options.sql	(date 1632803518641)
@@ -1,6 +1,6 @@
 -- Text Search Dictionary: public.Test Dictionary Edit#1
 
--- DROP TEXT SEARCH DICTIONARY public."Test Dictionary Edit#1";
+-- DROP TEXT SEARCH DICTIONARY IF EXISTS public."Test Dictionary Edit#1";
 
 CREATE TEXT SEARCH DICTIONARY public."Test Dictionary Edit#1" (
     TEMPLATE = simple,
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/tests/ppas/9.2_plus/create_schema_all_options_msql.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/tests/ppas/9.2_plus/create_schema_all_options_msql.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/tests/ppas/9.2_plus/create_schema_all_options_msql.sql	(date 1632810713386)
@@ -1,4 +1,4 @@
-CREATE SCHEMA IF NOT EXISTS "test_schema_$%{}[]()&*^!@""""'`\/#";
+CREATE SCHEMA "test_schema_$%{}[]()&*^!@""""'`\/#";
 
 COMMENT ON SCHEMA "test_schema_$%{}[]()&*^!@""""'`\/#"
     IS 'This is a test comment';
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/tests/ppas/9.2_plus/create_schema_with_comment_msql.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/tests/ppas/9.2_plus/create_schema_with_comment_msql.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/tests/ppas/9.2_plus/create_schema_with_comment_msql.sql	(date 1632810892130)
@@ -1,4 +1,4 @@
-CREATE SCHEMA IF NOT EXISTS "test_schema_$%{}[]()&*^!@""""'`\/#";
+CREATE SCHEMA "test_schema_$%{}[]()&*^!@""""'`\/#";
 
 COMMENT ON SCHEMA "test_schema_$%{}[]()&*^!@""""'`\/#"
     IS 'This is a test comment';
Index: web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/10_plus/alter_sync.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/10_plus/alter_sync.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/10_plus/alter_sync.sql	(date 1632806550509)
@@ -1,6 +1,6 @@
 -- Subscription: test_alter_subscription
 
--- DROP SUBSCRIPTION test_alter_subscription;
+-- DROP SUBSCRIPTION IF EXISTS test_alter_subscription;
 
 CREATE SUBSCRIPTION test_alter_subscription
     CONNECTION 'host=localhost port=5432 user=postgres dbname=postgres'
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/__init__.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/__init__.py	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/__init__.py	(date 1632802421440)
@@ -755,7 +755,7 @@
         sql_header = """-- SEQUENCE: {0}.{1}\n\n""".format(
             result['schema'], result['name'])
 
-        sql_header += """-- DROP SEQUENCE {0};
+        sql_header += """-- DROP SEQUENCE IF EXISTS {0};
 
 """.format(self.qtIdent(self.conn, result['schema'], result['name']))
 
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/__init__.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/__init__.py	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/__init__.py	(date 1632744002543)
@@ -840,7 +840,7 @@
         sql_header = """-- Foreign Data Wrapper: {0}\n\n""".format(
             res['rows'][0]['name'])
 
-        sql_header += """-- DROP FOREIGN DATA WRAPPER {0}
+        sql_header += """-- DROP FOREIGN DATA WRAPPER IF EXISTS {0}
 
 """.format(self.qtIdent(self.conn, res['rows'][0]['name']))
 
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_seq_privs_add.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_seq_privs_add.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_seq_privs_add.sql	(date 1632803595087)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     CYCLE
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/tests/default/create_fts_dictionary.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/tests/default/create_fts_dictionary.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/tests/default/create_fts_dictionary.sql	(date 1632805669007)
@@ -1,6 +1,6 @@
 -- Text Search Dictionary: test.test_dic
 
--- DROP TEXT SEARCH DICTIONARY test.test_dic;
+-- DROP TEXT SEARCH DICTIONARY IF EXISTS test.test_dic;
 
 CREATE TEXT SEARCH DICTIONARY test.test_dic (
     TEMPLATE = simple
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_seq_comment.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_seq_comment.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_seq_comment.sql	(date 1632803589334)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     INCREMENT 5
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_seq_privs_remove.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_seq_privs_remove.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_seq_privs_remove.sql	(date 1632803599649)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     CYCLE
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_neg_seq_props.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_neg_seq_props.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_neg_seq_props.sql	(date 1632803568516)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     INCREMENT -7
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_seq_privs_update.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_seq_privs_update.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_seq_privs_update.sql	(date 1632803604591)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     CYCLE
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/alter_fdw_comment.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/alter_fdw_comment.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/alter_fdw_comment.sql	(date 1632803156055)
@@ -1,6 +1,6 @@
 -- Foreign Data Wrapper: Fdw1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
+-- DROP FOREIGN DATA WRAPPER IF EXISTS "Fdw1_$%{}[]()&*^!@""'`\/#"
 
 CREATE FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#";
 
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/alter_fdw_opt1.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/alter_fdw_opt1.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/alter_fdw_opt1.sql	(date 1632803164095)
@@ -1,6 +1,6 @@
 -- Foreign Data Wrapper: Fdw1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
+-- DROP FOREIGN DATA WRAPPER IF EXISTS "Fdw1_$%{}[]()&*^!@""'`\/#"
 
 CREATE FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
     OPTIONS (opt1 'val1');
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/create_negative_sequence.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/create_negative_sequence.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/create_negative_sequence.sql	(date 1632803615495)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     INCREMENT -5
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/alter_fdw_change_opt2.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/alter_fdw_change_opt2.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/alter_fdw_change_opt2.sql	(date 1632803159739)
@@ -1,6 +1,6 @@
 -- Foreign Data Wrapper: Fdw1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
+-- DROP FOREIGN DATA WRAPPER IF EXISTS "Fdw1_$%{}[]()&*^!@""'`\/#"
 
 CREATE FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
     OPTIONS (opt1 'val1', opt2 'valopt2');
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_seq_props.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_seq_props.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_seq_props.sql	(date 1632803609423)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     CYCLE
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/alter_fdw_privileges.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/alter_fdw_privileges.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/alter_fdw_privileges.sql	(date 1632803167735)
@@ -1,6 +1,6 @@
 -- Foreign Data Wrapper: Fdw2_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN DATA WRAPPER "Fdw2_$%{}[]()&*^!@""'`\/#"
+-- DROP FOREIGN DATA WRAPPER IF EXISTS "Fdw2_$%{}[]()&*^!@""'`\/#"
 
 CREATE FOREIGN DATA WRAPPER "Fdw2_$%{}[]()&*^!@""'`\/#"
     VALIDATOR pg_catalog.postgresql_fdw_validator
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/create_sequence.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/create_sequence.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/create_sequence.sql	(date 1632803620695)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     INCREMENT 5
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/alter_fdw_opt2.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/alter_fdw_opt2.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/alter_fdw_opt2.sql	(date 1632803170969)
@@ -1,6 +1,6 @@
 -- Foreign Data Wrapper: Fdw1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
+-- DROP FOREIGN DATA WRAPPER IF EXISTS "Fdw1_$%{}[]()&*^!@""'`\/#"
 
 CREATE FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
     OPTIONS (opt1 'val1', opt2 'val2');
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/alter_fdw_rename.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/alter_fdw_rename.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/alter_fdw_rename.sql	(date 1632803175545)
@@ -1,6 +1,6 @@
 -- Foreign Data Wrapper: Fdw2_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN DATA WRAPPER "Fdw2_$%{}[]()&*^!@""'`\/#"
+-- DROP FOREIGN DATA WRAPPER IF EXISTS "Fdw2_$%{}[]()&*^!@""'`\/#"
 
 CREATE FOREIGN DATA WRAPPER "Fdw2_$%{}[]()&*^!@""'`\/#"
     VALIDATOR pg_catalog.postgresql_fdw_validator
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_seq_privs_add.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_seq_privs_add.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_seq_privs_add.sql	(date 1632803668338)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     CYCLE
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/alter_fdw_validator.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/alter_fdw_validator.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/alter_fdw_validator.sql	(date 1632803179232)
@@ -1,6 +1,6 @@
 -- Foreign Data Wrapper: Fdw1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
+-- DROP FOREIGN DATA WRAPPER IF EXISTS "Fdw1_$%{}[]()&*^!@""'`\/#"
 
 CREATE FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
     VALIDATOR pg_catalog.postgresql_fdw_validator
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/create_fdw.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/create_fdw.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/pg/9.3_plus/create_fdw.sql	(date 1632803182683)
@@ -1,6 +1,6 @@
 -- Foreign Data Wrapper: Fdw1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
+-- DROP FOREIGN DATA WRAPPER IF EXISTS "Fdw1_$%{}[]()&*^!@""'`\/#"
 
 CREATE FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#";
 
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/alter_fdw_comment.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/alter_fdw_comment.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/alter_fdw_comment.sql	(date 1632803193267)
@@ -1,6 +1,6 @@
 -- Foreign Data Wrapper: Fdw1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
+-- DROP FOREIGN DATA WRAPPER IF EXISTS "Fdw1_$%{}[]()&*^!@""'`\/#"
 
 CREATE FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#";
 
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_seq_comment.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_seq_comment.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_seq_comment.sql	(date 1632803664057)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     INCREMENT 5
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/alter_fdw_opt1.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/alter_fdw_opt1.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/alter_fdw_opt1.sql	(date 1632803197033)
@@ -1,6 +1,6 @@
 -- Foreign Data Wrapper: Fdw1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
+-- DROP FOREIGN DATA WRAPPER IF EXISTS "Fdw1_$%{}[]()&*^!@""'`\/#"
 
 CREATE FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
     OPTIONS (opt1 'val1');
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/alter_fdw_change_opt2.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/alter_fdw_change_opt2.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/alter_fdw_change_opt2.sql	(date 1632803188549)
@@ -1,6 +1,6 @@
 -- Foreign Data Wrapper: Fdw1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
+-- DROP FOREIGN DATA WRAPPER IF EXISTS "Fdw1_$%{}[]()&*^!@""'`\/#"
 
 CREATE FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
     OPTIONS (opt1 'val1', opt2 'valopt2');
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_seq_privs_remove.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_seq_privs_remove.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_seq_privs_remove.sql	(date 1632803672616)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     CYCLE
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/alter_fdw_privileges.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/alter_fdw_privileges.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/alter_fdw_privileges.sql	(date 1632803206583)
@@ -1,6 +1,6 @@
 -- Foreign Data Wrapper: Fdw2_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN DATA WRAPPER "Fdw2_$%{}[]()&*^!@""'`\/#"
+-- DROP FOREIGN DATA WRAPPER IF EXISTS "Fdw2_$%{}[]()&*^!@""'`\/#"
 
 CREATE FOREIGN DATA WRAPPER "Fdw2_$%{}[]()&*^!@""'`\/#"
     VALIDATOR pg_catalog.postgresql_fdw_validator
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_neg_seq_props.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_neg_seq_props.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_neg_seq_props.sql	(date 1632803645455)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     INCREMENT -7
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/alter_fdw_opt2.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/alter_fdw_opt2.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/alter_fdw_opt2.sql	(date 1632803200601)
@@ -1,6 +1,6 @@
 -- Foreign Data Wrapper: Fdw1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
+-- DROP FOREIGN DATA WRAPPER IF EXISTS "Fdw1_$%{}[]()&*^!@""'`\/#"
 
 CREATE FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
     OPTIONS (opt1 'val1', opt2 'val2');
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_seq_privs_update.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_seq_privs_update.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_seq_privs_update.sql	(date 1632803678263)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     CYCLE
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/alter_fdw_rename.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/alter_fdw_rename.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/alter_fdw_rename.sql	(date 1632803210364)
@@ -1,6 +1,6 @@
 -- Foreign Data Wrapper: Fdw2_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN DATA WRAPPER "Fdw2_$%{}[]()&*^!@""'`\/#"
+-- DROP FOREIGN DATA WRAPPER IF EXISTS "Fdw2_$%{}[]()&*^!@""'`\/#"
 
 CREATE FOREIGN DATA WRAPPER "Fdw2_$%{}[]()&*^!@""'`\/#"
     VALIDATOR pg_catalog.postgresql_fdw_validator
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/alter_fdw_validator.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/alter_fdw_validator.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/alter_fdw_validator.sql	(date 1632803214562)
@@ -1,6 +1,6 @@
 -- Foreign Data Wrapper: Fdw1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
+-- DROP FOREIGN DATA WRAPPER IF EXISTS "Fdw1_$%{}[]()&*^!@""'`\/#"
 
 CREATE FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
     VALIDATOR pg_catalog.postgresql_fdw_validator
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/create_fdw.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/create_fdw.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/ppas/9.3_plus/create_fdw.sql	(date 1632803218341)
@@ -1,6 +1,6 @@
 -- Foreign Data Wrapper: Fdw1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#"
+-- DROP FOREIGN DATA WRAPPER IF EXISTS "Fdw1_$%{}[]()&*^!@""'`\/#"
 
 CREATE FOREIGN DATA WRAPPER "Fdw1_$%{}[]()&*^!@""'`\/#";
 
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/create_negative_sequence.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/create_negative_sequence.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/create_negative_sequence.sql	(date 1632803687746)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     INCREMENT -5
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_seq_props.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_seq_props.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_seq_props.sql	(date 1632803682540)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     CYCLE
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_ownedby_column.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_ownedby_column.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/alter_ownedby_column.sql	(date 1632803645461)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     INCREMENT 5
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/create_sequence.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/create_sequence.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/create_sequence.sql	(date 1632803692846)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     INCREMENT 5
Index: web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/10_plus/alter_subscription.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/10_plus/alter_subscription.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/10_plus/alter_subscription.sql	(date 1632806542763)
@@ -1,6 +1,6 @@
 -- Subscription: test_alter_subscription
 
--- DROP SUBSCRIPTION test_alter_subscription;
+-- DROP SUBSCRIPTION IF EXISTS test_alter_subscription;
 
 CREATE SUBSCRIPTION test_alter_subscription
     CONNECTION 'host=localhost port=5432 user=postgres dbname=postgres'
Index: web/pgadmin/browser/server_groups/servers/databases/subscriptions/__init__.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/subscriptions/__init__.py	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/subscriptions/__init__.py	(date 1632820427859)
@@ -785,7 +785,8 @@
         sql_header = "-- Subscription: {}".format(old_data['name'])
         sql_header += "\n\n"
 
-        sql_header += "-- DROP SUBSCRIPTION {};".format(old_data['name'])
+        sql_header += "-- DROP SUBSCRIPTION IF EXISTS {};".format(
+            old_data['name'])
 
         sql_header += render_template(
             "/".join([self.template_path, self._DELETE_SQL]),
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/__init__.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/__init__.py	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/__init__.py	(date 1632744022382)
@@ -848,7 +848,7 @@
 
         sql_header = """-- Foreign Server: {0}
 
--- DROP SERVER {0}
+-- DROP SERVER IF EXISTS {0}
 
 """.format(res['rows'][0]['name'])
 
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/__init__.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/__init__.py	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/__init__.py	(date 1632743978461)
@@ -911,7 +911,7 @@
         sql_header = """-- FOREIGN TABLE: {0}.{1}\n\n""".format(
             data['basensp'], data['name'])
 
-        sql_header += """-- DROP FOREIGN TABLE {0};
+        sql_header += """-- DROP FOREIGN TABLE IF EXISTS {0};
 
 """.format(self.qtIdent(self.conn, data['basensp'], data['name']))
 
Index: web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/10_plus/alter_maintenance_db.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/10_plus/alter_maintenance_db.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/10_plus/alter_maintenance_db.sql	(date 1632806572651)
@@ -1,6 +1,6 @@
 -- Subscription: test_alter_subscription
 
--- DROP SUBSCRIPTION test_alter_subscription;
+-- DROP SUBSCRIPTION IF EXISTS test_alter_subscription;
 
 CREATE SUBSCRIPTION test_alter_subscription
     CONNECTION 'host=localhost port=5432 user=postgres dbname=edb'
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/rules/sql/create.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/rules/sql/create.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/rules/sql/create.sql	(date 1632816476005)
@@ -2,7 +2,7 @@
 {% if display_comments %}
 -- Rule: {{ conn|qtIdent(data.name) }} ON {{ conn|qtIdent(data.schema, data.view) }}
 
--- DROP Rule {{ conn|qtIdent(data.name) }} ON {{ conn|qtIdent(data.schema, data.view) }};
+-- DROP Rule IF EXISTS {{ conn|qtIdent(data.name) }} ON {{ conn|qtIdent(data.schema, data.view) }};
 
 {% endif %}
 {% if data.name and data.schema and data.view %}
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/pg/9.3_plus/alter_remove_options_priv.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/pg/9.3_plus/alter_remove_options_priv.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/pg/9.3_plus/alter_remove_options_priv.sql	(date 1632802865729)
@@ -1,6 +1,6 @@
 -- Foreign Server: FS_$%{}[]()&*^!@"'`\/#
 
--- DROP SERVER FS_$%{}[]()&*^!@"'`\/#
+-- DROP SERVER IF EXISTS FS_$%{}[]()&*^!@"'`\/#
 
 CREATE SERVER "FS_$%{}[]()&*^!@""'`\/#"
     VERSION '1.1'
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/pg/9.3_plus/alter_options_privileges.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/pg/9.3_plus/alter_options_privileges.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/pg/9.3_plus/alter_options_privileges.sql	(date 1632802858047)
@@ -1,6 +1,6 @@
 -- Foreign Server: FS_$%{}[]()&*^!@"'`\/#
 
--- DROP SERVER FS_$%{}[]()&*^!@"'`\/#
+-- DROP SERVER IF EXISTS FS_$%{}[]()&*^!@"'`\/#
 
 CREATE SERVER "FS_$%{}[]()&*^!@""'`\/#"
     VERSION '1.1'
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.2_plus/alter_remove_opts_priv.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.2_plus/alter_remove_opts_priv.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.2_plus/alter_remove_opts_priv.sql	(date 1632803364294)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 integer NULL
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/create_sequence_ownedby.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/create_sequence_ownedby.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/ppas/default/create_sequence_ownedby.sql	(date 1632803699753)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     INCREMENT 5
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/pg/9.3_plus/create_fs_all_options.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/pg/9.3_plus/create_fs_all_options.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/pg/9.3_plus/create_fs_all_options.sql	(date 1632802820607)
@@ -1,6 +1,6 @@
 -- Foreign Server: FS_$%{}[]()&*^!@"'`\/#
 
--- DROP SERVER FS_$%{}[]()&*^!@"'`\/#
+-- DROP SERVER IF EXISTS FS_$%{}[]()&*^!@"'`\/#
 
 CREATE SERVER "FS_$%{}[]()&*^!@""'`\/#"
     TYPE 'oracle'
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.2_plus/alter_add_opts.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.2_plus/alter_add_opts.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.2_plus/alter_add_opts.sql	(date 1632803343384)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 bigint NULL,
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/__init__.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/__init__.py	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/__init__.py	(date 1632813359746)
@@ -485,7 +485,9 @@
         res_data = parse_rule_definition(res)
         SQL = render_template("/".join(
             [self.template_path, self._CREATE_SQL]),
-            data=res_data, display_comments=True)
+            data=res_data, display_comments=True,
+            add_replace_clause=True
+        )
 
         return ajax_response(response=SQL)
 
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/pg/9.3_plus/alter_comment_version.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/pg/9.3_plus/alter_comment_version.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/pg/9.3_plus/alter_comment_version.sql	(date 1632802848030)
@@ -1,6 +1,6 @@
 -- Foreign Server: FS_$%{}[]()&*^!@"'`\/#
 
--- DROP SERVER FS_$%{}[]()&*^!@"'`\/#
+-- DROP SERVER IF EXISTS FS_$%{}[]()&*^!@"'`\/#
 
 CREATE SERVER "FS_$%{}[]()&*^!@""'`\/#"
     VERSION '1.1'
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.2_plus/alter_comment_add_columns.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.2_plus/alter_comment_add_columns.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.2_plus/alter_comment_add_columns.sql	(date 1632803358911)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 bigint NULL,
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.2_plus/create_foreign_table_with_all_options.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.2_plus/create_foreign_table_with_all_options.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.2_plus/create_foreign_table_with_all_options.sql	(date 1632803370154)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE IF NOT EXISTS public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 bigint NULL,
Index: web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/10_plus/create_subscription.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/10_plus/create_subscription.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/subscriptions/tests/10_plus/create_subscription.sql	(date 1632806535433)
@@ -1,6 +1,6 @@
 -- Subscription: test_create_subscription
 
--- DROP SUBSCRIPTION test_create_subscription;
+-- DROP SUBSCRIPTION IF EXISTS test_create_subscription;
 
 CREATE SUBSCRIPTION test_create_subscription
     CONNECTION 'host=localhost port=5432 user=postgres dbname=postgres'
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.2_plus/alter_col_opts.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.2_plus/alter_col_opts.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.2_plus/alter_col_opts.sql	(date 1632803353975)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 integer NULL
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/ppas/9.3_plus/alter_remove_options_priv.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/ppas/9.3_plus/alter_remove_options_priv.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/ppas/9.3_plus/alter_remove_options_priv.sql	(date 1632802897991)
@@ -1,6 +1,6 @@
 -- Foreign Server: FS_$%{}[]()&*^!@"'`\/#
 
--- DROP SERVER FS_$%{}[]()&*^!@"'`\/#
+-- DROP SERVER IF EXISTS FS_$%{}[]()&*^!@"'`\/#
 
 CREATE SERVER "FS_$%{}[]()&*^!@""'`\/#"
     VERSION '1.1'
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/ppas/9.3_plus/alter_options_privileges.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/ppas/9.3_plus/alter_options_privileges.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/ppas/9.3_plus/alter_options_privileges.sql	(date 1632802894385)
@@ -1,6 +1,6 @@
 -- Foreign Server: FS_$%{}[]()&*^!@"'`\/#
 
--- DROP SERVER FS_$%{}[]()&*^!@"'`\/#
+-- DROP SERVER IF EXISTS FS_$%{}[]()&*^!@"'`\/#
 
 CREATE SERVER "FS_$%{}[]()&*^!@""'`\/#"
     VERSION '1.1'
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.2_plus/alter_add_priv.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.2_plus/alter_add_priv.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.2_plus/alter_add_priv.sql	(date 1632803349232)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 bigint NULL,
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/ppas/9.3_plus/create_fs_all_options.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/ppas/9.3_plus/create_fs_all_options.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/ppas/9.3_plus/create_fs_all_options.sql	(date 1632802902495)
@@ -1,6 +1,6 @@
 -- Foreign Server: FS_$%{}[]()&*^!@"'`\/#
 
--- DROP SERVER FS_$%{}[]()&*^!@"'`\/#
+-- DROP SERVER IF EXISTS FS_$%{}[]()&*^!@"'`\/#
 
 CREATE SERVER "FS_$%{}[]()&*^!@""'`\/#"
     TYPE 'oracle'
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/ppas/9.3_plus/alter_comment_version.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/ppas/9.3_plus/alter_comment_version.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/ppas/9.3_plus/alter_comment_version.sql	(date 1632802890708)
@@ -1,6 +1,6 @@
 -- Foreign Server: FS_$%{}[]()&*^!@"'`\/#
 
--- DROP SERVER FS_$%{}[]()&*^!@"'`\/#
+-- DROP SERVER IF EXISTS FS_$%{}[]()&*^!@"'`\/#
 
 CREATE SERVER "FS_$%{}[]()&*^!@""'`\/#"
     VERSION '1.1'
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/alter_update_event_rule.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/alter_update_event_rule.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/alter_update_event_rule.sql	(date 1632816763442)
@@ -1,8 +1,8 @@
 -- Rule: "test_update_rule1_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule
 
--- DROP Rule "test_update_rule1_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule;
+-- DROP Rule IF EXISTS "test_update_rule1_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule;
 
-CREATE RULE "test_update_rule1_$%{}[]()&*^!@""'`\/#" AS
+CREATE OR REPLACE RULE "test_update_rule1_$%{}[]()&*^!@""'`\/#" AS
     ON UPDATE TO public.test_emp_rule
     WHERE (old.name = 'Sam'::text)
     DO INSTEAD
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.6_plus/alter_col_opts.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.6_plus/alter_col_opts.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.6_plus/alter_col_opts.sql	(date 1632803387225)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE IF NOT EXISTS public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 integer NULL
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/alter_insert_event_rule_nothing_update.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/alter_insert_event_rule_nothing_update.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/alter_insert_event_rule_nothing_update.sql	(date 1632816882865)
@@ -1,8 +1,8 @@
 -- Rule: "test_insert_rule1_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule
 
--- DROP Rule "test_insert_rule1_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule;
+-- DROP Rule IF EXISTS "test_insert_rule1_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule;
 
-CREATE RULE "test_insert_rule1_$%{}[]()&*^!@""'`\/#" AS
+CREATE OR REPLACE RULE "test_insert_rule1_$%{}[]()&*^!@""'`\/#" AS
     ON UPDATE TO public.test_emp_rule
     WHERE (new.salary > 8000)
     DO INSTEAD NOTHING;
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/alter_insert_event_rule_complex.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/alter_insert_event_rule_complex.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/alter_insert_event_rule_complex.sql	(date 1632816756119)
@@ -1,8 +1,8 @@
 -- Rule: "test_insert_rule1_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule
 
--- DROP Rule "test_insert_rule1_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule;
+-- DROP Rule IF EXISTS "test_insert_rule1_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule;
 
-CREATE RULE "test_insert_rule1_$%{}[]()&*^!@""'`\/#" AS
+CREATE OR REPLACE RULE "test_insert_rule1_$%{}[]()&*^!@""'`\/#" AS
     ON INSERT TO public.test_emp_rule
     WHERE (new.salary > 8000)
     DO INSTEAD
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_ownedby_remove.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_ownedby_remove.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_ownedby_remove.sql	(date 1632803579128)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     INCREMENT 5
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/create_sequence_ownedby_remove.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/create_sequence_ownedby_remove.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/create_sequence_ownedby_remove.sql	(date 1632803631358)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     INCREMENT 5
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/create_insert_event_rule.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/create_insert_event_rule.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/create_insert_event_rule.sql	(date 1632816861932)
@@ -1,8 +1,8 @@
 -- Rule: "test_insert_rule_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule
 
--- DROP Rule "test_insert_rule_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule;
+-- DROP Rule IF EXISTS "test_insert_rule_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule;
 
-CREATE RULE "test_insert_rule_$%{}[]()&*^!@""'`\/#" AS
+CREATE OR REPLACE RULE "test_insert_rule_$%{}[]()&*^!@""'`\/#" AS
     ON INSERT TO public.test_emp_rule
     WHERE (new.salary > 5000)
     DO
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.6_plus/alter_comment_add_columns.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.6_plus/alter_comment_add_columns.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.6_plus/alter_comment_add_columns.sql	(date 1632803392732)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE IF NOT EXISTS public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 bigint NULL,
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/alter_insert_event_rule.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/alter_insert_event_rule.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/alter_insert_event_rule.sql	(date 1632816748720)
@@ -1,8 +1,8 @@
 -- Rule: "test_insert_rule1_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule
 
--- DROP Rule "test_insert_rule1_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule;
+-- DROP Rule IF EXISTS "test_insert_rule1_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule;
 
-CREATE RULE "test_insert_rule1_$%{}[]()&*^!@""'`\/#" AS
+CREATE OR REPLACE RULE "test_insert_rule1_$%{}[]()&*^!@""'`\/#" AS
     ON INSERT TO public.test_emp_rule
     WHERE (new.salary > 8000)
     DO INSTEAD
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.6_plus/create_foreign_table_with_all_options.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.6_plus/create_foreign_table_with_all_options.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.6_plus/create_foreign_table_with_all_options.sql	(date 1632803404983)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE IF NOT EXISTS public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 bigint NULL,
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/create_sequence_ownedby.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/create_sequence_ownedby.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/create_sequence_ownedby.sql	(date 1632803625923)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     INCREMENT 5
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.6_plus/alter_add_cons_opts.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.6_plus/alter_add_cons_opts.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.6_plus/alter_add_cons_opts.sql	(date 1632803377819)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE IF NOT EXISTS public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 bigint NULL,
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.6_plus/alter_add_priv.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.6_plus/alter_add_priv.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.6_plus/alter_add_priv.sql	(date 1632803381925)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE IF NOT EXISTS public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 bigint NULL,
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.6_plus/alter_remove_opts_priv_cons.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.6_plus/alter_remove_opts_priv_cons.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/pg/9.6_plus/alter_remove_opts_priv_cons.sql	(date 1632803398072)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE IF NOT EXISTS public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 integer NULL
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/alter_insert_event_rule_nothing.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/alter_insert_event_rule_nothing.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/alter_insert_event_rule_nothing.sql	(date 1632816759708)
@@ -1,8 +1,8 @@
 -- Rule: "test_insert_rule1_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule
 
--- DROP Rule "test_insert_rule1_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule;
+-- DROP Rule IF EXISTS "test_insert_rule1_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule;
 
-CREATE RULE "test_insert_rule1_$%{}[]()&*^!@""'`\/#" AS
+CREATE OR REPLACE RULE "test_insert_rule1_$%{}[]()&*^!@""'`\/#" AS
     ON INSERT TO public.test_emp_rule
     WHERE (new.salary > 8000)
     DO INSTEAD NOTHING;
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/create_delete_event_rule.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/create_delete_event_rule.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/create_delete_event_rule.sql	(date 1632816768069)
@@ -1,7 +1,7 @@
 -- Rule: "test_delete_rule_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule
 
--- DROP Rule "test_delete_rule_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule;
+-- DROP Rule IF EXISTS "test_delete_rule_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule;
 
-CREATE RULE "test_delete_rule_$%{}[]()&*^!@""'`\/#" AS
+CREATE OR REPLACE RULE "test_delete_rule_$%{}[]()&*^!@""'`\/#" AS
     ON DELETE TO public.test_emp_rule
     DO NOTHING;
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_ownedby_column.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_ownedby_column.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/pg/default/alter_ownedby_column.sql	(date 1632803574277)
@@ -1,6 +1,6 @@
 -- SEQUENCE: public.Seq1_$%{}[]()&*^!@"'`\/#
 
--- DROP SEQUENCE public."Seq1_$%{}[]()&*^!@""'`\/#";
+-- DROP SEQUENCE IF EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#";
 
 CREATE SEQUENCE IF NOT EXISTS public."Seq1_$%{}[]()&*^!@""'`\/#"
     INCREMENT 5
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/alter_delete_event_rule.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/alter_delete_event_rule.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/alter_delete_event_rule.sql	(date 1632816904384)
@@ -1,8 +1,8 @@
 -- Rule: "test_delete_rule1_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule
 
--- DROP Rule "test_delete_rule1_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule;
+-- DROP Rule IF EXISTS "test_delete_rule1_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule;
 
-CREATE RULE "test_delete_rule1_$%{}[]()&*^!@""'`\/#" AS
+CREATE OR REPLACE RULE "test_delete_rule1_$%{}[]()&*^!@""'`\/#" AS
     ON DELETE TO public.test_emp_rule
     DO INSTEAD
 (DELETE FROM test_emp_rule
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.2_plus/alter_column.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.2_plus/alter_column.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.2_plus/alter_column.sql	(date 1632803422732)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 integer NULL,
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.2_plus/alter_remove_priv.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.2_plus/alter_remove_priv.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.2_plus/alter_remove_priv.sql	(date 1632803435971)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 integer NULL,
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/create_update_event_rule.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/create_update_event_rule.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/default/create_update_event_rule.sql	(date 1632816739675)
@@ -1,8 +1,8 @@
 -- Rule: "test_update_rule_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule
 
--- DROP Rule "test_update_rule_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule;
+-- DROP Rule IF EXISTS "test_update_rule_$%{}[]()&*^!@""'`\/#" ON public.test_emp_rule;
 
-CREATE RULE "test_update_rule_$%{}[]()&*^!@""'`\/#" AS
+CREATE OR REPLACE RULE "test_update_rule_$%{}[]()&*^!@""'`\/#" AS
     ON UPDATE TO public.test_emp_rule
     WHERE (old.name = 'Joe'::text)
     DO
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.2_plus/alter_comment_add_columns.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.2_plus/alter_comment_add_columns.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.2_plus/alter_comment_add_columns.sql	(date 1632803429863)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE IF NOT EXISTS public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 bigint NULL,
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.2_plus/create_foreign_table_with_all_options.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.2_plus/create_foreign_table_with_all_options.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.2_plus/create_foreign_table_with_all_options.sql	(date 1632803442334)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE IF NOT EXISTS public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 bigint NULL,
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/__init__.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/__init__.py	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/__init__.py	(date 1632814503719)
@@ -839,7 +839,7 @@
 
         sql_header = """-- User Mapping : {0}
 
--- DROP USER MAPPING FOR {0} SERVER {1}
+-- DROP USER MAPPING IF EXISTS FOR {0} SERVER {1}
 
 """.format(res['rows'][0]['name'], fdw_data['name'])
 
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.2_plus/alter_add_priv.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.2_plus/alter_add_priv.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.2_plus/alter_add_priv.sql	(date 1632803415367)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE IF NOT EXISTS public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 bigint NULL,
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.6_plus/alter_col_opts.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.6_plus/alter_col_opts.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.6_plus/alter_col_opts.sql	(date 1632803467477)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE IF NOT EXISTS public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 integer NULL
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.6_plus/alter_comment_add_columns.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.6_plus/alter_comment_add_columns.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.6_plus/alter_comment_add_columns.sql	(date 1632803467470)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE IF NOT EXISTS public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 bigint NULL,
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.6_plus/create_foreign_table_with_all_options.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.6_plus/create_foreign_table_with_all_options.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.6_plus/create_foreign_table_with_all_options.sql	(date 1632803481183)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE IF NOT EXISTS public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 bigint NULL,
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.6_plus/alter_add_cons_opts.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.6_plus/alter_add_cons_opts.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.6_plus/alter_add_cons_opts.sql	(date 1632803449383)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE IF NOT EXISTS public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 bigint NULL,
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/tests/pg/default/alter_options.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/tests/pg/default/alter_options.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/tests/pg/default/alter_options.sql	(date 1632802948317)
@@ -1,6 +1,6 @@
 -- User Mapping : postgres
 
--- DROP USER MAPPING FOR postgres SERVER test_fs_for_user_mapping
+-- DROP USER MAPPING IF EXISTS FOR postgres SERVER test_fs_for_user_mapping
 
 CREATE USER MAPPING FOR postgres SERVER test_fs_for_user_mapping
     OPTIONS ("user" 'test_user12', password 'secret123');
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.6_plus/alter_add_priv.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.6_plus/alter_add_priv.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.6_plus/alter_add_priv.sql	(date 1632803455517)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE IF NOT EXISTS public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 bigint NULL,
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.6_plus/alter_remove_opts_priv_cons.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.6_plus/alter_remove_opts_priv_cons.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/ppas/9.6_plus/alter_remove_opts_priv_cons.sql	(date 1632803474689)
@@ -1,6 +1,6 @@
 -- FOREIGN TABLE: public.FT1_$%{}[]()&*^!@"'`\/#
 
--- DROP FOREIGN TABLE public."FT1_$%{}[]()&*^!@""'`\/#";
+-- DROP FOREIGN TABLE IF EXISTS public."FT1_$%{}[]()&*^!@""'`\/#";
 
 CREATE FOREIGN TABLE IF NOT EXISTS public."FT1_$%{}[]()&*^!@""'`\/#"(
     col1 integer NULL
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/tests/pg/default/alter_options_deleted.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/tests/pg/default/alter_options_deleted.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/tests/pg/default/alter_options_deleted.sql	(date 1632802952033)
@@ -1,5 +1,5 @@
 -- User Mapping : postgres
 
--- DROP USER MAPPING FOR postgres SERVER test_fs_for_user_mapping
+-- DROP USER MAPPING IF EXISTS FOR postgres SERVER test_fs_for_user_mapping
 
 CREATE USER MAPPING FOR postgres SERVER test_fs_for_user_mapping;
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/tests/pg/default/create_user_mapping.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/tests/pg/default/create_user_mapping.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/tests/pg/default/create_user_mapping.sql	(date 1632816068778)
@@ -1,6 +1,6 @@
 -- User Mapping : postgres
 
--- DROP USER MAPPING FOR postgres SERVER test_fs_for_user_mapping
+-- DROP USER MAPPING IF EXISTS FOR postgres SERVER test_fs_for_user_mapping
 
 CREATE USER MAPPING FOR postgres SERVER test_fs_for_user_mapping
     OPTIONS ("user" 'test_user', password 'secret');
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/tests/ppas/default/alter_options.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/tests/ppas/default/alter_options.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/tests/ppas/default/alter_options.sql	(date 1632802966572)
@@ -1,6 +1,6 @@
 -- User Mapping : enterprisedb
 
--- DROP USER MAPPING FOR enterprisedb SERVER test_fs_for_user_mapping
+-- DROP USER MAPPING IF EXISTS FOR enterprisedb SERVER test_fs_for_user_mapping
 
 CREATE USER MAPPING FOR enterprisedb SERVER test_fs_for_user_mapping
     OPTIONS ("user" 'test_user12', password 'secret123');
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/tests/ppas/default/alter_options_deleted.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/tests/ppas/default/alter_options_deleted.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/tests/ppas/default/alter_options_deleted.sql	(date 1632802970241)
@@ -1,5 +1,5 @@
 -- User Mapping : enterprisedb
 
--- DROP USER MAPPING FOR enterprisedb SERVER test_fs_for_user_mapping
+-- DROP USER MAPPING IF EXISTS FOR enterprisedb SERVER test_fs_for_user_mapping
 
 CREATE USER MAPPING FOR enterprisedb SERVER test_fs_for_user_mapping;
Index: web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/tests/ppas/default/create_user_mapping.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/tests/ppas/default/create_user_mapping.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/tests/ppas/default/create_user_mapping.sql	(date 1632816075829)
@@ -1,6 +1,6 @@
 -- User Mapping : enterprisedb
 
--- DROP USER MAPPING FOR enterprisedb SERVER test_fs_for_user_mapping
+-- DROP USER MAPPING IF EXISTS FOR enterprisedb SERVER test_fs_for_user_mapping
 
 CREATE USER MAPPING FOR enterprisedb SERVER test_fs_for_user_mapping
     OPTIONS ("user" 'test_user', password 'secret');
Index: web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/default/sql/create.sql
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/default/sql/create.sql	(revision d616cb88aa8a883e78666916a386c1255a10e7e6)
+++ web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/default/sql/create.sql	(date 1632810332584)
@@ -2,7 +2,7 @@
 {% import 'macros/privilege.macros' as PRIVILEGE %}
 {% import 'macros/default_privilege.macros' as DEFAULT_PRIVILEGE %}
 {% if data.name %}
-CREATE SCHEMA{% if add_not_exists_clause %} IF NOT EXISTS {% endif %} {{ conn|qtIdent(data.name) }}{% if data.namespaceowner %}
+CREATE SCHEMA{% if add_not_exists_clause %} IF NOT EXISTS{% endif %} {{ conn|qtIdent(data.name) }}{% if data.namespaceowner %}
 
     AUTHORIZATION {{ conn|qtIdent(data.namespaceowner) }}{% endif %}{% endif %};
 {#  Alter the comment/description #}
