diff --git a/web/pgadmin/browser/server_groups/servers/databases/casts/templates/casts/sql/default/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/casts/templates/casts/sql/default/delete.sql
index 1ea23431e..96d625103 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/casts/templates/casts/sql/default/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/casts/templates/casts/sql/default/delete.sql
@@ -1,14 +1,14 @@
 {# FETCH CAST SOURCE TYPE AND TARGET TYPE Statement #}
 {% if cid %}
 SELECT
-    format_type(ca.castsource, null) as castsource,
-    format_type(ca.casttarget, null) as casttarget
+    pg_catalog.format_type(ca.castsource, null) as castsource,
+    pg_catalog.format_type(ca.casttarget, null) as casttarget
 FROM
-    pg_cast ca
+    pg_catalog.pg_cast ca
 WHERE
     ca.oid = {{cid}}::OID;
 {% endif %}
 {# DROP CAST Statement #}
 {% if castsource and casttarget %}
 DROP CAST ({{castsource}} AS {{casttarget}}) {% if cascade %}CASCADE{%endif%};
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/casts/templates/casts/sql/default/functions.sql b/web/pgadmin/browser/server_groups/servers/databases/casts/templates/casts/sql/default/functions.sql
index 119516784..7fe1f1d2d 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/casts/templates/casts/sql/default/functions.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/casts/templates/casts/sql/default/functions.sql
@@ -4,14 +4,14 @@ SELECT
     nspname,
     proargtypes
 FROM
-    pg_proc p JOIN pg_namespace n ON n.oid=p.pronamespace
+    pg_catalog.pg_proc p JOIN pg_namespace n ON n.oid=p.pronamespace
 WHERE
-    proargtypes[0] = (SELECT t.oid FROM pg_type t WHERE format_type(t.oid, NULL) = {{srctyp|qtLiteral}})
-    AND prorettype = (SELECT t.oid FROM pg_type t WHERE format_type(t.oid, NULL) = {{trgtyp|qtLiteral}})
+    proargtypes[0] = (SELECT t.oid FROM pg_catalog.pg_type t WHERE pg_catalog.format_type(t.oid, NULL) = {{srctyp|qtLiteral}})
+    AND prorettype = (SELECT t.oid FROM pg_catalog.pg_type t WHERE pg_catalog.format_type(t.oid, NULL) = {{trgtyp|qtLiteral}})
     AND CASE
-        WHEN array_length(proargtypes,1)  = 2 THEN
+        WHEN pg_catalog.array_length(proargtypes,1)  = 2 THEN
             proargtypes[1] = 23
-        WHEN array_length(proargtypes,1)  >= 3 THEN
+        WHEN pg_catalog.array_length(proargtypes,1)  >= 3 THEN
             proargtypes[1] = 23 AND proargtypes[2] = 16
        ELSE TRUE
     END
diff --git a/web/pgadmin/browser/server_groups/servers/databases/casts/templates/casts/sql/default/getsrcandtrgttype.sql b/web/pgadmin/browser/server_groups/servers/databases/casts/templates/casts/sql/default/getsrcandtrgttype.sql
index 4636f873b..f72e6cf14 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/casts/templates/casts/sql/default/getsrcandtrgttype.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/casts/templates/casts/sql/default/getsrcandtrgttype.sql
@@ -1,8 +1,8 @@
 SELECT
     *
 FROM (
-    SELECT 
-        format_type(t.oid,NULL) AS typname,
+    SELECT
+        pg_catalog.format_type(t.oid,NULL) AS typname,
         CASE
             WHEN typelem > 0 THEN typelem
             ELSE t.oid
@@ -11,10 +11,10 @@ FROM (
         typtype,
         t.oid,
         nspname,
-        (SELECT COUNT(1) FROM pg_type t2 WHERE t2.typname = t.typname) > 1 AS isdup
+        (SELECT COUNT(1) FROM pg_catalog.pg_type t2 WHERE t2.typname = t.typname) > 1 AS isdup
     FROM
-        pg_type t
-        JOIN pg_namespace nsp ON typnamespace=nsp.oid
+        pg_catalog.pg_type t
+        JOIN pg_catalog.pg_namespace nsp ON typnamespace=nsp.oid
     WHERE
         (NOT (typname = 'unknown'
         AND nspname = 'pg_catalog'))
@@ -24,7 +24,7 @@ FROM (
             SELECT
                 1
             FROM
-                 pg_class
+                 pg_catalog.pg_class
             WHERE
                  relnamespace = typnamespace
                  AND relname = typname
@@ -34,7 +34,7 @@ FROM (
                          SELECT
                              1
                          FROM
-                              pg_class
+                              pg_catalog.pg_class
                          WHERE
                              relnamespace = typnamespace
                              AND relname = SUBSTRING(typname FROM 2)::name
diff --git a/web/pgadmin/browser/server_groups/servers/databases/casts/templates/casts/sql/default/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/casts/templates/casts/sql/default/nodes.sql
index 886c2af80..47786433e 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/casts/templates/casts/sql/default/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/casts/templates/casts/sql/default/nodes.sql
@@ -1,14 +1,14 @@
     SELECT
         ca.oid,
-        concat(format_type(st.oid,NULL),'->',format_type(tt.oid,tt.typtypmod)) as name
-    FROM pg_cast ca
-    JOIN pg_type st ON st.oid=castsource
-    JOIN pg_namespace ns ON ns.oid=st.typnamespace
-    JOIN pg_type tt ON tt.oid=casttarget
-    JOIN pg_namespace nt ON nt.oid=tt.typnamespace
-    LEFT JOIN pg_proc pr ON pr.oid=castfunc
-    LEFT JOIN pg_namespace np ON np.oid=pr.pronamespace
-    LEFT OUTER JOIN pg_description des ON (des.objoid=ca.oid AND des.objsubid=0 AND des.classoid='pg_cast'::regclass)
+        pg_catalog.concat(pg_catalog.format_type(st.oid,NULL),'->',pg_catalog.format_type(tt.oid,tt.typtypmod)) as name
+    FROM pg_catalog.pg_cast ca
+    JOIN pg_catalog.pg_type st ON st.oid=castsource
+    JOIN pg_catalog.pg_namespace ns ON ns.oid=st.typnamespace
+    JOIN pg_catalog.pg_type tt ON tt.oid=casttarget
+    JOIN pg_catalog.pg_namespace nt ON nt.oid=tt.typnamespace
+    LEFT JOIN pg_catalog.pg_proc pr ON pr.oid=castfunc
+    LEFT JOIN pg_catalog.pg_namespace np ON np.oid=pr.pronamespace
+    LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=ca.oid AND des.objsubid=0 AND des.classoid='pg_cast'::regclass)
     {% if cid %}
         WHERE ca.oid={{cid}}::oid
     {% endif %}
@@ -21,4 +21,4 @@
         {% endif %}
         ca.oid > {{datlastsysoid}}::OID
     {% endif %}
-    ORDER BY st.typname, tt.typname
\ No newline at end of file
+    ORDER BY st.typname, tt.typname
diff --git a/web/pgadmin/browser/server_groups/servers/databases/casts/templates/casts/sql/default/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/casts/templates/casts/sql/default/properties.sql
index 4717c8994..5ef1ed053 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/casts/templates/casts/sql/default/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/casts/templates/casts/sql/default/properties.sql
@@ -2,7 +2,7 @@
 {% if srctyp and trgtyp %}
     SELECT
         ca.oid
-    FROM pg_cast ca
+    FROM pg_catalog.pg_cast ca
     WHERE ca.castsource = (SELECT t.oid FROM pg_type t WHERE format_type(t.oid, NULL) = {{srctyp|qtLiteral}})
     AND ca.casttarget = (SELECT t.oid FROM pg_type t WHERE format_type(t.oid, NULL) = {{trgtyp|qtLiteral}})
     {% if datlastsysoid %}
@@ -27,21 +27,21 @@
         ELSE proname || '(' || pg_catalog.pg_get_function_identity_arguments(pr.oid) || ')'
     END AS proname,
         ca.castfunc,
-        format_type(st.oid,NULL) AS srctyp,
-        format_type(tt.oid,tt.typtypmod) AS trgtyp,
+        pg_catalog.format_type(st.oid,NULL) AS srctyp,
+        pg_catalog.format_type(tt.oid,tt.typtypmod) AS trgtyp,
         ns.nspname AS srcnspname,
         nt.nspname AS trgnspname,
         np.nspname AS pronspname,
         description,
-        concat(format_type(st.oid,NULL),'->',format_type(tt.oid,tt.typtypmod)) as name
-    FROM pg_cast ca
-    JOIN pg_type st ON st.oid=castsource
-    JOIN pg_namespace ns ON ns.oid=st.typnamespace
-    JOIN pg_type tt ON tt.oid=casttarget
-    JOIN pg_namespace nt ON nt.oid=tt.typnamespace
-    LEFT JOIN pg_proc pr ON pr.oid=castfunc
-    LEFT JOIN pg_namespace np ON np.oid=pr.pronamespace
-    LEFT OUTER JOIN pg_description des ON (des.objoid=ca.oid AND des.objsubid=0 AND des.classoid='pg_cast'::regclass)
+        pg_catalog.concat(pg_catalog.format_type(st.oid,NULL),'->',pg_catalog.format_type(tt.oid,tt.typtypmod)) as name
+    FROM pg_catalog.pg_cast ca
+    JOIN pg_catalog.pg_type st ON st.oid=castsource
+    JOIN pg_catalog.pg_namespace ns ON ns.oid=st.typnamespace
+    JOIN pg_catalog.pg_type tt ON tt.oid=casttarget
+    JOIN pg_catalog.pg_namespace nt ON nt.oid=tt.typnamespace
+    LEFT JOIN pg_catalog.pg_proc pr ON pr.oid=castfunc
+    LEFT JOIN pg_catalog.pg_namespace np ON np.oid=pr.pronamespace
+    LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=ca.oid AND des.objsubid=0 AND des.classoid='pg_cast'::regclass)
 
     {% if cid %}
         WHERE ca.oid={{cid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/casts/templates/casts/sql/default/sql.sql b/web/pgadmin/browser/server_groups/servers/databases/casts/templates/casts/sql/default/sql.sql
index d093abe94..e14cb6a5c 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/casts/templates/casts/sql/default/sql.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/casts/templates/casts/sql/default/sql.sql
@@ -1,14 +1,14 @@
 SELECT
-    array_to_string(array_agg(sql), E'\n\n') as sql
+    pg_catalog.array_to_string(array_agg(sql), E'\n\n') as sql
 FROM
 (SELECT
     E'-- Cast: ' ||
-    format_type(st.oid, null)|| E' -> ' ||
-    format_type(tt.oid, tt.typtypmod) ||
-    E'\n\n-- DROP CAST (' || format_type(st.oid, null) ||
-    E' AS ' || format_type(tt.oid,tt.typtypmod) ||
-    E');\n\nCREATE CAST (' || format_type(st.oid, null) ||
-    E' AS ' || format_type(tt.oid,tt.typtypmod) || E')\n' ||
+    pg_catalog.format_type(st.oid, null)|| E' -> ' ||
+    pg_catalog.format_type(tt.oid, tt.typtypmod) ||
+    E'\n\n-- DROP CAST (' || pg_catalog.format_type(st.oid, null) ||
+    E' AS ' || pg_catalog.format_type(tt.oid,tt.typtypmod) ||
+    E');\n\nCREATE CAST (' || pg_catalog.format_type(st.oid, null) ||
+    E' AS ' || pg_catalog.format_type(tt.oid,tt.typtypmod) || E')\n' ||
     CASE WHEN ca.castfunc != 0 THEN
     E'\tWITH FUNCTION ' ||
     pr.proname || '(' || COALESCE(pg_catalog.pg_get_function_identity_arguments(pr.oid), '') || E')'
@@ -19,23 +19,23 @@ FROM
     WHEN ca.castcontext = 'i' THEN E'\n\tAS IMPLICIT;'
     ELSE E';' END ||
     CASE WHEN a.description IS NOT NULL THEN
-        E'\n\nCOMMENT ON CAST (' || (format_type(st.oid,NULL)) ||
-        E' AS ' || (format_type(tt.oid,tt.typtypmod)) ||
+        E'\n\nCOMMENT ON CAST (' || (pg_catalog.format_type(st.oid,NULL)) ||
+        E' AS ' || (pg_catalog.format_type(tt.oid,tt.typtypmod)) ||
         E') IS ' || pg_catalog.quote_literal(description) || E';'
     ELSE ''  END as sql
 FROM
-    pg_cast ca
-    JOIN pg_type st ON st.oid=ca.castsource
-    JOIN pg_namespace ns ON ns.oid=st.typnamespace
-    JOIN pg_type tt ON tt.oid=ca.casttarget
-    JOIN pg_namespace nt ON nt.oid=tt.typnamespace
-    LEFT JOIN pg_proc pr ON pr.oid=ca.castfunc
+    pg_catalog.pg_cast ca
+    JOIN pg_catalog.pg_type st ON st.oid=ca.castsource
+    JOIN pg_catalog.pg_namespace ns ON ns.oid=st.typnamespace
+    JOIN pg_catalog.pg_type tt ON tt.oid=ca.casttarget
+    JOIN pg_catalog.pg_namespace nt ON nt.oid=tt.typnamespace
+    LEFT JOIN pg_catalog.pg_proc pr ON pr.oid=ca.castfunc
     LEFT JOIN (
         SELECT
             des.description as description,
             des.objoid as descoid
         FROM
-            pg_description des
+            pg_catalog.pg_description des
         WHERE
             des.objoid={{cid}}::OID AND des.objsubid=0 AND des.classoid='pg_cast'::regclass
      ) a ON (a.descoid = ca.oid)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/event_triggers/templates/event_triggers/sql/9.3_plus/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/event_triggers/templates/event_triggers/sql/9.3_plus/delete.sql
index e6bcf47c9..eb99a6454 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/event_triggers/templates/event_triggers/sql/9.3_plus/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/event_triggers/templates/event_triggers/sql/9.3_plus/delete.sql
@@ -1,7 +1,7 @@
 {% if etid %}
-SELECT e.evtname AS name FROM pg_event_trigger e
+SELECT e.evtname AS name FROM pg_catalog.pg_event_trigger e
 WHERE e.oid={{etid}}::oid;
 {% endif %}
 {% if name %}
 DROP EVENT TRIGGER IF EXISTS {{ conn|qtIdent(name) }}{% if cascade%} CASCADE{% endif %};
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/event_triggers/templates/event_triggers/sql/9.3_plus/eventfunctions.sql b/web/pgadmin/browser/server_groups/servers/databases/event_triggers/templates/event_triggers/sql/9.3_plus/eventfunctions.sql
index a0165863d..20d309d55 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/event_triggers/templates/event_triggers/sql/9.3_plus/eventfunctions.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/event_triggers/templates/event_triggers/sql/9.3_plus/eventfunctions.sql
@@ -1,4 +1,4 @@
-SELECT quote_ident(nspname) || '.' || quote_ident(proname) AS tfname
-FROM pg_proc p, pg_namespace n, pg_language l
+SELECT pg_catalog.quote_ident(nspname) || '.' || pg_catalog.quote_ident(proname) AS tfname
+FROM pg_catalog.pg_proc p, pg_catalog.pg_namespace n, pg_catalog.pg_language l
 WHERE p.pronamespace = n.oid AND p.prolang = l.oid AND p.pronargs = 0 AND l.lanname != 'sql' AND prorettype::regtype::text = 'event_trigger'
-ORDER BY nspname ASC, proname ASC
\ No newline at end of file
+ORDER BY nspname ASC, proname ASC
diff --git a/web/pgadmin/browser/server_groups/servers/databases/event_triggers/templates/event_triggers/sql/9.3_plus/get_db.sql b/web/pgadmin/browser/server_groups/servers/databases/event_triggers/templates/event_triggers/sql/9.3_plus/get_db.sql
index dd8d2514a..c5eb7713e 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/event_triggers/templates/event_triggers/sql/9.3_plus/get_db.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/event_triggers/templates/event_triggers/sql/9.3_plus/get_db.sql
@@ -1 +1 @@
-SELECT db.datname as name FROM pg_database as db WHERE db.oid = {{did}}
\ No newline at end of file
+SELECT db.datname as name FROM pg_catalog.pg_database as db WHERE db.oid = {{did}}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/event_triggers/templates/event_triggers/sql/9.3_plus/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/event_triggers/templates/event_triggers/sql/9.3_plus/get_oid.sql
index 262ca9308..fac696092 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/event_triggers/templates/event_triggers/sql/9.3_plus/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/event_triggers/templates/event_triggers/sql/9.3_plus/get_oid.sql
@@ -1,5 +1,5 @@
 {# The Sql below will provide oid for newly created event_trigger #}
 {% if data %}
-SELECT e.oid from pg_event_trigger e
+SELECT e.oid from pg_catalog.pg_event_trigger e
 WHERE e.evtname = {{ data.name|qtLiteral }}
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/event_triggers/templates/event_triggers/sql/9.3_plus/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/event_triggers/templates/event_triggers/sql/9.3_plus/nodes.sql
index 7f770f492..88b9f3e7a 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/event_triggers/templates/event_triggers/sql/9.3_plus/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/event_triggers/templates/event_triggers/sql/9.3_plus/nodes.sql
@@ -1,5 +1,5 @@
 SELECT e.oid, e.evtname AS name
-FROM pg_event_trigger e
+FROM pg_catalog.pg_event_trigger e
 {% if etid %}
 WHERE e.oid={{etid}}::oid
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/event_triggers/templates/event_triggers/sql/9.3_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/event_triggers/templates/event_triggers/sql/9.3_plus/properties.sql
index e7b81af5f..a11fcb0a5 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/event_triggers/templates/event_triggers/sql/9.3_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/event_triggers/templates/event_triggers/sql/9.3_plus/properties.sql
@@ -4,17 +4,17 @@ e.evtenabled AS enabled,
 e.evtfoid AS eventfuncoid,
 CASE
   WHEN n.nspname = 'public'
-  THEN quote_ident(n.nspname) || '.' || cast(e.evtfoid::regproc as text)
+  THEN pg_catalog.quote_ident(n.nspname) || '.' || cast(e.evtfoid::regproc as text)
   ELSE cast(e.evtfoid::regproc as text)
 END AS  eventfunname,
-array_to_string(array(select quote_literal(x) from unnest(evttags) as t(x)), ', ') AS when,
+pg_catalog.array_to_string(array(select pg_catalog.quote_literal(x) from pg_catalog.unnest(evttags) as t(x)), ', ') AS when,
  pg_catalog.obj_description(e.oid, 'pg_event_trigger') AS comment,
- (SELECT array_agg(provider || '=' || label) FROM pg_seclabel sl1 WHERE sl1.objoid=e.oid) AS seclabels,
+ (SELECT pg_catalog.array_agg(provider || '=' || label) FROM pg_catalog.pg_seclabel sl1 WHERE sl1.objoid=e.oid) AS seclabels,
  p.prosrc AS source, p.pronamespace AS schemaoid, l.lanname AS language
- FROM pg_event_trigger e
- LEFT OUTER JOIN pg_proc p ON p.oid=e.evtfoid
- LEFT OUTER JOIN pg_language l ON l.oid=p.prolang,
- pg_namespace n
+ FROM pg_catalog.pg_event_trigger e
+ LEFT OUTER JOIN pg_catalog.pg_proc p ON p.oid=e.evtfoid
+ LEFT OUTER JOIN pg_catalog.pg_language l ON l.oid=p.prolang,
+ pg_catalog.pg_namespace n
  WHERE p.pronamespace = n.oid
 {% if etid %}
  AND e.oid={{etid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/extensions/templates/extensions/sql/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/extensions/templates/extensions/sql/delete.sql
index 7070b3fcf..8bd901525 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/extensions/templates/extensions/sql/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/extensions/templates/extensions/sql/delete.sql
@@ -1,6 +1,6 @@
 {#============================Drop/Cascade Extension by name=========================#}
 {% if eid %}
-SELECT x.extname from pg_extension x
+SELECT x.extname from pg_catalog.pg_extension x
     WHERE x.oid = {{ eid }}::oid
 {% endif %}
 {% if name %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/extensions/templates/extensions/sql/extensions.sql b/web/pgadmin/browser/server_groups/servers/databases/extensions/templates/extensions/sql/extensions.sql
index bf3979d4e..3d1fd3c21 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/extensions/templates/extensions/sql/extensions.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/extensions/templates/extensions/sql/extensions.sql
@@ -1,12 +1,12 @@
 {# ======================Fetch extensions names=====================#}
 SELECT
     a.name, a.installed_version,
-    array_agg(av.version) as version,
-    array_agg(av.schema) as schema,
-    array_agg(av.superuser) as superuser,
-    array_agg(av.relocatable) as relocatable
+    pg_catalog.array_agg(av.version) as version,
+    pg_catalog.array_agg(av.schema) as schema,
+    pg_catalog.array_agg(av.superuser) as superuser,
+    pg_catalog.array_agg(av.relocatable) as relocatable
 FROM
-    pg_available_extensions a
-    LEFT JOIN pg_available_extension_versions av ON (a.name = av.name)
+    pg_catalog.pg_available_extensions a
+    LEFT JOIN pg_catalog.pg_available_extension_versions av ON (a.name = av.name)
 GROUP BY a.name, a.installed_version
 ORDER BY a.name
diff --git a/web/pgadmin/browser/server_groups/servers/databases/extensions/templates/extensions/sql/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/extensions/templates/extensions/sql/properties.sql
index f0a12a4b2..62f0ea838 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/extensions/templates/extensions/sql/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/extensions/templates/extensions/sql/properties.sql
@@ -1,13 +1,13 @@
 {#===================Fetch properties of each extension by name or oid===================#}
 SELECT
-    x.oid, pg_get_userbyid(extowner) AS owner,
+    x.oid, pg_catalog.pg_get_userbyid(extowner) AS owner,
     x.extname AS name, n.nspname AS schema,
     x.extrelocatable AS relocatable, x.extversion AS version,
     e.comment
 FROM
-    pg_extension x
-    LEFT JOIN pg_namespace n ON x.extnamespace=n.oid
-    JOIN pg_available_extensions() e(name, default_version, comment) ON x.extname=e.name
+    pg_catalog.pg_extension x
+    LEFT JOIN pg_catalog.pg_namespace n ON x.extnamespace=n.oid
+    JOIN pg_catalog.pg_available_extensions() e(name, default_version, comment) ON x.extname=e.name
 {%- if eid %}
  WHERE x.oid = {{eid}}::oid
 {% elif ename %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/9.3_plus/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/9.3_plus/acl.sql
index ac0f9d762..71735320c 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/9.3_plus/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/9.3_plus/acl.sql
@@ -1,4 +1,4 @@
-SELECT 'fsrvacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor, array_agg(privilege_type) as privileges, array_agg(is_grantable) as grantable
+SELECT 'fsrvacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor, pg_catalog.array_agg(privilege_type) as privileges, pg_catalog.array_agg(is_grantable) as grantable
 FROM
     (SELECT
         d.grantee, d.grantor, d.is_grantable,
@@ -7,14 +7,14 @@ FROM
         ELSE 'UNKNOWN'
         END AS privilege_type
     FROM
-        (SELECT srvacl FROM pg_foreign_server fsrv
-            LEFT OUTER JOIN pg_shdescription descr ON (
+        (SELECT srvacl FROM pg_catalog.pg_foreign_server fsrv
+            LEFT OUTER JOIN pg_catalog.pg_shdescription descr ON (
             fsrv.oid=descr.objoid AND descr.classoid='pg_foreign_server'::regclass)
 {% if fsid %}
   WHERE fsrv.oid = {{ fsid|qtLiteral }}::OID
 {% endif %}
         ) acl,
-        aclexplode(srvacl) d
+        pg_catalog.aclexplode(srvacl) d
         ) d
     LEFT JOIN pg_catalog.pg_roles g ON (d.grantor = g.oid)
     LEFT JOIN pg_catalog.pg_roles gt ON (d.grantee = gt.oid)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/9.3_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/9.3_plus/properties.sql
index e761a6dd1..10565558a 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/9.3_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/9.3_plus/properties.sql
@@ -1,16 +1,16 @@
 {# ============= Give all the properties of foreign server ============= #}
 {% if fdwid %}
 SELECT fdw.oid as fdwoid, fdwname as name
-FROM pg_foreign_data_wrapper fdw
-LEFT OUTER JOIN pg_description des ON (des.objoid=fdw.oid AND des.objsubid=0 AND des.classoid='pg_foreign_data_wrapper'::regclass)
+FROM pg_catalog.pg_foreign_data_wrapper fdw
+LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=fdw.oid AND des.objsubid=0 AND des.classoid='pg_foreign_data_wrapper'::regclass)
 WHERE fdw.oid={{fdwid}}::oid
 {% else %}
 SELECT srv.oid, srvname as name, srvfdw as fdwid, srvtype as fsrvtype, srvversion as fsrvversion,
-fdw.fdwname as fdwname, description, array_to_string(srvoptions, ',') AS fsrvoptions,
-pg_get_userbyid(srvowner) as fsrvowner, array_to_string(srvacl::text[], ', ') as acl
-FROM pg_foreign_server srv
-LEFT OUTER JOIN pg_foreign_data_wrapper fdw on fdw.oid=srvfdw
-LEFT OUTER JOIN pg_description des ON (des.objoid=srv.oid AND des.objsubid=0 AND des.classoid='pg_foreign_server'::regclass)
+fdw.fdwname as fdwname, description, pg_catalog.array_to_string(srvoptions, ',') AS fsrvoptions,
+pg_catalog.pg_get_userbyid(srvowner) as fsrvowner, pg_catalog.array_to_string(srvacl::text[], ', ') as acl
+FROM pg_catalog.pg_foreign_server srv
+LEFT OUTER JOIN pg_catalog.pg_foreign_data_wrapper fdw on fdw.oid=srvfdw
+LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=srv.oid AND des.objsubid=0 AND des.classoid='pg_foreign_server'::regclass)
 {% if data and fdwdata %}
 WHERE fdw.fdwname = {{ fdwdata.name|qtLiteral }}::text and srvname = {{ data.name|qtLiteral }}::text
 {% elif fdwdata %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/default/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/default/acl.sql
index a2ef1b9dd..76a519352 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/default/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/default/acl.sql
@@ -1,4 +1,4 @@
-SELECT 'fsrvacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor, array_agg(privilege_type) as privileges, array_agg(is_grantable) as grantable
+SELECT 'fsrvacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor, pg_catalog.array_agg(privilege_type) as privileges, pg_catalog.array_agg(is_grantable) as grantable
 FROM
     (SELECT
         d.grantee, d.grantor, d.is_grantable,
@@ -7,8 +7,8 @@ FROM
         ELSE 'UNKNOWN'
         END AS privilege_type
     FROM
-        (SELECT srvacl FROM pg_foreign_server fsrv
-            LEFT OUTER JOIN pg_shdescription descr ON (
+        (SELECT srvacl FROM pg_catalog.pg_foreign_server fsrv
+            LEFT OUTER JOIN pg_catalog.pg_shdescription descr ON (
             fsrv.oid=descr.objoid AND descr.classoid='pg_foreign_server'::regclass)
 {% if fsid %}
         WHERE fsrv.oid = {{ fsid|qtLiteral }}::OID
@@ -16,7 +16,7 @@ FROM
         ) acl,
         (SELECT (d).grantee AS grantee, (d).grantor AS grantor, (d).is_grantable AS is_grantable,
                 (d).privilege_type AS privilege_type
-        FROM (SELECT aclexplode(srvacl) as d FROM pg_foreign_server fsrv1
+        FROM (SELECT pg_catalog.aclexplode(srvacl) as d FROM pg_catalog.pg_foreign_server fsrv1
         {% if fsid %}
                 WHERE fsrv1.oid = {{ fsid|qtLiteral }}::OID ) a
         {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/default/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/default/delete.sql
index 9ed9a4372..cc0247133 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/default/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/default/delete.sql
@@ -1,9 +1,9 @@
 {# ============= Give foreign server name from foreign server id ============= #}
 {% if fsid %}
-SELECT srvname as name FROM pg_foreign_server srv LEFT OUTER JOIN pg_foreign_data_wrapper fdw on fdw.oid=srvfdw
+SELECT srvname as name FROM pg_foreign_server srv LEFT OUTER JOIN pg_catalog.pg_foreign_data_wrapper fdw on fdw.oid=srvfdw
 WHERE srv.oid={{fsid}}::oid;
 {% endif %}
 {# ============= Delete/Drop cascade foreign server ============= #}
 {% if name %}
 DROP SERVER {{ conn|qtIdent(name) }} {% if cascade %} CASCADE {% endif %};
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/default/dependents.sql b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/default/dependents.sql
index 274d60e9f..0f4f5ef3f 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/default/dependents.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/default/dependents.sql
@@ -1,6 +1,6 @@
 {# ============= Get dependents of foreign server ============= #}
 {% if fsid %}
-SELECT um.umid as um_oid, um.usename as name, dep.deptype FROM pg_user_mappings um
-    LEFT JOIN pg_depend dep ON dep.objid=um.umid
+SELECT um.umid as um_oid, um.usename as name, dep.deptype FROM pg_catalog.pg_user_mappings um
+    LEFT JOIN pg_catalog.pg_depend dep ON dep.objid=um.umid
     WHERE um.srvid = {{ fsid }}::OID
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/default/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/default/properties.sql
index e25fafc6e..a16b16b2b 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/default/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/default/properties.sql
@@ -2,16 +2,16 @@
 {% if fdwid %}
 SELECT fdw.oid as fdwoid,
        fdwname as name
-FROM pg_foreign_data_wrapper fdw
-LEFT OUTER JOIN pg_description des ON (des.objoid=fdw.oid AND des.objsubid=0 AND des.classoid='pg_foreign_data_wrapper'::regclass)
+FROM pg_catalog.pg_foreign_data_wrapper fdw
+LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=fdw.oid AND des.objsubid=0 AND des.classoid='pg_foreign_data_wrapper'::regclass)
 WHERE fdw.oid={{fdwid}}::oid
 {% else %}
 SELECT srv.oid, srvname as name, srvtype as fsrvtype, srvversion as fsrvversion, fdw.fdwname as fdwname, description,
-array_to_string(srvoptions, ',') AS fsrvoptions,
-pg_get_userbyid(srvowner) as fsrvowner, array_to_string(srvacl::text[], ', ') as acl
-FROM pg_foreign_server srv
-LEFT OUTER JOIN pg_foreign_data_wrapper fdw on fdw.oid=srvfdw
-LEFT OUTER JOIN pg_description des ON (des.objoid=srv.oid AND des.objsubid=0 AND des.classoid='pg_foreign_server'::regclass)
+pg_catalog.array_to_string(srvoptions, ',') AS fsrvoptions,
+pg_catalog.pg_get_userbyid(srvowner) as fsrvowner, pg_catalog.array_to_string(srvacl::text[], ', ') as acl
+FROM pg_catalog.pg_foreign_server srv
+LEFT OUTER JOIN pg_catalog.pg_foreign_data_wrapper fdw on fdw.oid=srvfdw
+LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=srv.oid AND des.objsubid=0 AND des.classoid='pg_foreign_server'::regclass)
 {% if data and fdwdata %}
 WHERE fdw.fdwname = {{ fdwdata.name|qtLiteral }}::text and srvname = {{ data.name|qtLiteral }}::text
 {% elif fdwdata %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/templates/user_mappings/sql/default/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/templates/user_mappings/sql/default/delete.sql
index 15587dfeb..95c86ee8e 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/templates/user_mappings/sql/default/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/templates/user_mappings/sql/default/delete.sql
@@ -1,6 +1,6 @@
 {# ============= Get the foreing server name from id ============= #}
 {% if fsid %}
-SELECT srvname as name FROM pg_foreign_server srv LEFT OUTER JOIN pg_foreign_data_wrapper fdw on fdw.oid=srvfdw
+SELECT srvname as name FROM pg_catalog.pg_foreign_server srv LEFT OUTER JOIN pg_catalog.pg_foreign_data_wrapper fdw on fdw.oid=srvfdw
     WHERE srv.oid={{fsid}}::oid;
 {% endif %}
 {# ============= Drop/Delete cascade user mapping ============= #}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/templates/user_mappings/sql/default/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/templates/user_mappings/sql/default/properties.sql
index 08b40f31e..9bbe9f21e 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/templates/user_mappings/sql/default/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mappings/templates/user_mappings/sql/default/properties.sql
@@ -1,18 +1,18 @@
 {# ============= Get the properties of user mapping ============= #}
 {% if fserid %}
 SELECT srv.oid as fsrvid, srvname as name
-FROM pg_foreign_server srv
-    LEFT OUTER JOIN pg_description des ON (des.objoid=srv.oid AND des.objsubid=0 AND des.classoid='pg_foreign_server'::regclass)
+FROM pg_catalog.pg_foreign_server srv
+    LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=srv.oid AND des.objsubid=0 AND des.classoid='pg_foreign_server'::regclass)
 WHERE srv.oid = {{fserid}}::oid
 {% elif fsid or umid %}
-SELECT u.umid AS oid, u.usename AS name, u.srvid AS fsid, array_to_string(u.umoptions, ',') AS umoptions, fs.srvfdw AS fdwid
-FROM pg_user_mappings u
-LEFT JOIN pg_foreign_server fs ON fs.oid = u.srvid
+SELECT u.umid AS oid, u.usename AS name, u.srvid AS fsid, pg_catalog.array_to_string(u.umoptions, ',') AS umoptions, fs.srvfdw AS fdwid
+FROM pg_catalog.pg_user_mappings u
+LEFT JOIN pg_catalog.pg_foreign_server fs ON fs.oid = u.srvid
 {% if fsid %} WHERE u.srvid = {{fsid}}::oid {% endif %} {% if umid %} WHERE u.umid= {{umid}}::oid {% endif %}
 ORDER BY 2;
 {% else %}
-SELECT u.umid AS oid, u.usename AS name, u.srvid AS fsid, array_to_string(u.umoptions, ',') AS umoptions, fs.srvfdw AS fdwid
-FROM pg_user_mappings u
-LEFT JOIN pg_foreign_server fs ON fs.oid = u.srvid
+SELECT u.umid AS oid, u.usename AS name, u.srvid AS fsid, pg_catalog.array_to_string(u.umoptions, ',') AS umoptions, fs.srvfdw AS fdwid
+FROM pg_catalog.pg_user_mappings u
+LEFT JOIN pg_catalog.pg_foreign_server fs ON fs.oid = u.srvid
 ORDER BY 2;
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/9.3_plus/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/9.3_plus/acl.sql
index ac169ab2c..c4fc13910 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/9.3_plus/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/9.3_plus/acl.sql
@@ -1,4 +1,4 @@
-SELECT 'fdwacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor, array_agg(privilege_type) as privileges, array_agg(is_grantable) as grantable
+SELECT 'fdwacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor, pg_catalog.array_agg(privilege_type) as privileges, pg_catalog.array_agg(is_grantable) as grantable
 FROM
     (SELECT
         d.grantee, d.grantor, d.is_grantable,
@@ -7,14 +7,14 @@ FROM
         ELSE 'UNKNOWN'
         END AS privilege_type
     FROM
-        (SELECT fdwacl FROM pg_foreign_data_wrapper fdw
-            LEFT OUTER JOIN pg_shdescription descr ON (
+        (SELECT fdwacl FROM pg_catalog.pg_foreign_data_wrapper fdw
+            LEFT OUTER JOIN pg_catalog.pg_shdescription descr ON (
             fdw.oid=descr.objoid AND descr.classoid='pg_foreign_data_wrapper'::regclass)
 {% if fid %}
     WHERE fdw.oid = {{ fid|qtLiteral }}::OID
 {% endif %}
         ) acl,
-        aclexplode(fdwacl) d
+        pg_catalog.aclexplode(fdwacl) d
         ) d
     LEFT JOIN pg_catalog.pg_roles g ON (d.grantor = g.oid)
     LEFT JOIN pg_catalog.pg_roles gt ON (d.grantee = gt.oid)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/9.3_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/9.3_plus/properties.sql
index 3e8511ccb..8f39396ac 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/9.3_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/9.3_plus/properties.sql
@@ -1,22 +1,22 @@
 {# ============= Get all the properties of foreign data wrapper ============= #}
 SELECT fdw.oid, fdwname as name, fdwhandler, fdwvalidator, description,
-    array_to_string(fdwoptions, ',') AS fdwoptions, pg_get_userbyid(fdwowner) as fdwowner, array_to_string(fdwacl::text[], ', ') as acl,
+    pg_catalog.array_to_string(fdwoptions, ',') AS fdwoptions, pg_catalog.pg_get_userbyid(fdwowner) as fdwowner, pg_catalog.array_to_string(fdwacl::text[], ', ') as acl,
     CASE
     -- EPAS in redwood mode, concatenation of a string with NULL results as the original string
     WHEN vp.proname IS NULL THEN NULL
-    ELSE quote_ident(vp_nsp.nspname)||'.'||quote_ident(vp.proname)
+    ELSE pg_catalog.quote_ident(vp_nsp.nspname)||'.'||pg_catalog.quote_ident(vp.proname)
     END fdwvalue,
     CASE
     -- EPAS in redwood mode, concatenation of a string with NULL results as the original string
     WHEN vh.proname IS NULL THEN NULL
-    ELSE quote_ident(vh_nsp.nspname)||'.'||quote_ident(vh.proname)
+    ELSE pg_catalog.quote_ident(vh_nsp.nspname)||'.'||pg_catalog.quote_ident(vh.proname)
     END fdwhan
-FROM pg_foreign_data_wrapper fdw
-    LEFT OUTER JOIN pg_proc vh on vh.oid=fdwhandler
-    LEFT OUTER JOIN pg_proc vp on vp.oid=fdwvalidator
-    LEFT OUTER JOIN pg_namespace vh_nsp ON vh_nsp.oid=vh.pronamespace
-    LEFT OUTER JOIN pg_namespace vp_nsp ON vp_nsp.oid=vp.pronamespace
-    LEFT OUTER JOIN pg_description des ON (des.objoid=fdw.oid AND des.objsubid=0 AND des.classoid='pg_foreign_data_wrapper'::regclass)
+FROM pg_catalog.pg_foreign_data_wrapper fdw
+    LEFT OUTER JOIN pg_catalog.pg_proc vh on vh.oid=fdwhandler
+    LEFT OUTER JOIN pg_catalog.pg_proc vp on vp.oid=fdwvalidator
+    LEFT OUTER JOIN pg_catalog.pg_namespace vh_nsp ON vh_nsp.oid=vh.pronamespace
+    LEFT OUTER JOIN pg_catalog.pg_namespace vp_nsp ON vp_nsp.oid=vp.pronamespace
+    LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=fdw.oid AND des.objsubid=0 AND des.classoid='pg_foreign_data_wrapper'::regclass)
 {% if fid %}
 WHERE fdw.oid={{fid}}::oid
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/default/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/default/acl.sql
index 994f3a55b..505c32f02 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/default/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/default/acl.sql
@@ -1,4 +1,4 @@
-SELECT 'fdwacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor, array_agg(privilege_type) as privileges, array_agg(is_grantable) as grantable
+SELECT 'fdwacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor, pg_catalog.array_agg(privilege_type) as privileges, pg_catalog.array_agg(is_grantable) as grantable
 FROM
     (SELECT
         d.grantee, d.grantor, d.is_grantable,
@@ -7,8 +7,8 @@ FROM
         ELSE 'UNKNOWN'
         END AS privilege_type
     FROM
-        (SELECT fdwacl FROM pg_foreign_data_wrapper fdw
-            LEFT OUTER JOIN pg_shdescription descr ON (
+        (SELECT fdwacl FROM pg_catalog.pg_foreign_data_wrapper fdw
+            LEFT OUTER JOIN pg_catalog.pg_shdescription descr ON (
             fdw.oid=descr.objoid AND descr.classoid='pg_foreign_data_wrapper'::regclass)
 {% if fid %}
     WHERE fdw.oid = {{ fid|qtLiteral }}::OID
@@ -16,7 +16,7 @@ FROM
         ) acl,
             (SELECT (d).grantee AS grantee, (d).grantor AS grantor, (d).is_grantable AS is_grantable,
                     (d).privilege_type AS privilege_type
-            FROM (SELECT aclexplode(fdwacl) as d FROM pg_foreign_data_wrapper fdw1
+            FROM (SELECT pg_catalog.aclexplode(fdwacl) as d FROM pg_catalog.pg_foreign_data_wrapper fdw1
             {% if fid %}
                     WHERE fdw1.oid = {{ fid|qtLiteral }}::OID ) a
             {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/default/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/default/delete.sql
index 71502e23e..923da156e 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/default/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/default/delete.sql
@@ -1,8 +1,8 @@
 {# ============= Get foreign data wrapper from fid ============= #}
 {% if fid %}
-SELECT fdwname as name from pg_foreign_data_wrapper WHERE oid={{fid}}::oid;
+SELECT fdwname as name from pg_catalog.pg_foreign_data_wrapper WHERE oid={{fid}}::oid;
 {% endif %}
 {# ============= Delete/Drop cascade foreign data wrapper ============= #}
 {% if name %}
 DROP FOREIGN DATA WRAPPER {{ conn|qtIdent(name) }} {% if cascade %} CASCADE {% endif %};
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/default/handlers.sql b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/default/handlers.sql
index e4f4185f0..e0f7fa6ab 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/default/handlers.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/default/handlers.sql
@@ -1,5 +1,5 @@
 {# ============= Get the handlers of foreign data wrapper ============= #}
 SELECT nspname, proname as fdwhan,
-       quote_ident(nspname)||'.'||quote_ident(proname) AS schema_prefix_fdw_hand
-FROM pg_proc p JOIN pg_namespace nsp ON nsp.oid=pronamespace
+       pg_catalog.quote_ident(nspname)||'.'||pg_catalog.quote_ident(proname) AS schema_prefix_fdw_hand
+FROM pg_catalog.pg_proc p JOIN pg_catalog.pg_namespace nsp ON nsp.oid=pronamespace
 WHERE pronargs=0 AND prorettype=3115;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/default/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/default/properties.sql
index 67c2d0ee1..09b593388 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/default/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/default/properties.sql
@@ -1,22 +1,22 @@
 {# ============= Get all the properties of foreign data wrapper ============= #}
 SELECT fdw.oid, fdwname as name, fdwhandler, fdwvalidator, description,
-    array_to_string(fdwoptions, ',') AS fdwoptions, pg_get_userbyid(fdwowner) as fdwowner, array_to_string(fdwacl::text[], ', ') as acl,
+    pg_catalog.array_to_string(fdwoptions, ',') AS fdwoptions, pg_catalog.pg_get_userbyid(fdwowner) as fdwowner, pg_catalog.array_to_string(fdwacl::text[], ', ') as acl,
     CASE
     -- EPAS in redwood mode, concatenation of a string with NULL results as the original string
     WHEN vp.proname IS NULL THEN NULL
-    ELSE quote_ident(vp_nsp.nspname)||'.'||quote_ident(vp.proname)
+    ELSE pg_catalog.quote_ident(vp_nsp.nspname)||'.'||pg_catalog.quote_ident(vp.proname)
     END fdwvalue,
     CASE
     -- EPAS in redwood mode, concatenation of a string with NULL results as the original string
     WHEN vh.proname IS NULL THEN NULL
-    ELSE quote_ident(vh_nsp.nspname)||'.'||quote_ident(vh.proname)
+    ELSE pg_catalog.quote_ident(vh_nsp.nspname)||'.'||pg_catalog.quote_ident(vh.proname)
     END fdwhan
-FROM pg_foreign_data_wrapper fdw
-LEFT OUTER JOIN pg_proc vh on vh.oid=fdwhandler
-LEFT OUTER JOIN pg_proc vp on vp.oid=fdwvalidator
-LEFT OUTER JOIN pg_namespace vh_nsp ON vh_nsp.oid=vh.pronamespace
-LEFT OUTER JOIN pg_namespace vp_nsp ON vp_nsp.oid=vp.pronamespace
-LEFT OUTER JOIN pg_description des ON (des.objoid=fdw.oid AND des.objsubid=0 AND des.classoid='pg_foreign_data_wrapper'::regclass)
+FROM pg_catalog.pg_foreign_data_wrapper fdw
+LEFT OUTER JOIN pg_catalog.pg_proc vh on vh.oid=fdwhandler
+LEFT OUTER JOIN pg_catalog.pg_proc vp on vp.oid=fdwvalidator
+LEFT OUTER JOIN pg_catalog.pg_namespace vh_nsp ON vh_nsp.oid=vh.pronamespace
+LEFT OUTER JOIN pg_catalog.pg_namespace vp_nsp ON vp_nsp.oid=vp.pronamespace
+LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=fdw.oid AND des.objsubid=0 AND des.classoid='pg_foreign_data_wrapper'::regclass)
 {% if fid %}
 WHERE fdw.oid={{fid}}::oid
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/default/validators.sql b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/default/validators.sql
index f12cc4841..e7c3d7e7a 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/default/validators.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/default/validators.sql
@@ -1,5 +1,5 @@
 {# ============= Get the validators of foreign data wrapper ============= #}
 SELECT nspname, proname as fdwvalue,
-       quote_ident(nspname)||'.'||quote_ident(proname) AS schema_prefix_fdw_val
-FROM pg_proc p JOIN pg_namespace nsp ON nsp.oid=pronamespace
+       pg_catalog.quote_ident(nspname)||'.'||pg_catalog.quote_ident(proname) AS schema_prefix_fdw_val
+FROM pg_catalog.pg_proc p JOIN pg_catalog.pg_namespace nsp ON nsp.oid=pronamespace
 WHERE proargtypes[0]=1009 AND proargtypes[1]=26;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/9.3_plus/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/9.3_plus/acl.sql
index dfdafac1b..219165e06 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/9.3_plus/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/9.3_plus/acl.sql
@@ -1,5 +1,5 @@
 SELECT 'lanacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor,
-    array_agg(privilege_type) as privileges, array_agg(is_grantable) as grantable
+    pg_catalog.array_agg(privilege_type) as privileges, pg_catalog.array_agg(is_grantable) as grantable
 FROM
     (SELECT
         d.grantee, d.grantor, d.is_grantable,
@@ -8,11 +8,11 @@ FROM
         ELSE 'UNKNOWN'
         END AS privilege_type
     FROM
-        (SELECT lanacl FROM pg_language lan
-            LEFT OUTER JOIN pg_shdescription descr ON (lan.oid=descr.objoid AND descr.classoid='pg_language'::regclass)
+        (SELECT lanacl FROM pg_catalog.pg_language lan
+            LEFT OUTER JOIN pg_catalog.pg_shdescription descr ON (lan.oid=descr.objoid AND descr.classoid='pg_language'::regclass)
         WHERE lan.oid = {{ lid|qtLiteral }}::OID
         ) acl,
-        aclexplode(lanacl) d
+        pg_catalog.aclexplode(lanacl) d
     ) d
 LEFT JOIN pg_catalog.pg_roles g ON (d.grantor = g.oid)
 LEFT JOIN pg_catalog.pg_roles gt ON (d.grantee = gt.oid)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/default/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/default/acl.sql
index 9054baa45..0ce02cc2a 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/default/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/default/acl.sql
@@ -1,5 +1,5 @@
 SELECT 'lanacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor,
-    array_agg(privilege_type) as privileges, array_agg(is_grantable) as grantable
+    pg_catalog.array_agg(privilege_type) as privileges, pg_catalog.array_agg(is_grantable) as grantable
 FROM
     (SELECT
         d.grantee, d.grantor, d.is_grantable,
@@ -8,13 +8,13 @@ FROM
         ELSE 'UNKNOWN'
         END AS privilege_type
     FROM
-        (SELECT lanacl FROM pg_language lan
-            LEFT OUTER JOIN pg_shdescription descr ON (lan.oid=descr.objoid AND descr.classoid='pg_language'::regclass)
+        (SELECT lanacl FROM pg_catalog.pg_language lan
+            LEFT OUTER JOIN pg_catalog.pg_shdescription descr ON (lan.oid=descr.objoid AND descr.classoid='pg_language'::regclass)
         WHERE lan.oid = {{ lid|qtLiteral }}::OID
         ) acl,
         (SELECT (d).grantee AS grantee, (d).grantor AS grantor, (d).is_grantable AS is_grantable,
             (d).privilege_type AS privilege_type
-        FROM (SELECT aclexplode(lanacl) as d FROM pg_language lan1
+        FROM (SELECT pg_catalog.aclexplode(lanacl) as d FROM pg_catalog.pg_language lan1
             WHERE lan1.oid = {{ lid|qtLiteral }}::OID ) a
         ) d
     ) d
diff --git a/web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/default/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/default/delete.sql
index 0c55e3635..4b46de0ed 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/default/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/default/delete.sql
@@ -1,6 +1,6 @@
 {# ============= Get the language name using oid ============= #}
 {% if lid %}
-    SELECT lanname FROM pg_language WHERE oid = {{lid}}::oid;
+    SELECT lanname FROM pg_catalog.pg_language WHERE oid = {{lid}}::oid;
 {% endif %}
 {# ============= Drop the language ============= #}
 {% if lname %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/default/functions.sql b/web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/default/functions.sql
index 6545e84fa..2e15378a3 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/default/functions.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/default/functions.sql
@@ -1,6 +1,6 @@
 SELECT
-    CASE WHEN nspname != 'pg_catalog' THEN quote_ident(nspname) || '.' || quote_ident(proname)
-    ELSE quote_ident(proname)
+    CASE WHEN nspname != 'pg_catalog' THEN pg_catalog.quote_ident(nspname) || '.' || pg_catalog.quote_ident(proname)
+    ELSE pg_catalog.quote_ident(proname)
     END AS label,
     CASE
     WHEN prorettype = 2280 THEN 'handler'
@@ -8,8 +8,8 @@ SELECT
     ELSE 'validator'
     END AS prop_type
 FROM
-    pg_proc p JOIN pg_namespace nsp ON nsp.oid=pronamespace
+    pg_catalog.pg_proc p JOIN pg_catalog.pg_namespace nsp ON nsp.oid=pronamespace
 WHERE
     prorettype=2280 OR
     (prorettype=2278 AND proargtypes[0]=26) OR
-    (prorettype=2278 AND proargtypes[0]=2281)
\ No newline at end of file
+    (prorettype=2278 AND proargtypes[0]=2281)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/default/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/default/properties.sql
index e7dde9f2a..004dd5fbb 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/default/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/default/properties.sql
@@ -1,14 +1,14 @@
 SELECT
     lan.oid as oid, lanname as name, lanpltrusted as trusted,
-    array_to_string(lanacl::text[], ', ') as acl, hp.proname as lanproc,
+    pg_catalog.array_to_string(lanacl::text[], ', ') as acl, hp.proname as lanproc,
     vp.proname as lanval, description,
-    pg_get_userbyid(lan.lanowner) as lanowner, ip.proname as laninl,
-    (SELECT array_agg(provider || '=' || label) FROM pg_seclabel sl1 WHERE sl1.objoid=lan.oid) AS seclabels
+    pg_catalog.pg_get_userbyid(lan.lanowner) as lanowner, ip.proname as laninl,
+    (SELECT pg_catalog.array_agg(provider || '=' || label) FROM pg_catalog.pg_seclabel sl1 WHERE sl1.objoid=lan.oid) AS seclabels
 FROM
-    pg_language lan JOIN pg_proc hp ON hp.oid=lanplcallfoid
-    LEFT OUTER JOIN pg_proc ip ON ip.oid=laninline
-    LEFT OUTER JOIN pg_proc vp ON vp.oid=lanvalidator
-    LEFT OUTER JOIN pg_description des
+    pg_catalog.pg_language lan JOIN pg_catalog.pg_proc hp ON hp.oid=lanplcallfoid
+    LEFT OUTER JOIN pg_catalog.pg_proc ip ON ip.oid=laninline
+    LEFT OUTER JOIN pg_catalog.pg_proc vp ON vp.oid=lanvalidator
+    LEFT OUTER JOIN pg_catalog.pg_description des
         ON (
             des.objoid=lan.oid AND des.objsubid=0 AND
             des.classoid='pg_language'::regclass
diff --git a/web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/default/templates.sql b/web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/default/templates.sql
index f67184af5..50a8f7845 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/default/templates.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/default/templates.sql
@@ -1,7 +1,7 @@
 {# ============= SELECT Language templates ============= #}
 SELECT
     tmplname
-FROM pg_pltemplate
-LEFT JOIN pg_language ON tmplname=lanname
+FROM pg_catalog.pg_pltemplate
+LEFT JOIN pg_catalog.pg_language ON tmplname=lanname
 WHERE lanname IS NULL
-ORDER BY tmplname;
\ No newline at end of file
+ORDER BY tmplname;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/publications/templates/publications/sql/11_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/publications/templates/publications/sql/11_plus/properties.sql
index 0bded27d1..00b4d4e1e 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/publications/templates/publications/sql/11_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/publications/templates/publications/sql/11_plus/properties.sql
@@ -1,8 +1,8 @@
 SELECT c.oid AS oid, c.pubname AS name,
 pubinsert AS evnt_insert, pubupdate AS evnt_update, pubdelete AS evnt_delete, pubtruncate AS evnt_truncate,
 puballtables AS all_table,
-pga.rolname AS pubowner FROM pg_publication c
-JOIN pg_roles pga ON c.pubowner= pga.oid
+pga.rolname AS pubowner FROM pg_catalog.pg_publication c
+JOIN pg_catalog.pg_roles pga ON c.pubowner= pga.oid
 {%  if pbid %}
     WHERE c.oid = {{ pbid }}
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/publications/templates/publications/sql/13_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/publications/templates/publications/sql/13_plus/properties.sql
index 1694577f6..186aeb279 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/publications/templates/publications/sql/13_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/publications/templates/publications/sql/13_plus/properties.sql
@@ -2,8 +2,8 @@ SELECT c.oid AS oid, c.pubname AS name,
 pubinsert AS evnt_insert, pubupdate AS evnt_update, pubdelete AS evnt_delete, pubtruncate AS evnt_truncate,
 puballtables AS all_table,
 pubviaroot AS publish_via_partition_root,
-pga.rolname AS pubowner FROM pg_publication c
-JOIN pg_roles pga ON c.pubowner= pga.oid
+pga.rolname AS pubowner FROM pg_catalog.pg_publication c
+JOIN pg_catalog.pg_roles pga ON c.pubowner= pga.oid
 {%  if pbid %}
     WHERE c.oid = {{ pbid }}
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/publications/templates/publications/sql/default/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/publications/templates/publications/sql/default/delete.sql
index 7efb13acf..ef8b9a898 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/publications/templates/publications/sql/default/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/publications/templates/publications/sql/default/delete.sql
@@ -1,6 +1,6 @@
 {# ============= Get the publication name using oid ============= #}
 {% if pbid %}
-SELECT pubname FROM pg_publication WHERE oid = {{pbid}}::oid;
+SELECT pubname FROM pg_catalog.pg_publication WHERE oid = {{pbid}}::oid;
 {% endif %}
 {# ============= Drop the publication ============= #}
 {% if pname %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/publications/templates/publications/sql/default/dependencies.sql b/web/pgadmin/browser/server_groups/servers/databases/publications/templates/publications/sql/default/dependencies.sql
index 46399e304..d08ab9b47 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/publications/templates/publications/sql/default/dependencies.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/publications/templates/publications/sql/default/dependencies.sql
@@ -1,5 +1,5 @@
 SELECT cl.oid AS oid,
-quote_ident(pgb_table.schemaname)||'.'||quote_ident(pgb_table.tablename) AS pubtable
-FROM pg_publication_tables pgb_table
-LEFT JOIN pg_class cl ON pgb_table.tablename = cl.relname
+pg_catalog.quote_ident(pgb_table.schemaname)||'.'||pg_catalog.quote_ident(pgb_table.tablename) AS pubtable
+FROM pg_catalog.pg_publication_tables pgb_table
+LEFT JOIN pg_catalog.pg_class cl ON pgb_table.tablename = cl.relname
 WHERE pubname = '{{ pname }}' AND pgb_table.schemaname NOT LIKE 'pgagent';
diff --git a/web/pgadmin/browser/server_groups/servers/databases/publications/templates/publications/sql/default/get_all_tables.sql b/web/pgadmin/browser/server_groups/servers/databases/publications/templates/publications/sql/default/get_all_tables.sql
index ea1048af9..bb6b9e48e 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/publications/templates/publications/sql/default/get_all_tables.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/publications/templates/publications/sql/default/get_all_tables.sql
@@ -1,4 +1,4 @@
-SELECT quote_ident(c.table_schema)||'.'||quote_ident(c.table_name) AS table
+SELECT pg_catalog.quote_ident(c.table_schema)||'.'||pg_catalog.quote_ident(c.table_name) AS table
 FROM information_schema.tables c
 WHERE c.table_type = 'BASE TABLE'
       AND c.table_schema NOT LIKE 'pg\_%'
diff --git a/web/pgadmin/browser/server_groups/servers/databases/publications/templates/publications/sql/default/get_position.sql b/web/pgadmin/browser/server_groups/servers/databases/publications/templates/publications/sql/default/get_position.sql
index 80914b606..5d2d25009 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/publications/templates/publications/sql/default/get_position.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/publications/templates/publications/sql/default/get_position.sql
@@ -1 +1 @@
-SELECT oid, pubname AS name FROM pg_publication WHERE pubname = '{{ pubname }}';
+SELECT oid, pubname AS name FROM pg_catalog.pg_publication WHERE pubname = '{{ pubname }}';
diff --git a/web/pgadmin/browser/server_groups/servers/databases/publications/templates/publications/sql/default/get_tables.sql b/web/pgadmin/browser/server_groups/servers/databases/publications/templates/publications/sql/default/get_tables.sql
index 1849b65ea..58eac45a8 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/publications/templates/publications/sql/default/get_tables.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/publications/templates/publications/sql/default/get_tables.sql
@@ -1,3 +1,3 @@
-SELECT quote_ident(pgb_table.schemaname)||'.'||quote_ident(pgb_table.tablename)
-AS pubtable  FROM pg_publication_tables pgb_table WHERE pubname = '{{ pname }}'
+SELECT pg_catalog.quote_ident(pgb_table.schemaname)||'.'||pg_catalog.quote_ident(pgb_table.tablename)
+AS pubtable  FROM pg_catalog.pg_publication_tables pgb_table WHERE pubname = '{{ pname }}'
 AND pgb_table.schemaname NOT LIKE 'pgagent';
diff --git a/web/pgadmin/browser/server_groups/servers/databases/publications/templates/publications/sql/default/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/publications/templates/publications/sql/default/nodes.sql
index 9055eda57..efb153de7 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/publications/templates/publications/sql/default/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/publications/templates/publications/sql/default/nodes.sql
@@ -1 +1 @@
-SELECT oid , pubname AS name FROM pg_publication;
+SELECT oid , pubname AS name FROM pg_catalog.pg_publication;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/publications/templates/publications/sql/default/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/publications/templates/publications/sql/default/properties.sql
index 8f6edee94..8be36e1a8 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/publications/templates/publications/sql/default/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/publications/templates/publications/sql/default/properties.sql
@@ -1,8 +1,8 @@
 SELECT c.oid AS oid, c.pubname AS name,
 pubinsert AS evnt_insert, pubupdate AS evnt_update, pubdelete AS evnt_delete,
 puballtables AS all_table,
-pga.rolname AS pubowner FROM pg_publication c
-JOIN pg_roles pga ON c.pubowner= pga.oid
+pga.rolname AS pubowner FROM pg_catalog.pg_publication c
+JOIN pg_catalog.pg_roles pga ON c.pubowner= pga.oid
 {%  if pbid %}
     where c.oid = {{ pbid }}
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/columns/templates/catalog_object_column/sql/default/depend.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/columns/templates/catalog_object_column/sql/default/depend.sql
index 024103f09..195d24f97 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/columns/templates/catalog_object_column/sql/default/depend.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/columns/templates/catalog_object_column/sql/default/depend.sql
@@ -1,10 +1,10 @@
 SELECT
     ref.relname AS refname, d2.refclassid, dep.deptype AS deptype
-FROM pg_depend dep
-    LEFT JOIN pg_depend d2 ON dep.objid=d2.objid AND dep.refobjid != d2.refobjid
-    LEFT JOIN pg_class ref ON ref.oid=d2.refobjid
-    LEFT JOIN pg_attribute att ON d2.refclassid=att.attrelid AND d2.refobjsubid=att.attnum
+FROM pg_catalog.pg_depend dep
+    LEFT JOIN pg_catalog.pg_depend d2 ON dep.objid=d2.objid AND dep.refobjid != d2.refobjid
+    LEFT JOIN pg_catalog.pg_class ref ON ref.oid=d2.refobjid
+    LEFT JOIN pg_catalog.pg_attribute att ON d2.refclassid=att.attrelid AND d2.refobjsubid=att.attnum
 {{ where }} AND
-    dep.classid=(SELECT oid FROM pg_class WHERE relname='pg_attrdef') AND
-    dep.refobjid NOT IN (SELECT d3.refobjid FROM pg_depend d3 WHERE d3.objid=d2.refobjid)
+    dep.classid=(SELECT oid FROM pg_catalog.pg_class WHERE relname='pg_attrdef') AND
+    dep.refobjid NOT IN (SELECT d3.refobjid FROM pg_catalog.pg_depend d3 WHERE d3.objid=d2.refobjid)
 ORDER BY refname;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/columns/templates/catalog_object_column/sql/default/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/columns/templates/catalog_object_column/sql/default/nodes.sql
index c80d38665..88a16c0a2 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/columns/templates/catalog_object_column/sql/default/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/columns/templates/catalog_object_column/sql/default/nodes.sql
@@ -1,6 +1,6 @@
 SELECT
     attnum, attname
-FROM pg_attribute att
+FROM pg_catalog.pg_attribute att
 WHERE att.attrelid = {{coid}}::oid
   AND att.attnum > 0
   AND att.attisdropped IS FALSE
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/columns/templates/catalog_object_column/sql/default/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/columns/templates/catalog_object_column/sql/default/properties.sql
index 1130692f5..02941fc6d 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/columns/templates/catalog_object_column/sql/default/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/columns/templates/catalog_object_column/sql/default/properties.sql
@@ -1,38 +1,38 @@
 SELECT
     att.*, def.*, pg_catalog.pg_get_expr(def.adbin, def.adrelid) AS defval,
         CASE WHEN att.attndims > 0 THEN 1 ELSE 0 END AS isarray,
-        format_type(ty.oid,NULL) AS typname,
-        format_type(ty.oid,att.atttypmod) AS displaytypname,
+        pg_catalog.format_type(ty.oid,NULL) AS typname,
+        pg_catalog.format_type(ty.oid,att.atttypmod) AS displaytypname,
         tn.nspname as typnspname, et.typname as elemtypname,
         ty.typstorage AS defaultstorage, cl.relname, na.nspname,
 	att.attstattarget, description, cs.relname AS sername,
 	ns.nspname AS serschema,
-	(SELECT count(1) FROM pg_type t2 WHERE t2.typname=ty.typname) > 1 AS isdup,
+	(SELECT count(1) FROM pg_catalog.pg_type t2 WHERE t2.typname=ty.typname) > 1 AS isdup,
 	indkey, coll.collname, nspc.nspname as collnspname , attoptions,
 	-- Start pgAdmin4, added to save time on client side parsing
 	CASE WHEN length(coll.collname::text) > 0 AND length(nspc.nspname::text) > 0  THEN
-	  concat(quote_ident(nspc.nspname),'.',quote_ident(coll.collname))
+	  pg_catalog.concat(pg_catalog.quote_ident(nspc.nspname),'.',pg_catalog.quote_ident(coll.collname))
 	ELSE '' END AS collspcname,
-	CASE WHEN strpos(format_type(ty.oid,att.atttypmod), '.') > 0 THEN
-	  split_part(format_type(ty.oid,att.atttypmod), '.', 2)
-	ELSE format_type(ty.oid,att.atttypmod) END AS cltype,
+	CASE WHEN strpos(pg_catalog.format_type(ty.oid,att.atttypmod), '.') > 0 THEN
+	  pg_catalog.split_part(format_type(ty.oid,att.atttypmod), '.', 2)
+	ELSE pg_catalog.format_type(ty.oid,att.atttypmod) END AS cltype,
 	-- End pgAdmin4
-	EXISTS(SELECT 1 FROM pg_constraint WHERE conrelid=att.attrelid AND contype='f' AND att.attnum=ANY(conkey)) As isfk,
-	(SELECT array_agg(label) FROM pg_seclabels sl1 WHERE sl1.objoid=att.attrelid AND sl1.objsubid=att.attnum) AS labels,
-	(SELECT array_agg(provider) FROM pg_seclabels sl2 WHERE sl2.objoid=att.attrelid AND sl2.objsubid=att.attnum) AS providers
-FROM pg_attribute att
-  JOIN pg_type ty ON ty.oid=atttypid
-  JOIN pg_namespace tn ON tn.oid=ty.typnamespace
-  JOIN pg_class cl ON cl.oid=att.attrelid
-  JOIN pg_namespace na ON na.oid=cl.relnamespace
-  LEFT OUTER JOIN pg_type et ON et.oid=ty.typelem
-  LEFT OUTER JOIN pg_attrdef def ON adrelid=att.attrelid AND adnum=att.attnum
-  LEFT OUTER JOIN pg_description des ON (des.objoid=att.attrelid AND des.objsubid=att.attnum AND des.classoid='pg_class'::regclass)
-  LEFT OUTER JOIN (pg_depend JOIN pg_class cs ON objid=cs.oid AND classid='pg_class'::regclass AND cs.relkind='S') ON refobjid=att.attrelid AND refobjsubid=att.attnum
-  LEFT OUTER JOIN pg_namespace ns ON ns.oid=cs.relnamespace
-  LEFT OUTER JOIN pg_index pi ON pi.indrelid=att.attrelid AND indisprimary
-  LEFT OUTER JOIN pg_collation coll ON att.attcollation=coll.oid
-  LEFT OUTER JOIN pg_namespace nspc ON coll.collnamespace=nspc.oid
+	EXISTS(SELECT 1 FROM pg_catalog.pg_constraint WHERE conrelid=att.attrelid AND contype='f' AND att.attnum=ANY(conkey)) As isfk,
+	(SELECT pg_catalog.array_agg(label) FROM pg_catalog.pg_seclabels sl1 WHERE sl1.objoid=att.attrelid AND sl1.objsubid=att.attnum) AS labels,
+	(SELECT pg_catalog.array_agg(provider) FROM pg_catalog.pg_seclabels sl2 WHERE sl2.objoid=att.attrelid AND sl2.objsubid=att.attnum) AS providers
+FROM pg_catalog.pg_attribute att
+  JOIN pg_catalog.pg_type ty ON ty.oid=atttypid
+  JOIN pg_catalog.pg_namespace tn ON tn.oid=ty.typnamespace
+  JOIN pg_catalog.pg_class cl ON cl.oid=att.attrelid
+  JOIN pg_catalog.pg_namespace na ON na.oid=cl.relnamespace
+  LEFT OUTER JOIN pg_catalog.pg_type et ON et.oid=ty.typelem
+  LEFT OUTER JOIN pg_catalog.pg_attrdef def ON adrelid=att.attrelid AND adnum=att.attnum
+  LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=att.attrelid AND des.objsubid=att.attnum AND des.classoid='pg_class'::regclass)
+  LEFT OUTER JOIN (pg_catalog.pg_depend JOIN pg_catalog.pg_class cs ON objid=cs.oid AND classid='pg_class'::regclass AND cs.relkind='S') ON refobjid=att.attrelid AND refobjsubid=att.attnum
+  LEFT OUTER JOIN pg_catalog.pg_namespace ns ON ns.oid=cs.relnamespace
+  LEFT OUTER JOIN pg_catalog.pg_index pi ON pi.indrelid=att.attrelid AND indisprimary
+  LEFT OUTER JOIN pg_catalog.pg_collation coll ON att.attcollation=coll.oid
+  LEFT OUTER JOIN pg_catalog.pg_namespace nspc ON coll.collnamespace=nspc.oid
 WHERE att.attrelid = {{coid}}::oid{% if clid %}
   AND att.attnum = {{clid}}::int
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/templates/catalog_object/sql/pg/default/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/templates/catalog_object/sql/pg/default/nodes.sql
index e610d1854..d11d2c2cc 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/templates/catalog_object/sql/pg/default/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/templates/catalog_object/sql/pg/default/nodes.sql
@@ -1,7 +1,7 @@
 SELECT
     c.oid, c.relname as name
 FROM
-    pg_class c
+    pg_catalog.pg_class c
 {% if scid %}
 WHERE relnamespace = {{scid}}::oid
 {% elif coid %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/templates/catalog_object/sql/pg/default/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/templates/catalog_object/sql/pg/default/properties.sql
index f33c74e52..682a44e9e 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/templates/catalog_object/sql/pg/default/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/templates/catalog_object/sql/pg/default/properties.sql
@@ -1,10 +1,10 @@
 SELECT
     c.oid, c.relname as name, r.rolname AS owner, description
 FROM
-    pg_class c
-    LEFT OUTER JOIN pg_description d
+    pg_catalog.pg_class c
+    LEFT OUTER JOIN pg_catalog.pg_description d
         ON d.objoid=c.oid AND d.classoid='pg_class'::regclass
-    LEFT JOIN pg_roles r ON c.relowner = r.oid
+    LEFT JOIN pg_catalog.pg_roles r ON c.relowner = r.oid
 WHERE
     relnamespace = {{scid}}::oid
 {% if coid %} AND
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/templates/catalog_object/sql/ppas/default/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/templates/catalog_object/sql/ppas/default/nodes.sql
index 2629264d7..bf09365a7 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/templates/catalog_object/sql/ppas/default/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/templates/catalog_object/sql/ppas/default/nodes.sql
@@ -1,11 +1,11 @@
 SELECT
     c.oid, c.relname as name
-FROM pg_class c
+FROM pg_catalog.pg_class c
 {% if scid %}
 WHERE relnamespace = {{scid}}::oid
 OR  (
     -- On EnterpriseDB we need to ignore some objects in the catalog, namely, _*, dual and type_object_source.
-	select 'sys' ~ (SELECT nsp.nspname FROM pg_namespace nsp WHERE nsp.oid = {{scid}}::oid)
+	select 'sys' ~ (SELECT nsp.nspname FROM pg_catalog.pg_namespace nsp WHERE nsp.oid = {{scid}}::oid)
 	AND
 	(c.relname NOT LIKE '\\_%' AND c.relname = 'dual' AND  c.relname = 'type_object_source')
     )
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/templates/catalog_object/sql/ppas/default/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/templates/catalog_object/sql/ppas/default/properties.sql
index d96320c24..4c1aeceeb 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/templates/catalog_object/sql/ppas/default/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/templates/catalog_object/sql/ppas/default/properties.sql
@@ -1,10 +1,10 @@
 SELECT
     c.oid, c.relname as name, r.rolname AS owner, description
 FROM
-    pg_class c
-    LEFT OUTER JOIN pg_description d
+    pg_catalog.pg_class c
+    LEFT OUTER JOIN pg_catalog.pg_description d
         ON d.objoid=c.oid AND d.classoid='pg_class'::regclass
-    LEFT JOIN pg_roles r ON c.relowner = r.oid
+    LEFT JOIN pg_catalog.pg_roles r ON c.relowner = r.oid
 WHERE
     relnamespace = {{scid}}::oid
 {% if coid %} AND
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collations/sql/default/backend_support.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collations/sql/default/backend_support.sql
index 40493d3ff..97bedfd7f 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collations/sql/default/backend_support.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collations/sql/default/backend_support.sql
@@ -1,18 +1,18 @@
 SELECT
      CASE WHEN nsp.nspname IN ('sys', 'dbo', 'information_schema') THEN true ELSE false END AS dbSupport
-FROM pg_namespace nsp
+FROM pg_catalog.pg_namespace nsp
 WHERE nsp.oid={{scid}}::oid
 AND (
     (nspname = 'pg_catalog' AND EXISTS
-        (SELECT 1 FROM pg_class WHERE relname = 'pg_class' AND relnamespace = nsp.oid LIMIT 1))
+        (SELECT 1 FROM pg_catalog.pg_class WHERE relname = 'pg_class' AND relnamespace = nsp.oid LIMIT 1))
     OR (nspname = 'pgagent' AND EXISTS
-        (SELECT 1 FROM pg_class WHERE relname = 'pga_job' AND relnamespace = nsp.oid LIMIT 1))
+        (SELECT 1 FROM pg_catalog.pg_class WHERE relname = 'pga_job' AND relnamespace = nsp.oid LIMIT 1))
     OR (nspname = 'information_schema' AND EXISTS
-        (SELECT 1 FROM pg_class WHERE relname = 'tables' AND relnamespace = nsp.oid LIMIT 1))
+        (SELECT 1 FROM pg_catalog.pg_class WHERE relname = 'tables' AND relnamespace = nsp.oid LIMIT 1))
     OR (nspname LIKE '_%' AND EXISTS
-        (SELECT 1 FROM pg_proc WHERE proname='slonyversion' AND pronamespace = nsp.oid LIMIT 1))
+        (SELECT 1 FROM pg_catalog.pg_proc WHERE proname='slonyversion' AND pronamespace = nsp.oid LIMIT 1))
 )
 AND
     nspname NOT LIKE E'pg\\temp\\%'
 AND
-    nspname NOT LIKE E'pg\\toast_temp\\%'
\ No newline at end of file
+    nspname NOT LIKE E'pg\\toast_temp\\%'
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collations/sql/default/get_collations.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collations/sql/default/get_collations.sql
index 9cfe4f877..4a531560d 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collations/sql/default/get_collations.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collations/sql/default/get_collations.sql
@@ -1,7 +1,7 @@
 SELECT --nspname, collname,
     CASE WHEN length(nspname::text) > 0 AND length(collname::text) > 0  THEN
-        concat(quote_ident(nspname), '.', quote_ident(collname))
+        pg_catalog.concat(pg_catalog.quote_ident(nspname), '.', pg_catalog.quote_ident(collname))
     ELSE '' END AS copy_collation
-FROM pg_collation c, pg_namespace n
+FROM pg_catalog.pg_collation c, pg_catalog.pg_namespace n
 WHERE c.collnamespace=n.oid
 ORDER BY nspname, collname;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collations/sql/default/get_name.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collations/sql/default/get_name.sql
index b0d95ed9e..bde071ed1 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collations/sql/default/get_name.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collations/sql/default/get_name.sql
@@ -1,5 +1,5 @@
 SELECT nspname AS schema, collname AS name
-FROM pg_collation c, pg_namespace n
+FROM pg_catalog.pg_collation c, pg_catalog.pg_namespace n
 WHERE c.collnamespace = n.oid AND
     n.oid = {{ scid }}::oid AND
     c.oid = {{ coid }}::oid;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collations/sql/default/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collations/sql/default/get_oid.sql
index ca6fdefba..9ea30952d 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collations/sql/default/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collations/sql/default/get_oid.sql
@@ -1,7 +1,7 @@
 {# Below will provide oid for newly created collation #}
 {% if data is defined %}
 SELECT c.oid
-FROM pg_collation c, pg_namespace n
+FROM pg_catalog.pg_collation c, pg_catalog.pg_namespace n
 WHERE c.collnamespace=n.oid AND
     n.nspname = {{ data.schema|qtLiteral }} AND
     c.collname = {{ data.name|qtLiteral }}
@@ -9,7 +9,7 @@ WHERE c.collnamespace=n.oid AND
 SELECT
     c.collnamespace as scid
 FROM
-    pg_collation c
+    pg_catalog.pg_collation c
 WHERE
     c.oid = {{coid}}::oid;
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collations/sql/default/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collations/sql/default/nodes.sql
index d93ab290b..faab5a135 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collations/sql/default/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collations/sql/default/nodes.sql
@@ -1,5 +1,5 @@
 SELECT c.oid, c.collname AS name
-FROM pg_collation c
+FROM pg_catalog.pg_collation c
 {% if scid %}
 WHERE c.collnamespace = {{scid}}::oid
 {% elif coid %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collations/sql/default/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collations/sql/default/properties.sql
index 3bc9e6f45..b2ab99bb8 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collations/sql/default/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collations/sql/default/properties.sql
@@ -1,8 +1,8 @@
 SELECT c.oid, c.collname AS name, c.collcollate AS lc_collate, c.collctype AS lc_type,
-    pg_get_userbyid(c.collowner) AS owner, description, n.nspname AS schema
-FROM pg_collation c
-    JOIN pg_namespace n ON n.oid=c.collnamespace
-    LEFT OUTER JOIN pg_description des ON (des.objoid=c.oid AND des.classoid='pg_collation'::regclass)
+    pg_catalog.pg_get_userbyid(c.collowner) AS owner, description, n.nspname AS schema
+FROM pg_catalog.pg_collation c
+    JOIN pg_catalog.pg_namespace n ON n.oid=c.collnamespace
+    LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=c.oid AND des.classoid='pg_collation'::regclass)
 WHERE c.collnamespace = {{scid}}::oid
 {% if coid %}    AND c.oid = {{coid}}::oid {% endif %}
 ORDER BY c.collname;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/templates/domain_constraints/sql/9.2_plus/get_type_category.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/templates/domain_constraints/sql/9.2_plus/get_type_category.sql
index 3e3b244ab..3d92443f1 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/templates/domain_constraints/sql/9.2_plus/get_type_category.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/templates/domain_constraints/sql/9.2_plus/get_type_category.sql
@@ -1,5 +1,5 @@
 SELECT
     typcategory
 FROM
-    pg_type
+    pg_catalog.pg_type
 WHERE typname = {{datatype}};
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/templates/domain_constraints/sql/9.2_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/templates/domain_constraints/sql/9.2_plus/properties.sql
index 88bc93ca1..09a7be577 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/templates/domain_constraints/sql/9.2_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/templates/domain_constraints/sql/9.2_plus/properties.sql
@@ -1,15 +1,15 @@
 SELECT
     c.oid, conname AS name, typname AS relname, nspname, description,
-    regexp_replace(pg_get_constraintdef(c.oid, true), E'CHECK \\((.*)\\).*', E'\\1') AS consrc,
+    pg_catalog.regexp_replace(pg_catalog.pg_get_constraintdef(c.oid, true), E'CHECK \\((.*)\\).*', E'\\1') AS consrc,
     connoinherit, convalidated, convalidated AS convalidated_p
 FROM
-    pg_constraint c
+    pg_catalog.pg_constraint c
 JOIN
-    pg_type t ON t.oid=contypid
+    pg_catalog.pg_type t ON t.oid=contypid
 JOIN
-    pg_namespace nl ON nl.oid=typnamespace
+    pg_catalog.pg_namespace nl ON nl.oid=typnamespace
 LEFT OUTER JOIN
-    pg_description des ON (des.objoid=c.oid AND des.classoid='pg_constraint'::regclass)
+    pg_catalog.pg_description des ON (des.objoid=c.oid AND des.classoid='pg_constraint'::regclass)
 {% if doid %}
 WHERE
     contype = 'c' AND contypid =  {{doid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/templates/domain_constraints/sql/default/get_domain.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/templates/domain_constraints/sql/default/get_domain.sql
index 1040c0e3a..373cff2be 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/templates/domain_constraints/sql/default/get_domain.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/templates/domain_constraints/sql/default/get_domain.sql
@@ -1,8 +1,8 @@
 SELECT
     d.typname as domain, bn.nspname as schema
 FROM
-    pg_type d
+    pg_catalog.pg_type d
 JOIN
-    pg_namespace bn ON bn.oid=d.typnamespace
+    pg_catalog.pg_namespace bn ON bn.oid=d.typnamespace
 WHERE
     d.oid = {{doid}};
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/templates/domain_constraints/sql/default/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/templates/domain_constraints/sql/default/get_oid.sql
index f59e08cf7..2f1446987 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/templates/domain_constraints/sql/default/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/templates/domain_constraints/sql/default/get_oid.sql
@@ -1,7 +1,7 @@
 SELECT
     oid, conname as name
 FROM
-    pg_constraint
+    pg_catalog.pg_constraint
 WHERE
     contypid = {{doid}}::oid
     AND conname={{ name|qtLiteral }};
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/templates/domain_constraints/sql/default/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/templates/domain_constraints/sql/default/properties.sql
index 5aa9a44b5..823fc9fd1 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/templates/domain_constraints/sql/default/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/templates/domain_constraints/sql/default/properties.sql
@@ -1,12 +1,12 @@
 SELECT
     c.oid, conname AS name, typname AS relname, nspname,
-    regexp_replace(pg_get_constraintdef(c.oid, true), E'CHECK \\((.*)\\).*', E'\\1') AS consrc
+    pg_catalog.regexp_replace(pg_catalog.pg_get_constraintdef(c.oid, true), E'CHECK \\((.*)\\).*', E'\\1') AS consrc
 FROM
-    pg_constraint c
+    pg_catalog.pg_constraint c
 JOIN
-    pg_type t ON t.oid=contypid
+    pg_catalog.pg_type t ON t.oid=contypid
 JOIN
-    pg_namespace nl ON nl.oid=typnamespace
+    pg_catalog.pg_namespace nl ON nl.oid=typnamespace
 {% if doid %}
 WHERE
     contype = 'c' AND contypid =  {{doid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/9.2_plus/get_collations.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/9.2_plus/get_collations.sql
index 06aa54fe6..ec6f83b5b 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/9.2_plus/get_collations.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/9.2_plus/get_collations.sql
@@ -1,9 +1,9 @@
 SELECT --nspname, collname,
     CASE WHEN length(nspname::text) > 0 AND length(collname::text) > 0  THEN
-    concat(nspname, '."', collname,'"')
+    pg_catalog.concat(nspname, '."', collname,'"')
     ELSE '' END AS copy_collation
 FROM
-    pg_collation c, pg_namespace n
+    pg_catalog.pg_collation c, pg_catalog.pg_namespace n
 WHERE
     c.collnamespace=n.oid
 ORDER BY
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/9.2_plus/get_constraints.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/9.2_plus/get_constraints.sql
index 676c5a6e2..e813a2c91 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/9.2_plus/get_constraints.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/9.2_plus/get_constraints.sql
@@ -1,14 +1,14 @@
 SELECT
     'DOMAIN' AS objectkind, c.oid as conoid, conname, typname as relname, nspname, description,
-    regexp_replace(pg_get_constraintdef(c.oid, true), E'CHECK \\((.*)\\).*', E'\\1') as consrc, connoinherit, convalidated
+    pg_catalog.regexp_replace(pg_catalog.pg_get_constraintdef(c.oid, true), E'CHECK \\((.*)\\).*', E'\\1') as consrc, connoinherit, convalidated
 FROM
-    pg_constraint c
+    pg_catalog.pg_constraint c
 JOIN
-    pg_type t ON t.oid=contypid
+    pg_catalog.pg_type t ON t.oid=contypid
 JOIN
-    pg_namespace nl ON nl.oid=typnamespace
+    pg_catalog.pg_namespace nl ON nl.oid=typnamespace
 LEFT OUTER JOIN
-    pg_description des ON (des.objoid=c.oid AND des.classoid='pg_constraint'::regclass)
+    pg_catalog.pg_description des ON (des.objoid=c.oid AND des.classoid='pg_constraint'::regclass)
 WHERE
     contype = 'c' AND contypid =  {{doid}}::oid
 ORDER BY
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/9.2_plus/node.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/9.2_plus/node.sql
index 0883d68fa..72ccfab1e 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/9.2_plus/node.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/9.2_plus/node.sql
@@ -1,12 +1,12 @@
 SELECT
-    d.oid, d.typname as name, pg_get_userbyid(d.typowner) as owner,
+    d.oid, d.typname as name, pg_catalog.pg_get_userbyid(d.typowner) as owner,
     bn.nspname as basensp
 FROM
-    pg_type d
+    pg_catalog.pg_type d
 JOIN
-    pg_type b ON b.oid = d.typbasetype
+    pg_catalog.pg_type b ON b.oid = d.typbasetype
 JOIN
-    pg_namespace bn ON bn.oid=d.typnamespace
+    pg_catalog.pg_namespace bn ON bn.oid=d.typnamespace
 {% if scid is defined %}
 WHERE
     d.typnamespace = {{scid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/9.2_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/9.2_plus/properties.sql
index 091a20efd..8201ad622 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/9.2_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/9.2_plus/properties.sql
@@ -1,30 +1,30 @@
 SELECT
-    d.oid, d.typname as name, d.typbasetype, format_type(b.oid,NULL) as basetype, pg_get_userbyid(d.typowner) as owner,
-    c.oid AS colloid, format_type(b.oid, d.typtypmod) AS fulltype,
+    d.oid, d.typname as name, d.typbasetype, pg_catalog.format_type(b.oid,NULL) as basetype, pg_catalog.pg_get_userbyid(d.typowner) as owner,
+    c.oid AS colloid, pg_catalog.format_type(b.oid, d.typtypmod) AS fulltype,
     CASE WHEN length(cn.nspname::text) > 0 AND length(c.collname::text) > 0 THEN
-    concat(cn.nspname, '."', c.collname,'"')
+    pg_catalog.concat(cn.nspname, '."', c.collname,'"')
     ELSE '' END AS collname,
     d.typtypmod, d.typnotnull, d.typdefault, d.typndims, d.typdelim, bn.nspname as basensp,
-    description, (SELECT COUNT(1) FROM pg_type t2 WHERE t2.typname=d.typname) > 1 AS domisdup,
-    (SELECT COUNT(1) FROM pg_type t3 WHERE t3.typname=b.typname) > 1 AS baseisdup,
+    description, (SELECT COUNT(1) FROM pg_catalog.pg_type t2 WHERE t2.typname=d.typname) > 1 AS domisdup,
+    (SELECT COUNT(1) FROM pg_catalog.pg_type t3 WHERE t3.typname=b.typname) > 1 AS baseisdup,
     (SELECT
-        array_agg(provider || '=' || label)
+        pg_catalog.array_agg(provider || '=' || label)
     FROM
-        pg_seclabel sl1
+        pg_catalog.pg_seclabel sl1
     WHERE
         sl1.objoid=d.oid) AS seclabels
 FROM
-    pg_type d
+    pg_catalog.pg_type d
 JOIN
-    pg_type b ON b.oid = d.typbasetype
+    pg_catalog.pg_type b ON b.oid = d.typbasetype
 JOIN
-    pg_namespace bn ON bn.oid=d.typnamespace
+    pg_catalog.pg_namespace bn ON bn.oid=d.typnamespace
 LEFT OUTER JOIN
-    pg_description des ON (des.objoid=d.oid AND des.classoid='pg_type'::regclass)
+    pg_catalog.pg_description des ON (des.objoid=d.oid AND des.classoid='pg_type'::regclass)
 LEFT OUTER JOIN
-    pg_collation c ON d.typcollation=c.oid
+    pg_catalog.pg_collation c ON d.typcollation=c.oid
 LEFT OUTER JOIN
-    pg_namespace cn ON c.collnamespace=cn.oid
+    pg_catalog.pg_namespace cn ON c.collnamespace=cn.oid
 WHERE
     d.typnamespace = {{scid}}::oid
 {% if doid %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/default/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/default/delete.sql
index d8be4aa9a..65d4a4682 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/default/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/default/delete.sql
@@ -2,9 +2,9 @@
 SELECT
     d.typname as name, bn.nspname as basensp
 FROM
-    pg_type d
+    pg_catalog.pg_type d
 JOIN
-    pg_namespace bn ON bn.oid=d.typnamespace
+    pg_catalog.pg_namespace bn ON bn.oid=d.typnamespace
 WHERE
     d.typnamespace = {{scid}}::oid
 AND
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/default/get_collations.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/default/get_collations.sql
index f6602d024..214683b97 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/default/get_collations.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/default/get_collations.sql
@@ -1,9 +1,9 @@
 SELECT --nspname, collname,
     CASE WHEN length(nspname::text) > 0 AND length(collname::text) > 0 THEN
-    concat(nspname, '."', collname,'"')
+    pg_catalog.concat(nspname, '."', collname,'"')
     ELSE '' END AS copy_collation
 FROM
-    pg_collation c, pg_namespace n
+    pg_catalog.pg_collation c, pg_catalog.pg_namespace n
 WHERE
     c.collnamespace=n.oid
 ORDER BY
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/default/get_constraints.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/default/get_constraints.sql
index b99f855a8..bf432ec26 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/default/get_constraints.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/default/get_constraints.sql
@@ -1,14 +1,14 @@
 SELECT
     'DOMAIN' AS objectkind, c.oid as conoid, conname, typname as relname, nspname, description,
-    regexp_replace(pg_get_constraintdef(c.oid, true), E'CHECK \\((.*)\\).*', E'\\1') as cons
+    pg_catalog.regexp_replace(pg_catalog.pg_get_constraintdef(c.oid, true), E'CHECK \\((.*)\\).*', E'\\1') as cons
 FROM
-    pg_constraint c
+    pg_catalog.pg_constraint c
 JOIN
-    pg_type t ON t.oid=contypid
+    pg_catalog.pg_type t ON t.oid=contypid
 JOIN
-    pg_namespace nl ON nl.oid=typnamespace
+    pg_catalog.pg_namespace nl ON nl.oid=typnamespace
 LEFT OUTER JOIN
-    pg_description des ON (des.objoid=c.oid AND des.classoid='pg_constraint'::regclass)
+    pg_catalog.pg_description des ON (des.objoid=c.oid AND des.classoid='pg_constraint'::regclass)
 WHERE
     contype = 'c'
     AND contypid =  {{doid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/default/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/default/get_oid.sql
index d854bc465..2c342e8c6 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/default/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/default/get_oid.sql
@@ -2,16 +2,16 @@
 SELECT
     d.typnamespace as scid
 FROM
-    pg_type d
+    pg_catalog.pg_type d
 WHERE
     d.oid={{ doid }}::oid;
 {% else %}
 SELECT
     d.oid
 FROM
-    pg_type d
+    pg_catalog.pg_type d
 JOIN
-    pg_namespace bn ON bn.oid=d.typnamespace
+    pg_catalog.pg_namespace bn ON bn.oid=d.typnamespace
 WHERE
     bn.nspname = {{ basensp|qtLiteral }}
     AND d.typname={{ name|qtLiteral }};
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/default/node.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/default/node.sql
index 5f3f8e24c..1e089211d 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/default/node.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/default/node.sql
@@ -1,12 +1,12 @@
 SELECT
-    d.oid, d.typname as name, pg_get_userbyid(d.typowner) as owner,
+    d.oid, d.typname as name, pg_catalog.pg_get_userbyid(d.typowner) as owner,
     bn.nspname as basensp
 FROM
-    pg_type d
+    pg_catalog.pg_type d
 JOIN
-    pg_type b ON b.oid = d.typbasetype
+    pg_catalog.pg_type b ON b.oid = d.typbasetype
 JOIN
-    pg_namespace bn ON bn.oid=d.typnamespace
+    pg_catalog.pg_namespace bn ON bn.oid=d.typnamespace
 {% if scid %}
 WHERE
     d.typnamespace = {{scid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/default/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/default/properties.sql
index b3ec20b27..7148bf761 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/default/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/default/properties.sql
@@ -1,31 +1,31 @@
 SELECT
-    d.oid, d.typname as name, d.typbasetype, format_type(b.oid,NULL) as basetype,
-    pg_get_userbyid(d.typowner) as owner,
-    c.oid AS colloid, format_type(b.oid, d.typtypmod) AS fulltype,
+    d.oid, d.typname as name, d.typbasetype, pg_catalog.format_type(b.oid,NULL) as basetype,
+    pg_catalog.pg_get_userbyid(d.typowner) as owner,
+    c.oid AS colloid, pg_catalog.format_type(b.oid, d.typtypmod) AS fulltype,
     CASE WHEN length(cn.nspname::text) > 0 AND length(c.collname::text) > 0 THEN
-    concat(cn.nspname, '."', c.collname,'"')
+    pg_catalog.concat(cn.nspname, '."', c.collname,'"')
     ELSE '' END AS collname,
     d.typtypmod, d.typnotnull, d.typdefault, d.typndims, d.typdelim, bn.nspname as basensp,
-    description, (SELECT COUNT(1) FROM pg_type t2 WHERE t2.typname=d.typname) > 1 AS domisdup,
-    (SELECT COUNT(1) FROM pg_type t3 WHERE t3.typname=b.typname) > 1 AS baseisdup,
+    description, (SELECT COUNT(1) FROM pg_catalog.pg_type t2 WHERE t2.typname=d.typname) > 1 AS domisdup,
+    (SELECT COUNT(1) FROM pg_catalog.pg_type t3 WHERE t3.typname=b.typname) > 1 AS baseisdup,
     (SELECT
-        array_agg(provider || '=' || label)
+        pg_catalog.array_agg(provider || '=' || label)
     FROM
-        pg_seclabel sl1
+        pg_catalog.pg_seclabel sl1
     WHERE
         sl1.objoid=d.oid) AS seclabels
 FROM
-    pg_type d
+    pg_catalog.pg_type d
 JOIN
-    pg_type b ON b.oid = d.typbasetype
+    pg_catalog.pg_type b ON b.oid = d.typbasetype
 JOIN
-    pg_namespace bn ON bn.oid=d.typnamespace
+    pg_catalog.pg_namespace bn ON bn.oid=d.typnamespace
 LEFT OUTER JOIN
-    pg_description des ON (des.objoid=d.oid AND des.classoid='pg_type'::regclass)
+    pg_catalog.pg_description des ON (des.objoid=d.oid AND des.classoid='pg_type'::regclass)
 LEFT OUTER JOIN
-    pg_collation c ON d.typcollation=c.oid
+    pg_catalog.pg_collation c ON d.typcollation=c.oid
 LEFT OUTER JOIN
-    pg_namespace cn ON c.collnamespace=cn.oid
+    pg_catalog.pg_namespace cn ON c.collnamespace=cn.oid
 WHERE
     d.typnamespace = {{scid}}::oid
     {% if doid %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/12_plus/get_constraints.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/12_plus/get_constraints.sql
index 088cd4697..9e7bae644 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/12_plus/get_constraints.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/12_plus/get_constraints.sql
@@ -1,9 +1,9 @@
 SELECT
     oid as conoid, conname, contype,
-    BTRIM(substring(pg_get_constraintdef(oid, true) from '\(.+\)'), '()') as consrc,
+    pg_catalog.BTRIM(substring(pg_catalog.pg_get_constraintdef(oid, true) from '\(.+\)'), '()') as consrc,
     connoinherit, convalidated, conislocal
 FROM
-    pg_constraint
+    pg_catalog.pg_constraint
 WHERE
     conrelid={{foid}}::oid
 ORDER by conname;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.2_plus/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.2_plus/acl.sql
index 154ff8a22..22afdb795 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.2_plus/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.2_plus/acl.sql
@@ -1,7 +1,7 @@
 SELECT
     COALESCE(gt.rolname, 'PUBLIC') AS grantee,
-    g.rolname AS grantor, array_agg(privilege_type) AS privileges,
-    array_agg(is_grantable) AS grantable
+    g.rolname AS grantor, pg_catalog.array_agg(privilege_type) AS privileges,
+    pg_catalog.array_agg(is_grantable) AS grantable
 FROM
     (SELECT
         d.grantee, d.grantor, d.is_grantable,
@@ -26,7 +26,7 @@ FROM
             (d).is_grantable AS is_grantable,
             (d).privilege_type AS privilege_type
         FROM
-            (SELECT aclexplode(db.relacl) AS d FROM pg_class db
+            (SELECT pg_catalog.aclexplode(db.relacl) AS d FROM pg_catalog.pg_class db
             WHERE db.oid = {{foid}}::OID) a ORDER BY privilege_type
         ) d
     ) d
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.2_plus/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.2_plus/delete.sql
index 5bb09691a..39a11c95a 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.2_plus/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.2_plus/delete.sql
@@ -2,9 +2,9 @@
 SELECT
     c.relname AS name, nspname as basensp
 FROM
-    pg_class c
+    pg_catalog.pg_class c
 LEFT OUTER JOIN
-    pg_namespace nsp ON (nsp.oid=c.relnamespace)
+    pg_catalog.pg_namespace nsp ON (nsp.oid=c.relnamespace)
 WHERE
     c.relnamespace = {{scid}}::oid
 AND
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.2_plus/get_collations.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.2_plus/get_collations.sql
index 9922b00fa..9656bb033 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.2_plus/get_collations.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.2_plus/get_collations.sql
@@ -1,9 +1,9 @@
 SELECT --nspname, collname,
     CASE WHEN length(nspname::text) > 0 AND length(collname::text) > 0  THEN
-    concat(nspname, '."', collname,'"')
+    pg_catalog.concat(nspname, '."', collname,'"')
     ELSE '' END AS copy_collation
 FROM
-    pg_collation c, pg_namespace n
+    pg_catalog.pg_collation c, pg_catalog.pg_namespace n
 WHERE
     c.collnamespace=n.oid
 ORDER BY nspname, collname;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.2_plus/get_columns.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.2_plus/get_columns.sql
index 2dcb481e5..202302056 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.2_plus/get_columns.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.2_plus/get_columns.sql
@@ -1,24 +1,24 @@
 SELECT
-    attname, attndims, atttypmod, attoptions, attfdwoptions, format_type(t.oid,NULL) AS datatype,
+    attname, attndims, atttypmod, attoptions, attfdwoptions, pg_catalog.format_type(t.oid,NULL) AS datatype,
     attnotnull, attstattarget, attnum, format_type(t.oid, att.atttypmod) AS fulltype,
     CASE WHEN length(cn.nspname::text) > 0 AND length(cl.collname::text) > 0 THEN
     concat(cn.nspname, '."', cl.collname,'"') ELSE '' END AS collname,
-    (SELECT COUNT(1) from pg_type t2 WHERE t2.typname=t.typname) > 1 AS isdup,
+    (SELECT COUNT(1) from pg_catalog.pg_type t2 WHERE t2.typname=t.typname) > 1 AS isdup,
     pg_catalog.pg_get_expr(def.adbin, def.adrelid) AS typdefault
 FROM
-    pg_attribute att
+    pg_catalog.pg_attribute att
 JOIN
-    pg_type t ON t.oid=atttypid
+    pg_catalog.pg_type t ON t.oid=atttypid
 JOIN
-    pg_namespace nsp ON t.typnamespace=nsp.oid
+    pg_catalog.pg_namespace nsp ON t.typnamespace=nsp.oid
 LEFT OUTER JOIN
-    pg_attrdef def ON adrelid=att.attrelid AND adnum=att.attnum
+    pg_catalog.pg_attrdef def ON adrelid=att.attrelid AND adnum=att.attnum
 LEFT OUTER JOIN
-    pg_type b ON t.typelem=b.oid
+    pg_catalog.pg_type b ON t.typelem=b.oid
 LEFT OUTER JOIN
-    pg_collation cl ON att.attcollation=cl.oid
+    pg_catalog.pg_collation cl ON att.attcollation=cl.oid
 LEFT OUTER JOIN
-    pg_namespace cn ON cl.collnamespace=cn.oid
+    pg_catalog.pg_namespace cn ON cl.collnamespace=cn.oid
 WHERE
     att.attrelid={{foid}}::oid
     AND attnum>0
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.2_plus/get_constraints.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.2_plus/get_constraints.sql
index 43a8298b3..4d4c2c04f 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.2_plus/get_constraints.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.2_plus/get_constraints.sql
@@ -1,7 +1,7 @@
 SELECT
     conname, contype, consrc, conislocal
 FROM
-    pg_constraint
+    pg_catalog.pg_constraint
 WHERE
     conrelid={{foid}}::oid
 ORDER by conname;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.2_plus/get_foreign_servers.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.2_plus/get_foreign_servers.sql
index 1c95ce58d..0964591df 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.2_plus/get_foreign_servers.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.2_plus/get_foreign_servers.sql
@@ -1,6 +1,6 @@
 SELECT
     srvname
 FROM
-    pg_foreign_server
+    pg_catalog.pg_foreign_server
 ORDER BY
     srvname;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.2_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.2_plus/properties.sql
index b2ef81d3a..92e823b73 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.2_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.2_plus/properties.sql
@@ -1,24 +1,24 @@
 SELECT
-    c.oid, c.relname AS name, c.relacl, pg_get_userbyid(relowner) AS owner,
+    c.oid, c.relname AS name, c.relacl, pg_catalog.pg_get_userbyid(relowner) AS owner,
     ftoptions, srvname AS ftsrvname, description, nspname as basensp, consrc,
     (SELECT
-        array_agg(provider || '=' || label)
+        pg_catalog.array_agg(provider || '=' || label)
     FROM
-        pg_seclabel sl1
+        pg_catalog.pg_seclabel sl1
     WHERE
         sl1.objoid=c.oid) AS seclabels
 FROM
-    pg_class c
+    pg_catalog.pg_class c
 JOIN
-    pg_foreign_table ft ON c.oid=ft.ftrelid
+    pg_catalog.pg_foreign_table ft ON c.oid=ft.ftrelid
 LEFT OUTER JOIN
-    pg_foreign_server fs ON ft.ftserver=fs.oid
+    pg_catalog.pg_foreign_server fs ON ft.ftserver=fs.oid
 LEFT OUTER JOIN
-    pg_description des ON (des.objoid=c.oid AND des.classoid='pg_class'::regclass)
+    pg_catalog.pg_description des ON (des.objoid=c.oid AND des.classoid='pg_class'::regclass)
 LEFT OUTER JOIN
-    pg_namespace nsp ON (nsp.oid=c.relnamespace)
+    pg_catalog.pg_namespace nsp ON (nsp.oid=c.relnamespace)
 LEFT OUTER JOIN
-    pg_constraint cn ON (cn.conrelid=c.oid)
+    pg_catalog.pg_constraint cn ON (cn.conrelid=c.oid)
 WHERE
     c.relnamespace = {{scid}}::oid
     {% if foid %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.5_plus/get_columns.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.5_plus/get_columns.sql
index 7ac3153c8..41d77f969 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.5_plus/get_columns.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.5_plus/get_columns.sql
@@ -1,42 +1,42 @@
 WITH INH_TABLES AS
     (SELECT
      distinct on (at.attname) attname, ph.inhparent AS inheritedid, ph.inhseqno,
-     concat(nmsp_parent.nspname, '.',parent.relname ) AS inheritedfrom
+     pg_catalog.concat(nmsp_parent.nspname, '.',parent.relname ) AS inheritedfrom
     FROM
-        pg_attribute at
+        pg_catalog.pg_attribute at
     JOIN
-        pg_inherits ph ON ph.inhparent = at.attrelid AND ph.inhrelid = {{foid}}::oid
+        pg_catalog.pg_inherits ph ON ph.inhparent = at.attrelid AND ph.inhrelid = {{foid}}::oid
     JOIN
-        pg_class parent ON ph.inhparent  = parent.oid
+        pg_catalog.pg_class parent ON ph.inhparent  = parent.oid
     JOIN
-        pg_namespace nmsp_parent ON nmsp_parent.oid  = parent.relnamespace
+        pg_catalog.pg_namespace nmsp_parent ON nmsp_parent.oid  = parent.relnamespace
     GROUP BY at.attname, ph.inhparent, ph.inhseqno, inheritedfrom
     ORDER BY at.attname, ph.inhparent, ph.inhseqno, inheritedfrom
     )
 SELECT INH.inheritedfrom, INH.inheritedid, att.attoptions, attfdwoptions,
-    att.attname, att.attndims, att.atttypmod, format_type(t.oid,NULL) AS datatype,
-    att.attnotnull, att.attstattarget, att.attnum, format_type(t.oid, att.atttypmod) AS fulltype,
+    att.attname, att.attndims, att.atttypmod, pg_catalog.format_type(t.oid,NULL) AS datatype,
+    att.attnotnull, att.attstattarget, att.attnum, pg_catalog.format_type(t.oid, att.atttypmod) AS fulltype,
     CASE WHEN length(cn.nspname::text) > 0 AND length(cl.collname::text) > 0 THEN
-    concat(cn.nspname, '."', cl.collname,'"')
+    pg_catalog.concat(cn.nspname, '."', cl.collname,'"')
     ELSE '' END AS collname,
     pg_catalog.pg_get_expr(def.adbin, def.adrelid) AS typdefault,
     (SELECT COUNT(1) from pg_type t2 WHERE t2.typname=t.typname) > 1 AS isdup
 FROM
-    pg_attribute att
+    pg_catalog.pg_attribute att
 LEFT JOIN
     INH_TABLES as INH ON att.attname = INH.attname
 JOIN
-    pg_type t ON t.oid=atttypid
+    pg_catalog.pg_type t ON t.oid=atttypid
 JOIN
-    pg_namespace nsp ON t.typnamespace=nsp.oid
+    pg_catalog.pg_namespace nsp ON t.typnamespace=nsp.oid
 LEFT OUTER JOIN
-    pg_attrdef def ON adrelid=att.attrelid AND adnum=att.attnum
+    pg_catalog.pg_attrdef def ON adrelid=att.attrelid AND adnum=att.attnum
 LEFT OUTER JOIN
-    pg_type b ON t.typelem=b.oid
+    pg_catalog.pg_type b ON t.typelem=b.oid
 LEFT OUTER JOIN
-    pg_collation cl ON att.attcollation=cl.oid
+    pg_catalog.pg_collation cl ON att.attcollation=cl.oid
 LEFT OUTER JOIN
-    pg_namespace cn ON cl.collnamespace=cn.oid
+    pg_catalog.pg_namespace cn ON cl.collnamespace=cn.oid
 WHERE
     att.attrelid={{foid}}::oid
     AND att.attnum>0
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.5_plus/get_constraints.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.5_plus/get_constraints.sql
index f8333dcec..4a21fcfe3 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.5_plus/get_constraints.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.5_plus/get_constraints.sql
@@ -1,7 +1,7 @@
 SELECT
     oid as conoid, conname, contype, consrc, connoinherit, convalidated, conislocal
 FROM
-    pg_constraint
+    pg_catalog.pg_constraint
 WHERE
     conrelid={{foid}}::oid
 ORDER by conname;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.5_plus/get_foreign_servers.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.5_plus/get_foreign_servers.sql
index 717bdd3c2..0e56aa7a2 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.5_plus/get_foreign_servers.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.5_plus/get_foreign_servers.sql
@@ -1,6 +1,6 @@
 SELECT
     srvname
 FROM
-    pg_foreign_server
+    pg_catalog.pg_foreign_server
 ORDER
     BY srvname;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.5_plus/get_table_columns.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.5_plus/get_table_columns.sql
index e1882db6c..9415a6ef3 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.5_plus/get_table_columns.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.5_plus/get_table_columns.sql
@@ -1,14 +1,14 @@
 {% if attrelid  %}
 SELECT
-    a.attname, format_type(a.atttypid, NULL) AS datatype,
+    a.attname, pg_catalog.format_type(a.atttypid, NULL) AS datatype,
     quote_ident(n.nspname)||'.'||quote_ident(c.relname) as inheritedfrom,
     c.oid as inheritedid
 FROM
-    pg_class c
+    pg_catalog.pg_class c
 JOIN
-    pg_namespace n ON c.relnamespace=n.oid
+    pg_catalog.pg_namespace n ON c.relnamespace=n.oid
 JOIN
-    pg_attribute a ON a.attrelid = c.oid AND NOT a.attisdropped AND a.attnum>0
+    pg_catalog.pg_attribute a ON a.attrelid = c.oid AND NOT a.attisdropped AND a.attnum>0
 WHERE
     c.oid = {{attrelid}}::OID
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.5_plus/get_tables.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.5_plus/get_tables.sql
index d35a5312b..9f73aeeba 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.5_plus/get_tables.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.5_plus/get_tables.sql
@@ -1,9 +1,9 @@
 {% import 'foreign_tables/sql/macros/db_catalogs.macro' as CATALOG %}
 {% if attrelid  %}
 SELECT
-    array_agg(quote_ident(n.nspname) || '.' || quote_ident(c.relname)) as inherits
+    pg_catalog.array_agg(quote_ident(n.nspname) || '.' || quote_ident(c.relname)) as inherits
 FROM
-    pg_class c, pg_namespace n
+    pg_catalog.pg_class c, pg_catalog.pg_namespace n
 WHERE
     c.relnamespace=n.oid AND c.relkind IN ('r', 'f')
     AND c.oid in {{attrelid}};
@@ -12,7 +12,7 @@ WHERE
 SELECT
     c.oid AS value, quote_ident(n.nspname) || '.' || quote_ident(c.relname) as label
 FROM
-    pg_class c, pg_namespace n
+    pg_catalog.pg_class c, pg_catalog.pg_namespace n
 WHERE
     c.relnamespace=n.oid AND c.relkind IN ('r', 'f')
 {% if not show_system_objects %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.5_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.5_plus/properties.sql
index 586c42aa2..c9e1499c1 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.5_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.5_plus/properties.sql
@@ -1,10 +1,10 @@
 SELECT
-    c.oid, c.relname AS name, c.relacl, pg_get_userbyid(relowner) AS owner,
+    c.oid, c.relname AS name, c.relacl, pg_catalog.pg_get_userbyid(relowner) AS owner,
     ftoptions, srvname AS ftsrvname, description, nspname AS basensp,
     (SELECT
         array_agg(provider || '=' || label)
     FROM
-        pg_seclabel sl1
+        pg_catalog.pg_seclabel sl1
     WHERE
         sl1.objoid=c.oid) AS seclabels
     {% if foid %},
@@ -14,15 +14,15 @@ SELECT
         i.inhrelid = {{foid}}::oid GROUP BY i.inhrelid) AS inherits
     {% endif %}
 FROM
-    pg_class c
+    pg_catalog.pg_class c
 JOIN
-    pg_foreign_table ft ON c.oid=ft.ftrelid
+    pg_catalog.pg_foreign_table ft ON c.oid=ft.ftrelid
 LEFT OUTER JOIN
-    pg_foreign_server fs ON ft.ftserver=fs.oid
+    pg_catalog.pg_foreign_server fs ON ft.ftserver=fs.oid
 LEFT OUTER JOIN
-    pg_description des ON (des.objoid=c.oid AND des.classoid='pg_class'::regclass)
+    pg_catalog.pg_description des ON (des.objoid=c.oid AND des.classoid='pg_class'::regclass)
 LEFT OUTER JOIN
-    pg_namespace nsp ON (nsp.oid=c.relnamespace)
+    pg_catalog.pg_namespace nsp ON (nsp.oid=c.relnamespace)
 WHERE
     c.relnamespace = {{scid}}::oid
     {% if foid %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/delete.sql
index 6243e0585..78a97dfdc 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/delete.sql
@@ -2,9 +2,9 @@
 SELECT
     c.relname AS name, nspname as basensp
 FROM
-    pg_class c
+    pg_catalog.pg_class c
 LEFT OUTER JOIN
-    pg_namespace nsp ON (nsp.oid=c.relnamespace)
+    pg_catalog.pg_namespace nsp ON (nsp.oid=c.relnamespace)
 WHERE
     c.relnamespace = {{scid}}::oid
     AND c.oid = {{foid}}::oid;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/get_collations.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/get_collations.sql
index 06aa54fe6..8d85159b3 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/get_collations.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/get_collations.sql
@@ -1,9 +1,9 @@
 SELECT --nspname, collname,
     CASE WHEN length(nspname::text) > 0 AND length(collname::text) > 0  THEN
-    concat(nspname, '."', collname,'"')
+    pg_catalog.concat(nspname, '."', collname,'"')
     ELSE '' END AS copy_collation
 FROM
-    pg_collation c, pg_namespace n
+    pg_catalog.pg_collation c, pg_namespace n
 WHERE
     c.collnamespace=n.oid
 ORDER BY
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/get_columns.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/get_columns.sql
index 0733a3c9f..493fbad5d 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/get_columns.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/get_columns.sql
@@ -1,15 +1,15 @@
 SELECT
-    attname, attndims, atttypmod, format_type(t.oid,NULL) AS datatype,
-    format_type(t.oid, att.atttypmod) AS fulltype, attnotnull, attnum,
-    (SELECT COUNT(1) from pg_type t2 WHERE t2.typname=t.typname) > 1 AS isdup
+    attname, attndims, atttypmod, pg_catalog.format_type(t.oid,NULL) AS datatype,
+    pg_catalog.format_type(t.oid, att.atttypmod) AS fulltype, attnotnull, attnum,
+    (SELECT COUNT(1) from pg_catalog.pg_type t2 WHERE t2.typname=t.typname) > 1 AS isdup
 FROM
-    pg_attribute att
+    pg_catalog.pg_attribute att
 JOIN
-    pg_type t ON t.oid=atttypid
+    pg_catalog.pg_type t ON t.oid=atttypid
 JOIN
-    pg_namespace nsp ON t.typnamespace=nsp.oid
+    pg_catalog.pg_namespace nsp ON t.typnamespace=nsp.oid
 LEFT OUTER JOIN
-    pg_type b ON t.typelem=b.oid
+    pg_catalog.pg_type b ON t.typelem=b.oid
 WHERE
     att.attrelid={{foid}}::oid
     AND attnum>0
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/get_constraints.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/get_constraints.sql
index fc9354942..0ab546d7f 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/get_constraints.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/get_constraints.sql
@@ -1,7 +1,7 @@
 SELECT
     conname, contype, consrc
 FROM
-    pg_constraint
+    pg_catalog.pg_constraint
 WHERE
     conrelid={{foid}}::oid
 ORDER by conname;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/get_foreign_servers.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/get_foreign_servers.sql
index 1980f02c1..6ce5a2962 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/get_foreign_servers.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/get_foreign_servers.sql
@@ -1,5 +1,5 @@
 SELECT
     srvname
 FROM
-    pg_foreign_server
+    pg_catalog.pg_foreign_server
 ORDER BY srvname;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/get_oid.sql
index 9a5f5d1c2..38c01d2ce 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/get_oid.sql
@@ -2,9 +2,9 @@
 SELECT
     c.oid, bn.oid as scid
 FROM
-    pg_class c
+    pg_catalog.pg_class c
 JOIN
-    pg_namespace bn ON bn.oid=c.relnamespace
+    pg_catalog.pg_namespace bn ON bn.oid=c.relnamespace
 WHERE
     bn.nspname = {{ basensp|qtLiteral }}
     AND c.relname={{ name|qtLiteral }};
@@ -13,7 +13,7 @@ WHERE
 SELECT
     c.relnamespace as scid
 FROM
-    pg_class c
+    pg_catalog.pg_class c
 WHERE
     c.oid = {{foid}}::oid;
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/node.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/node.sql
index 86f466020..72019f2c2 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/node.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/node.sql
@@ -1,14 +1,14 @@
 SELECT
-    c.oid, c.relname AS name, pg_get_userbyid(relowner) AS owner,
+    c.oid, c.relname AS name, pg_catalog.pg_get_userbyid(relowner) AS owner,
     ftoptions, nspname as basensp, description
 FROM
-    pg_class c
+    pg_catalog.pg_class c
 JOIN
-    pg_foreign_table ft ON c.oid=ft.ftrelid
+    pg_catalog.pg_foreign_table ft ON c.oid=ft.ftrelid
 LEFT OUTER JOIN
-    pg_namespace nsp ON (nsp.oid=c.relnamespace)
+    pg_catalog.pg_namespace nsp ON (nsp.oid=c.relnamespace)
 LEFT OUTER JOIN
-    pg_description des ON (des.objoid=c.oid AND des.classoid='pg_class'::regclass)
+    pg_catalog.pg_description des ON (des.objoid=c.oid AND des.classoid='pg_class'::regclass)
 WHERE
 {% if scid %}
     c.relnamespace = {{scid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/properties.sql
index 25abc1b34..c2686f7fc 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/properties.sql
@@ -1,22 +1,22 @@
 SELECT
-    c.oid, c.relname AS name, pg_get_userbyid(relowner) AS owner,
+    c.oid, c.relname AS name, pg_catalog.pg_get_userbyid(relowner) AS owner,
     ftoptions, srvname AS ftsrvname, description, nspname as basensp,
     (SELECT
-        array_agg(provider || '=' || label)
+        pg_catalog.array_agg(provider || '=' || label)
     FROM
-        pg_seclabel sl1
+        pg_catalog.pg_seclabel sl1
     WHERE
         sl1.objoid=c.oid) AS seclabels
 FROM
-    pg_class c
+    pg_catalog.pg_class c
 JOIN
-    pg_foreign_table ft ON c.oid=ft.ftrelid
+    pg_catalog.pg_foreign_table ft ON c.oid=ft.ftrelid
 LEFT OUTER JOIN
-    pg_foreign_server fs ON ft.ftserver=fs.oid
+    pg_catalog.pg_foreign_server fs ON ft.ftserver=fs.oid
 LEFT OUTER JOIN
-    pg_description des ON (des.objoid=c.oid AND des.classoid='pg_class'::regclass)
+    pg_catalog.pg_description des ON (des.objoid=c.oid AND des.classoid='pg_class'::regclass)
 LEFT OUTER JOIN
-    pg_namespace nsp ON (nsp.oid=c.relnamespace)
+    pg_catalog.pg_namespace nsp ON (nsp.oid=c.relnamespace)
 WHERE
     c.relnamespace = {{scid}}::oid
     {% if foid %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/types_condition.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/types_condition.sql
index 8e1d70817..5dfa67320 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/types_condition.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/types_condition.sql
@@ -1,14 +1,14 @@
 {% import 'foreign_tables/sql/macros/db_catalogs.macro' as CATALOG %}
 typisdefined AND typtype IN ('b', 'c', 'd', 'e', 'r')
 AND NOT EXISTS (
-    SELECT 1 FROM pg_class
+    SELECT 1 FROM pg_catalog.pg_class
     WHERE relnamespace=typnamespace
         AND relname = typname AND relkind != 'c')
     AND (typname NOT LIKE '_%' OR NOT EXISTS (
-    SELECT 1 FROM pg_class
+    SELECT 1 FROM pg_catalog.pg_class
     WHERE relnamespace=typnamespace
         AND relname = substring(typname FROM 2)::name
         AND relkind != 'c'))
 {% if not show_system_objects %}
  {{ CATALOG.VALID_TYPE_CATALOGS(server_type) }}
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configurations/sql/default/copy_config.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configurations/sql/default/copy_config.sql
index 584fc00a7..3ac7f0cf5 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configurations/sql/default/copy_config.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configurations/sql/default/copy_config.sql
@@ -6,10 +6,10 @@ SELECT
     nspname,
     n.oid as schemaoid
 FROM
-    pg_ts_config cfg
-    JOIN pg_namespace n
+    pg_catalog.pg_ts_config cfg
+    JOIN pg_catalog.pg_namespace n
     ON n.oid=cfgnamespace
 ORDER BY
     nspname,
     cfgname
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configurations/sql/default/dictionaries.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configurations/sql/default/dictionaries.sql
index 944a8a013..3d1f93bd6 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configurations/sql/default/dictionaries.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configurations/sql/default/dictionaries.sql
@@ -1,8 +1,8 @@
 {# FETCH DICTIONARIES statement #}
 SELECT
 	CASE WHEN (pg_ns.nspname != 'pg_catalog') THEN
-        CONCAT(pg_ns.nspname, '.', pg_td.dictname)
+        pg_catalog.CONCAT(pg_ns.nspname, '.', pg_td.dictname)
     ELSE pg_td.dictname END AS dictname
-FROM pg_ts_dict pg_td
-LEFT OUTER JOIN pg_namespace pg_ns
+FROM pg_catalog.pg_ts_dict pg_td
+LEFT OUTER JOIN pg_catalog.pg_namespace pg_ns
 ON pg_td.dictnamespace = pg_ns.oid;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configurations/sql/default/get_name.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configurations/sql/default/get_name.sql
index 7238b8ca2..2298f7793 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configurations/sql/default/get_name.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configurations/sql/default/get_name.sql
@@ -6,12 +6,12 @@ SELECT
     SELECT
         nspname
     FROM
-        pg_namespace
+        pg_catalog.pg_namespace
     WHERE
         oid = cfg.cfgnamespace
     ) as schema
 FROM
-    pg_ts_config cfg
+    pg_catalog.pg_ts_config cfg
 WHERE
     cfg.oid = {{cfgid}}::OID;
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configurations/sql/default/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configurations/sql/default/nodes.sql
index ec50acb9e..60f73e27e 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configurations/sql/default/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configurations/sql/default/nodes.sql
@@ -2,7 +2,7 @@
 SELECT
     oid, cfgname as name
 FROM
-    pg_ts_config cfg
+    pg_catalog.pg_ts_config cfg
 WHERE
 {% if scid %}
     cfg.cfgnamespace = {{scid}}::OID
@@ -10,4 +10,4 @@ WHERE
     cfg.oid = {{cfgid}}::OID
 {% endif %}
 
-ORDER BY name
\ No newline at end of file
+ORDER BY name
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configurations/sql/default/parser.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configurations/sql/default/parser.sql
index cbca9c924..b9cb1c1f9 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configurations/sql/default/parser.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configurations/sql/default/parser.sql
@@ -3,7 +3,7 @@
 SELECT
     cfgparser
 FROM
-    pg_ts_config
+    pg_catalog.pg_ts_config
 where
     oid = {{cfgid}}::OID
 {% endif %}
@@ -16,8 +16,8 @@ SELECT
     nspname,
     n.oid as schemaoid
 FROM
-    pg_ts_parser
-    JOIN pg_namespace n
+    pg_catalog.pg_ts_parser
+    JOIN pg_catalog.pg_namespace n
     ON n.oid=prsnamespace
 ORDER BY
     prsname;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configurations/sql/default/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configurations/sql/default/properties.sql
index 1a95adf80..d7dd0a6ba 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configurations/sql/default/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configurations/sql/default/properties.sql
@@ -2,21 +2,21 @@
 SELECT
     cfg.oid,
     cfg.cfgname as name,
-    pg_get_userbyid(cfg.cfgowner) as owner,
+    pg_catalog.pg_get_userbyid(cfg.cfgowner) as owner,
     cfg.cfgparser as parser,
     cfg.cfgnamespace as schema,
     CASE WHEN (np.nspname not in ('public', 'pg_catalog') AND length(parser.prsname::text) > 0
     AND parser.prsname != 'default') THEN
-        concat(quote_ident(np.nspname), '.', quote_ident(parser.prsname))
+        pg_catalog.concat(quote_ident(np.nspname), '.', quote_ident(parser.prsname))
     ELSE parser.prsname END AS prsname,
     description
 FROM
-    pg_ts_config cfg
-    LEFT OUTER JOIN pg_ts_parser parser
+    pg_catalog.pg_ts_config cfg
+    LEFT OUTER JOIN pg_catalog.pg_ts_parser parser
     ON parser.oid=cfg.cfgparser
-    LEFT OUTER JOIN pg_description des
+    LEFT OUTER JOIN pg_catalog.pg_description des
     ON (des.objoid=cfg.oid AND des.classoid='pg_ts_config'::regclass)
-    LEFT OUTER JOIN pg_namespace np ON np.oid=parser.prsnamespace
+    LEFT OUTER JOIN pg_catalog.pg_namespace np ON np.oid=parser.prsnamespace
 WHERE
 {% if scid %}
     cfg.cfgnamespace = {{scid}}::OID
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configurations/sql/default/schema.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configurations/sql/default/schema.sql
index b56ceb83e..fbbc98630 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configurations/sql/default/schema.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configurations/sql/default/schema.sql
@@ -3,7 +3,7 @@
 SELECT
     nspname
 FROM
-    pg_namespace
+    pg_catalog.pg_namespace
 WHERE
     oid = {{data.schema}}::OID
 
@@ -11,9 +11,9 @@ WHERE
 SELECT
     nspname
 FROM
-    pg_namespace nsp
-    LEFT JOIN pg_ts_config cfg
+    pg_catalog.pg_namespace nsp
+    LEFT JOIN pg_catalog.pg_ts_config cfg
     ON cfg.cfgnamespace = nsp.oid
 WHERE
     cfg.oid = {{data.id}}::OID
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configurations/sql/default/sql.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configurations/sql/default/sql.sql
index 06d5af3fc..64bb6b9b2 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configurations/sql/default/sql.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configurations/sql/default/sql.sql
@@ -1,7 +1,7 @@
 {# REVERSED ENGINEERED SQL FOR FTS CONFIGURATION #}
 {% if cfgid and scid %}
 SELECT
-    array_to_string(array_agg(sql), E'\n\n') as sql
+    pg_catalog.array_to_string(array_agg(sql), E'\n\n') as sql
 FROM
     (
     SELECT
@@ -21,19 +21,19 @@ FROM
             ELSE ''
         END || E'\n' ||
 
-        array_to_string(
+        pg_catalog.array_to_string(
          array(
 	        SELECT
 	            'ALTER TEXT SEARCH CONFIGURATION ' || quote_ident(b.nspname) ||
 	            E'.' || quote_ident(cfg.cfgname) || ' ADD MAPPING FOR ' ||
 	            t.alias  || ' WITH ' ||
-                array_to_string(array_agg(
+                pg_catalog.array_to_string(array_agg(
                     CASE WHEN (pg_ns.nspname != 'pg_catalog') THEN
-                        CONCAT(pg_ns.nspname, '.', dict.dictname)
+                        pg_catalog.CONCAT(pg_ns.nspname, '.', dict.dictname)
                     ELSE
                         dict.dictname END), ', ') || ';'
             FROM
-                pg_ts_config_map map
+                pg_catalog.pg_ts_config_map map
                 LEFT JOIN (
                           SELECT
                               tokid,
@@ -41,21 +41,21 @@ FROM
                           FROM
                               pg_catalog.ts_token_type(cfg.cfgparser)
                           ) t ON (t.tokid = map.maptokentype)
-                LEFT OUTER JOIN pg_ts_dict dict ON (map.mapdict = dict.oid)
-                LEFT OUTER JOIN pg_namespace pg_ns ON (pg_ns.oid = dict.dictnamespace)
+                LEFT OUTER JOIN pg_catalog.pg_ts_dict dict ON (map.mapdict = dict.oid)
+                LEFT OUTER JOIN pg_catalog.pg_namespace pg_ns ON (pg_ns.oid = dict.dictnamespace)
             WHERE
                 map.mapcfg = cfg.oid
             GROUP BY t.alias
             ORDER BY t.alias)
         , E'\n') as sql
     FROM
-        pg_ts_config cfg
+        pg_catalog.pg_ts_config cfg
     LEFT JOIN (
         SELECT
             des.description as description,
             des.objoid as descoid
         FROM
-            pg_description des
+            pg_catalog.pg_description des
         WHERE
             des.objoid={{cfgid}}::OID AND des.classoid='pg_ts_config'::regclass
     ) a ON (a.descoid = cfg.oid)
@@ -64,7 +64,7 @@ FROM
             nspname,
             nsp.oid as noid
         FROM
-            pg_namespace nsp
+            pg_catalog.pg_namespace nsp
         WHERE
             oid = {{scid}}::OID
     ) b ON (b.noid = cfg.cfgnamespace)
@@ -73,7 +73,7 @@ FROM
             prs.prsname as parsername,
             prs.oid as oid
         FROM
-            pg_ts_parser prs
+            pg_catalog.pg_ts_parser prs
     )c ON (c.oid = cfg.cfgparser)
     WHERE
        cfg.oid={{cfgid}}::OID
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configurations/sql/default/tokenDictList.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configurations/sql/default/tokenDictList.sql
index 7c52ce61f..c2f5449c2 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configurations/sql/default/tokenDictList.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configurations/sql/default/tokenDictList.sql
@@ -9,16 +9,16 @@ SELECT
     WHERE
         t.tokid = maptokentype
     ) AS token,
-    array_agg(
+    pg_catalog.array_agg(
         CASE WHEN (pg_ns.nspname != 'pg_catalog') THEN
             CONCAT(pg_ns.nspname, '.', pg_ts_dict.dictname)
         ELSE
-            pg_ts_dict.dictname END) AS dictname
+            pg_catalog.pg_ts_dict.dictname END) AS dictname
 FROM
-    pg_ts_config_map
-    LEFT OUTER JOIN pg_ts_config ON mapcfg = pg_ts_config.oid
-    LEFT OUTER JOIN pg_ts_dict ON mapdict = pg_ts_dict.oid
-    LEFT OUTER JOIN pg_namespace pg_ns ON pg_ns.oid = pg_ts_dict.dictnamespace
+    pg_catalog.pg_ts_config_map
+    LEFT OUTER JOIN pg_catalog.pg_ts_config ON mapcfg = pg_ts_config.oid
+    LEFT OUTER JOIN pg_catalog.pg_ts_dict ON mapdict = pg_ts_dict.oid
+    LEFT OUTER JOIN pg_catalog.pg_namespace pg_ns ON pg_ns.oid = pg_ts_dict.dictnamespace
 WHERE
     mapcfg={{cfgid}}::OID
 GROUP BY
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configurations/sql/default/tokens.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configurations/sql/default/tokens.sql
index ce0c5eba4..216ec58ac 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configurations/sql/default/tokens.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configurations/sql/default/tokens.sql
@@ -4,7 +4,7 @@
 SELECT
     alias
 FROM
-    ts_token_type({{parseroid}}::OID)
+    pg_catalog.ts_token_type({{parseroid}}::OID)
 ORDER BY
     alias
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionaries/sql/default/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionaries/sql/default/delete.sql
index c344a7d9b..e144fb18a 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionaries/sql/default/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionaries/sql/default/delete.sql
@@ -6,12 +6,12 @@ SELECT
     SELECT
         nspname
     FROM
-        pg_namespace
+        pg_catalog.pg_namespace
     WHERE
         oid = dict.dictnamespace
     ) as schema
 FROM
-    pg_ts_dict dict LEFT OUTER JOIN pg_description des
+    pg_catalog.pg_ts_dict dict LEFT OUTER JOIN pg_catalog.pg_description des
     ON (des.objoid=dict.oid AND des.classoid='pg_ts_dict'::regclass)
 WHERE
     dict.oid = {{dcid}}::OID;
@@ -20,4 +20,4 @@ WHERE
 {# DROP FTS DICTIOANRY Statement #}
 {% if schema and name %}
 DROP TEXT SEARCH DICTIONARY {{conn|qtIdent(schema)}}.{{conn|qtIdent(name)}} {% if cascade %}CASCADE{%endif%};
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionaries/sql/default/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionaries/sql/default/nodes.sql
index 24ac22a74..4864faac2 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionaries/sql/default/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionaries/sql/default/nodes.sql
@@ -3,7 +3,7 @@ SELECT
     oid, dictname as name,
     dictnamespace as schema
 FROM
-    pg_ts_dict dict
+    pg_catalog.pg_ts_dict dict
 WHERE
 {% if scid %}
     dict.dictnamespace = {{scid}}::OID
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionaries/sql/default/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionaries/sql/default/properties.sql
index 6e0d2df7a..66f119bc6 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionaries/sql/default/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionaries/sql/default/properties.sql
@@ -2,16 +2,16 @@
 SELECT
     dict.oid,
     dict.dictname as name,
-    pg_get_userbyid(dict.dictowner) as owner,
+    pg_catalog.pg_get_userbyid(dict.dictowner) as owner,
     t.tmplname as template,
-    (SELECT nspname FROM pg_namespace n WHERE n.oid = t.tmplnamespace) as template_schema,
+    (SELECT nspname FROM pg_catalog.pg_namespace n WHERE n.oid = t.tmplnamespace) as template_schema,
     dict.dictinitoption as options,
     dict.dictnamespace as schema,
     des.description
 FROM
-    pg_ts_dict dict
-    LEFT OUTER JOIN pg_ts_template t ON t.oid=dict.dicttemplate
-    LEFT OUTER JOIN pg_description des ON (des.objoid=dict.oid AND des.classoid='pg_ts_dict'::regclass)
+    pg_catalog.pg_ts_dict dict
+    LEFT OUTER JOIN pg_catalog.pg_ts_template t ON t.oid=dict.dicttemplate
+    LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=dict.oid AND des.classoid='pg_ts_dict'::regclass)
 WHERE
 {% if scid %}
     dict.dictnamespace = {{scid}}::OID
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionaries/sql/default/schema.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionaries/sql/default/schema.sql
index 2a38e7f91..8a7b35713 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionaries/sql/default/schema.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionaries/sql/default/schema.sql
@@ -3,7 +3,7 @@
 SELECT
     nspname
 FROM
-    pg_namespace
+    pg_catalog.pg_namespace
 WHERE
     oid = {{data.schema}}::OID
 
@@ -11,9 +11,9 @@ WHERE
 SELECT
     nspname
 FROM
-    pg_namespace nsp
-    LEFT JOIN pg_ts_dict dict
+    pg_catalog.pg_namespace nsp
+    LEFT JOIN pg_catalog.pg_ts_dict dict
     ON dict.dictnamespace = nsp.oid
 WHERE
     dict.oid = {{data.id}}::OID
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionaries/sql/default/templates.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionaries/sql/default/templates.sql
index d3270ba01..04233c3f1 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionaries/sql/default/templates.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionaries/sql/default/templates.sql
@@ -5,7 +5,7 @@ SELECT
     nspname,
     n.oid as schemaoid
 FROM
-    pg_ts_template JOIN pg_namespace n ON n.oid=tmplnamespace
+    pg_catalog.pg_ts_template JOIN pg_catalog.pg_namespace n ON n.oid=tmplnamespace
 ORDER BY
     tmplname
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parsers/templates/fts_parsers/sql/default/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parsers/templates/fts_parsers/sql/default/delete.sql
index 2faa71d4f..2a65f29ca 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parsers/templates/fts_parsers/sql/default/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parsers/templates/fts_parsers/sql/default/delete.sql
@@ -6,12 +6,12 @@ SELECT
         SELECT
             nspname
         FROM
-            pg_namespace
+            pg_catalog.pg_namespace
         WHERE
             oid = p.prsnamespace
     ) as schema
 FROM
-    pg_ts_parser p LEFT JOIN pg_description d
+    pg_catalog.pg_ts_parser p LEFT JOIN pg_catalog.pg_description d
     ON d.objoid=p.oid AND d.classoid='pg_ts_parser'::regclass
 WHERE
     p.oid = {{pid}}::OID;
@@ -20,4 +20,4 @@ WHERE
 {# DROP FTS PARSER Statement #}
 {% if schema and name %}
 DROP TEXT SEARCH PARSER {{conn|qtIdent(schema)}}.{{conn|qtIdent(name)}} {% if cascade %}CASCADE{%endif%};
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parsers/templates/fts_parsers/sql/default/functions.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parsers/templates/fts_parsers/sql/default/functions.sql
index 959779000..2c3c6a523 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parsers/templates/fts_parsers/sql/default/functions.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parsers/templates/fts_parsers/sql/default/functions.sql
@@ -3,7 +3,7 @@
 SELECT
     proname, nspname
 FROM
-    pg_proc JOIN pg_namespace n ON n.oid=pronamespace
+    pg_catalog.pg_proc JOIN pg_catalog.pg_namespace n ON n.oid=pronamespace
 WHERE
     proargtypes='2281 23'
 ORDER BY proname;
@@ -14,7 +14,7 @@ ORDER BY proname;
 SELECT
     proname, nspname
 FROM
-    pg_proc JOIN pg_namespace n ON n.oid=pronamespace
+    pg_catalog.pg_proc JOIN pg_catalog.pg_namespace n ON n.oid=pronamespace
 WHERE
     proargtypes='2281 2281 2281'
 ORDER BY
@@ -26,7 +26,7 @@ ORDER BY
 SELECT
     proname, nspname
 FROM
-    pg_proc JOIN pg_namespace n ON n.oid=pronamespace
+    pg_catalog.pg_proc JOIN pg_catalog.pg_namespace n ON n.oid=pronamespace
 WHERE
     prorettype=2278 and proargtypes='2281'
 ORDER BY
@@ -38,7 +38,7 @@ ORDER BY
 SELECT
     proname, nspname
 FROM
-    pg_proc JOIN pg_namespace n ON n.oid=pronamespace
+    pg_catalog.pg_proc JOIN pg_catalog.pg_namespace n ON n.oid=pronamespace
 WHERE
     prorettype=2281 and proargtypes='2281'
 ORDER BY
@@ -50,7 +50,7 @@ ORDER BY
 SELECT
     proname, nspname
 FROM
-    pg_proc JOIN pg_namespace n ON n.oid=pronamespace
+    pg_catalog.pg_proc JOIN pg_catalog.pg_namespace n ON n.oid=pronamespace
 WHERE
     proargtypes='2281 2281 3615'
 ORDER BY
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parsers/templates/fts_parsers/sql/default/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parsers/templates/fts_parsers/sql/default/nodes.sql
index d8502bbb6..4bf279475 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parsers/templates/fts_parsers/sql/default/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parsers/templates/fts_parsers/sql/default/nodes.sql
@@ -2,7 +2,7 @@
 SELECT
     oid, prsname as name, prs.prsnamespace AS schema
 FROM
-    pg_ts_parser prs
+    pg_catalog.pg_ts_parser prs
 WHERE
 {% if scid %}
     prs.prsnamespace = {{scid}}::OID
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parsers/templates/fts_parsers/sql/default/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parsers/templates/fts_parsers/sql/default/properties.sql
index 7d701b29f..82cd22570 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parsers/templates/fts_parsers/sql/default/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parsers/templates/fts_parsers/sql/default/properties.sql
@@ -10,8 +10,8 @@ SELECT
     description,
     prs.prsnamespace AS schema
 FROM
-    pg_ts_parser prs
-    LEFT OUTER JOIN pg_description des
+    pg_catalog.pg_ts_parser prs
+    LEFT OUTER JOIN pg_catalog.pg_description des
 ON
     (
     des.objoid=prs.oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parsers/templates/fts_parsers/sql/default/schema.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parsers/templates/fts_parsers/sql/default/schema.sql
index 29ddaba7a..880efa95e 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parsers/templates/fts_parsers/sql/default/schema.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parsers/templates/fts_parsers/sql/default/schema.sql
@@ -3,7 +3,7 @@
 SELECT
     nspname
 FROM
-    pg_namespace
+    pg_catalog.pg_namespace
 WHERE
     oid = {{data.schema}}::OID
 
@@ -11,9 +11,9 @@ WHERE
 SELECT
     nspname
 FROM
-    pg_namespace nsp
-    LEFT JOIN pg_ts_parser prs
+    pg_catalog.pg_namespace nsp
+    LEFT JOIN pg_catalog.pg_ts_parser prs
     ON prs.prsnamespace = nsp.oid
 WHERE
     prs.oid = {{data.id}}::OID
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parsers/templates/fts_parsers/sql/default/sql.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parsers/templates/fts_parsers/sql/default/sql.sql
index 8004b67ab..85fc82588 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parsers/templates/fts_parsers/sql/default/sql.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parsers/templates/fts_parsers/sql/default/sql.sql
@@ -1,13 +1,13 @@
 {# Reverse engineered sql for FTS PARSER #}
 {% if pid and scid %}
 SELECT
-    array_to_string(array_agg(sql), E'\n\n') as sql
+    pg_catalog.array_to_string(array_agg(sql), E'\n\n') as sql
 FROM
     (
     SELECT
-        E'-- Text Search Parser: ' || quote_ident(nspname) || E'.' || prs.prsname ||
-        E'\n\n-- DROP TEXT SEARCH PARSER ' || quote_ident(nspname) || E'.' || quote_ident(prs.prsname) ||
-        E'\n\nCREATE TEXT SEARCH PARSER ' || quote_ident(nspname) || E'.' || quote_ident(prs.prsname) || E' (\n' ||
+        E'-- Text Search Parser: ' || pg_catalog.quote_ident(nspname) || E'.' || prs.prsname ||
+        E'\n\n-- DROP TEXT SEARCH PARSER ' || pg_catalog.quote_ident(nspname) || E'.' || pg_catalog.quote_ident(prs.prsname) ||
+        E'\n\nCREATE TEXT SEARCH PARSER ' || pg_catalog.quote_ident(nspname) || E'.' || pg_catalog.quote_ident(prs.prsname) || E' (\n' ||
         E'    START = ' || prs.prsstart || E',\n' ||
         E'    GETTOKEN = ' || prs.prstoken || E',\n' ||
         E'    END = ' || prs.prsend || E',\n' ||
@@ -17,17 +17,17 @@ FROM
             ELSE '' END || E'\n);' ||
         CASE
             WHEN description IS NOT NULL THEN
-                E'\n\nCOMMENT ON TEXT SEARCH PARSER ' || quote_ident(nspname) || E'.' || quote_ident(prs.prsname) ||
+                E'\n\nCOMMENT ON TEXT SEARCH PARSER ' || pg_catalog.quote_ident(nspname) || E'.' || pg_catalog.quote_ident(prs.prsname) ||
                 E' IS ' || pg_catalog.quote_literal(description) || E';'
             ELSE ''  END as sql
     FROM
-        pg_ts_parser prs
+        pg_catalog.pg_ts_parser prs
     LEFT JOIN (
         SELECT
             des.description as description,
             des.objoid as descoid
         FROM
-            pg_description des
+            pg_catalog.pg_description des
         WHERE
             des.objoid={{pid}}::OID AND des.classoid='pg_ts_parser'::regclass
     ) a ON (a.descoid = prs.oid)
@@ -36,7 +36,7 @@ FROM
             nspname,
             nsp.oid as noid
         FROM
-            pg_namespace nsp
+            pg_catalog.pg_namespace nsp
         WHERE
             oid = {{scid}}::OID
     ) b ON (b.noid = prs.prsnamespace)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_templates/sql/default/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_templates/sql/default/delete.sql
index cca8dc448..fb311931b 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_templates/sql/default/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_templates/sql/default/delete.sql
@@ -6,12 +6,12 @@ SELECT
     SELECT
         nspname
     FROM
-        pg_namespace
+        pg_catalog.pg_namespace
     WHERE
         oid = t.tmplnamespace
     ) as schema
 FROM
-    pg_ts_template t LEFT JOIN pg_description d
+    pg_catalog.pg_ts_template t LEFT JOIN pg_catalog.pg_description d
     ON d.objoid=t.oid AND d.classoid='pg_ts_template'::regclass
 WHERE
     t.oid = {{tid}}::OID;
@@ -20,4 +20,4 @@ WHERE
 {# DROP TEXT SEARCH TEMPLATE Statement #}
 {% if schema and name %}
 DROP TEXT SEARCH TEMPLATE {{conn|qtIdent(schema)}}.{{conn|qtIdent(name)}} {% if cascade %}CASCADE{%endif%};
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_templates/sql/default/functions.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_templates/sql/default/functions.sql
index 2fe9e0299..c2098ae08 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_templates/sql/default/functions.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_templates/sql/default/functions.sql
@@ -3,7 +3,7 @@
 SELECT
     proname, nspname
 FROM
-    pg_proc JOIN pg_namespace n ON n.oid=pronamespace
+    pg_catalog.pg_proc JOIN pg_catalog.pg_namespace n ON n.oid=pronamespace
 WHERE
     prorettype=2281
     AND proargtypes='2281 2281 2281 2281'
@@ -15,7 +15,7 @@ ORDER BY proname;
 SELECT
     proname, nspname
 FROM
-    pg_proc JOIN pg_namespace n ON n.oid=pronamespace
+    pg_catalog.pg_proc JOIN pg_catalog.pg_namespace n ON n.oid=pronamespace
 WHERE
     prorettype=2281 and proargtypes='2281'
 ORDER BY
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_templates/sql/default/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_templates/sql/default/nodes.sql
index 528c226ea..7efa726ec 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_templates/sql/default/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_templates/sql/default/nodes.sql
@@ -1,7 +1,7 @@
 SELECT
     oid, tmplname as name, tmpl.tmplnamespace AS schema
 FROM
-    pg_ts_template tmpl
+    pg_catalog.pg_ts_template tmpl
 WHERE
 {% if scid %}
     tmpl.tmplnamespace = {{scid}}::OID
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_templates/sql/default/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_templates/sql/default/properties.sql
index 563f36a4e..0e9cd7bb2 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_templates/sql/default/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_templates/sql/default/properties.sql
@@ -7,8 +7,8 @@ SELECT
     description,
     tmpl.tmplnamespace AS schema
 FROM
-    pg_ts_template tmpl
-    LEFT OUTER JOIN pg_description des
+    pg_catalog.pg_ts_template tmpl
+    LEFT OUTER JOIN pg_catalog.pg_description des
 ON
     (
     des.objoid=tmpl.oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_templates/sql/default/schema.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_templates/sql/default/schema.sql
index bf7ddb3a8..21d6f4df9 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_templates/sql/default/schema.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_templates/sql/default/schema.sql
@@ -3,7 +3,7 @@
 SELECT
     nspname
 FROM
-    pg_namespace
+    pg_catalog.pg_namespace
 WHERE
     oid = {{data.schema}}::OID
 
@@ -11,9 +11,9 @@ WHERE
 SELECT
     nspname
 FROM
-    pg_namespace nsp
-    LEFT JOIN pg_ts_template ts
+    pg_catalog.pg_namespace nsp
+    LEFT JOIN pg_catalog.pg_ts_template ts
     ON ts.tmplnamespace = nsp.oid
 WHERE
     ts.oid = {{data.id}}::OID
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_templates/sql/default/sql.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_templates/sql/default/sql.sql
index 787ad11ea..e06cc141c 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_templates/sql/default/sql.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_templates/sql/default/sql.sql
@@ -1,29 +1,29 @@
 {# Reverse engineered sql for FTS TEMPLATE #}
 SELECT
-    array_to_string(array_agg(sql), E'\n\n') as sql
+    pg_catalog.array_to_string(array_agg(sql), E'\n\n') as sql
 FROM
     (
     SELECT
-        E'-- Text Search Template: ' || quote_ident(nspname) || E'.' || tmpl.tmplname ||
-        E'\n\n-- DROP TEXT SEARCH TEMPLATE ' || quote_ident(nspname) || E'.' || quote_ident(tmpl.tmplname) ||
-        E'\n\nCREATE TEXT SEARCH TEMPLATE ' || quote_ident(nspname) || E'.' || quote_ident(tmpl.tmplname) || E' (\n' ||
+        E'-- Text Search Template: ' || pg_catalog.quote_ident(nspname) || E'.' || tmpl.tmplname ||
+        E'\n\n-- DROP TEXT SEARCH TEMPLATE ' || pg_catalog.quote_ident(nspname) || E'.' || pg_catalog.quote_ident(tmpl.tmplname) ||
+        E'\n\nCREATE TEXT SEARCH TEMPLATE ' || pg_catalog.quote_ident(nspname) || E'.' || pg_catalog.quote_ident(tmpl.tmplname) || E' (\n' ||
         CASE
             WHEN tmpl.tmplinit != '-'::regclass THEN E'    INIT = ' || tmpl.tmplinit || E',\n'
             ELSE '' END ||
         E'    LEXIZE = ' || tmpl.tmpllexize || E'\n);' ||
         CASE
             WHEN a.description IS NOT NULL THEN
-                E'\n\nCOMMENT ON TEXT SEARCH TEMPLATE ' || quote_ident(nspname) || E'.' || quote_ident(tmpl.tmplname) ||
+                E'\n\nCOMMENT ON TEXT SEARCH TEMPLATE ' || pg_catalog.quote_ident(nspname) || E'.' || pg_catalog.quote_ident(tmpl.tmplname) ||
                 E' IS ' || pg_catalog.quote_literal(description) || E';'
             ELSE ''  END as sql
 FROM
-    pg_ts_template tmpl
+    pg_catalog.pg_ts_template tmpl
     LEFT JOIN (
         SELECT
             des.description as description,
             des.objoid as descoid
         FROM
-            pg_description des
+            pg_catalog.pg_description des
         WHERE
             des.objoid={{tid}}::OID AND des.classoid='pg_ts_template'::regclass
     ) a ON (a.descoid = tmpl.oid)
@@ -32,7 +32,7 @@ FROM
             nspname,
             nsp.oid as noid
         FROM
-            pg_namespace nsp
+            pg_catalog.pg_namespace nsp
         WHERE
             oid = {{scid}}::OID
     ) b ON (b.noid = tmpl.tmplnamespace)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/11_plus/coll_stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/11_plus/coll_stats.sql
index cc4f73410..c8c07e127 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/11_plus/coll_stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/11_plus/coll_stats.sql
@@ -4,15 +4,15 @@ SELECT
     total_time AS {{ conn|qtIdent(_('Total time')) }},
     self_time AS {{ conn|qtIdent(_('Self time')) }}
 FROM
-    pg_stat_user_functions
+    pg_catalog.pg_stat_user_functions
 WHERE
     schemaname = {{schema_name|qtLiteral}}
     AND funcid IN (
         SELECT p.oid
         FROM
-            pg_proc p
+            pg_catalog.pg_proc p
         JOIN
-            pg_type typ ON typ.oid=p.prorettype
+            pg_catalog.pg_type typ ON typ.oid=p.prorettype
         WHERE
             p.prokind IN ('f', 'w')
             AND typname NOT IN ('trigger', 'event_trigger')
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/11_plus/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/11_plus/delete.sql
index 540044c0a..b86e8329b 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/11_plus/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/11_plus/delete.sql
@@ -4,11 +4,11 @@ SELECT
     .pg_get_function_identity_arguments(pr.oid), '') || ')' as func_args,
     nspname
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_namespace nsp ON nsp.oid=pr.pronamespace
+    pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
 WHERE
     pr.prokind IN ('f', 'w')
     AND pronamespace = {{scid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/11_plus/get_definition.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/11_plus/get_definition.sql
index ab25dbf99..9a4988778 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/11_plus/get_definition.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/11_plus/get_definition.sql
@@ -1,14 +1,14 @@
 SELECT
-    pg_get_functiondef({{fnid}}::oid) AS func_def,
+    pg_catalog.pg_get_functiondef({{fnid}}::oid) AS func_def,
     COALESCE(pg_catalog.pg_get_function_identity_arguments(pr.oid), '') as
     func_with_identity_arguments,
     nspname,
     pr.proname as proname,
     COALESCE(pg_catalog.pg_get_function_arguments(pr.oid), '') as func_args
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_namespace nsp ON nsp.oid=pr.pronamespace
+    pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
 WHERE
     pr.prokind IN ('f', 'w')
     AND pronamespace = {{scid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/11_plus/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/11_plus/get_oid.sql
index 93a21079f..3d26cb9e8 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/11_plus/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/11_plus/get_oid.sql
@@ -1,15 +1,15 @@
 SELECT
     pr.oid, pr.proname || '(' || COALESCE(pg_catalog
     .pg_get_function_identity_arguments(pr.oid), '') || ')' as name,
-    lanname, pg_get_userbyid(proowner) as funcowner, pr.pronamespace as nsp
+    lanname, pg_catalog.pg_get_userbyid(proowner) as funcowner, pr.pronamespace as nsp
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 JOIN
-    pg_namespace nsp ON nsp.oid=pr.pronamespace
+    pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
     AND nsp.nspname={{ nspname|qtLiteral }}
 WHERE
     pr.prokind IN ('f', 'w')
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/11_plus/node.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/11_plus/node.sql
index 5dae8d12e..16110d664 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/11_plus/node.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/11_plus/node.sql
@@ -1,14 +1,14 @@
 SELECT
     pr.oid, pr.proname || '(' || COALESCE(pg_catalog.pg_get_function_identity_arguments(pr.oid), '') || ')' as name,
-    lanname, pg_get_userbyid(proowner) as funcowner, description
+    lanname, pg_catalog.pg_get_userbyid(proowner) as funcowner, description
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 LEFT OUTER JOIN
-    pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass)
+    pg_catalog.pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass)
 WHERE
    pr.prokind IN ('f', 'w')
 {% if fnid %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/11_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/11_plus/properties.sql
index 6b2cb2fa9..b8745c6a7 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/11_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/11_plus/properties.sql
@@ -4,26 +4,26 @@ SELECT
     pr.prosrc, pr.prosrc AS prosrc_c, pr.pronamespace, pr.prolang, pr.procost, pr.prorows, pr.prokind,
     pr.prosecdef, pr.proleakproof, pr.proisstrict, pr.proretset, pr.provolatile, pr.proparallel,
     pr.pronargs, pr.prorettype, pr.proallargtypes, pr.proargmodes, pr.probin, pr.proacl,
-    pr.proname, pr.proname AS name, pg_get_function_result(pr.oid) AS prorettypename,
-    typns.nspname AS typnsp, lanname, proargnames, oidvectortypes(proargtypes) AS proargtypenames,
-    pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
-    pr.pronargdefaults, proconfig, pg_get_userbyid(proowner) AS funcowner, description,
+    pr.proname, pr.proname AS name, pg_catalog.pg_get_function_result(pr.oid) AS prorettypename,
+    typns.nspname AS typnsp, lanname, proargnames, pg_catalog.oidvectortypes(proargtypes) AS proargtypenames,
+    pg_catalog.pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
+    pr.pronargdefaults, proconfig, pg_catalog.pg_get_userbyid(proowner) AS funcowner, description,
     (SELECT
-        array_agg(provider || '=' || label)
+        pg_catalog.array_agg(provider || '=' || label)
     FROM
-        pg_seclabel sl1
+        pg_catalog.pg_seclabel sl1
     WHERE
         sl1.objoid=pr.oid) AS seclabels
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_namespace typns ON typns.oid=typ.typnamespace
+    pg_catalog.pg_namespace typns ON typns.oid=typ.typnamespace
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 LEFT OUTER JOIN
-    pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass and des.objsubid = 0)
+    pg_catalog.pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass and des.objsubid = 0)
 WHERE
     pr.prokind IN ('f', 'w')
     AND typname NOT IN ('trigger', 'event_trigger')
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/12_plus/get_support_functions.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/12_plus/get_support_functions.sql
index 4ce65f596..7cc21ee03 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/12_plus/get_support_functions.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/12_plus/get_support_functions.sql
@@ -1,5 +1,5 @@
-SELECT quote_ident(nspname) || '.' || quote_ident(proname) AS sfunctions
-FROM pg_proc p, pg_namespace n, pg_language l
+SELECT pg_catalog.quote_ident(nspname) || '.' || pg_catalog.quote_ident(proname) AS sfunctions
+FROM pg_catalog.pg_proc p, pg_catalog.pg_namespace n, pg_catalog.pg_language l
 WHERE p.pronamespace = n.oid
 AND p.prolang = l.oid
 AND p.prorettype = 'internal'::regtype::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/12_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/12_plus/properties.sql
index 7d698267f..23d9e9544 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/12_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/12_plus/properties.sql
@@ -4,33 +4,33 @@ SELECT
     pr.prosrc, pr.prosrc AS prosrc_c, pr.pronamespace, pr.prolang, pr.procost, pr.prorows, pr.prokind,
     pr.prosecdef, pr.proleakproof, pr.proisstrict, pr.proretset, pr.provolatile, pr.proparallel,
     pr.pronargs, pr.prorettype, pr.proallargtypes, pr.proargmodes, pr.probin, pr.proacl,
-    pr.proname, pr.proname AS name, pg_get_function_result(pr.oid) AS prorettypename,
-    typns.nspname AS typnsp, lanname, proargnames, oidvectortypes(proargtypes) AS proargtypenames,
-    pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
-    pr.pronargdefaults, proconfig, pg_get_userbyid(proowner) AS funcowner, description,
+    pr.proname, pr.proname AS name, pg_catalog.pg_get_function_result(pr.oid) AS prorettypename,
+    typns.nspname AS typnsp, lanname, proargnames, pg_catalog.oidvectortypes(proargtypes) AS proargtypenames,
+    pg_catalog.pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
+    pr.pronargdefaults, proconfig, pg_catalog.pg_get_userbyid(proowner) AS funcowner, description,
     CASE WHEN prosupport = 0::oid THEN ''
     ELSE (
-        SELECT quote_ident(nspname) || '.' || quote_ident(proname) AS tfunctions
-          FROM pg_proc p, pg_namespace n
+        SELECT pg_catalog.quote_ident(nspname) || '.' || pg_catalog.quote_ident(proname) AS tfunctions
+          FROM pg_catalog.pg_proc p, pg_catalog.pg_namespace n
               WHERE p.pronamespace = n.oid
               AND p.oid = pr.prosupport::OID
     ) END AS prosupportfunc,
     (SELECT
-        array_agg(provider || '=' || label)
+        pg_catalog.array_agg(provider || '=' || label)
     FROM
-        pg_seclabel sl1
+        pg_catalog.pg_seclabel sl1
     WHERE
         sl1.objoid=pr.oid) AS seclabels
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_namespace typns ON typns.oid=typ.typnamespace
+    pg_catalog.pg_namespace typns ON typns.oid=typ.typnamespace
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 LEFT OUTER JOIN
-    pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass and des.objsubid = 0)
+    pg_catalog.pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass and des.objsubid = 0)
 WHERE
     pr.prokind IN ('f', 'w')
     AND typname NOT IN ('trigger', 'event_trigger')
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/9.2_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/9.2_plus/properties.sql
index ebed10505..ce707101f 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/9.2_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/9.2_plus/properties.sql
@@ -3,26 +3,26 @@ SELECT
     pr.pronamespace, pr.prolang, pr.procost, pr.prorows,
     pr.prosecdef, pr.proleakproof, pr.proisstrict, pr.proretset, pr.provolatile,
     pr.pronargs, pr.prorettype, pr.proallargtypes, pr.proargmodes, pr.probin, pr.proacl,
-    pr.proname, pr.proname AS name, pg_get_function_result(pr.oid) AS prorettypename,
-    typns.nspname AS typnsp, lanname, proargnames, oidvectortypes(proargtypes) AS proargtypenames,
-    pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
-    pr.pronargdefaults, proconfig, pg_get_userbyid(proowner) AS funcowner, description,
+    pr.proname, pr.proname AS name, pg_catalog.pg_get_function_result(pr.oid) AS prorettypename,
+    typns.nspname AS typnsp, lanname, proargnames, pg_catalog.oidvectortypes(proargtypes) AS proargtypenames,
+    pg_catalog.pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
+    pr.pronargdefaults, proconfig, pg_catalog.pg_get_userbyid(proowner) AS funcowner, description,
     (SELECT
-        array_agg(provider || '=' || label)
+        pg_catalog.array_agg(provider || '=' || label)
     FROM
-        pg_seclabel sl1
+        pg_catalog.pg_seclabel sl1
     WHERE
         sl1.objoid=pr.oid) AS seclabels
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_namespace typns ON typns.oid=typ.typnamespace
+    pg_catalog.pg_namespace typns ON typns.oid=typ.typnamespace
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 LEFT OUTER JOIN
-    pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass and des.objsubid = 0)
+    pg_catalog.pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass and des.objsubid = 0)
 WHERE
     proisagg = FALSE
     AND typname NOT IN ('trigger', 'event_trigger')
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/9.5_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/9.5_plus/properties.sql
index 9cc41721d..723bf9684 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/9.5_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/9.5_plus/properties.sql
@@ -3,26 +3,26 @@ SELECT
      pr.pronamespace, pr.prolang, pr.procost, pr.prorows,
     pr.prosecdef, pr.proleakproof, pr.proisstrict, pr.proretset, pr.provolatile,
     pr.pronargs, pr.prorettype, pr.proallargtypes, pr.proargmodes, pr.probin, pr.proacl,
-    pr.proname, pr.proname AS name, pg_get_function_result(pr.oid) AS prorettypename,
-    typns.nspname AS typnsp, lanname, proargnames, oidvectortypes(proargtypes) AS proargtypenames,
-    pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
-    pr.pronargdefaults, proconfig, pg_get_userbyid(proowner) AS funcowner, description,
+    pr.proname, pr.proname AS name, pg_catalog.pg_get_function_result(pr.oid) AS prorettypename,
+    typns.nspname AS typnsp, lanname, proargnames, pg_catalog.oidvectortypes(proargtypes) AS proargtypenames,
+    pg_catalog.pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
+    pr.pronargdefaults, proconfig, pg_catalog.pg_get_userbyid(proowner) AS funcowner, description,
     (SELECT
-        array_agg(provider || '=' || label)
+        pg_catalog.array_agg(provider || '=' || label)
     FROM
-        pg_seclabel sl1
+        pg_catalog.pg_seclabel sl1
     WHERE
         sl1.objoid=pr.oid) AS seclabels
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_namespace typns ON typns.oid=typ.typnamespace
+    pg_catalog.pg_namespace typns ON typns.oid=typ.typnamespace
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 LEFT OUTER JOIN
-    pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass and des.objsubid = 0)
+    pg_catalog.pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass and des.objsubid = 0)
 WHERE
     proisagg = FALSE
 {% if fnid %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/9.6_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/9.6_plus/properties.sql
index 489b6ead6..5c6883761 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/9.6_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/9.6_plus/properties.sql
@@ -3,26 +3,26 @@ SELECT
     pr.pronamespace, pr.prolang, pr.procost, pr.prorows,
     pr.prosecdef, pr.proleakproof, pr.proisstrict, pr.proretset, pr.provolatile, pr.proparallel,
     pr.pronargs, pr.prorettype, pr.proallargtypes, pr.proargmodes, pr.probin, pr.proacl,
-    pr.proname, pr.proname AS name, pg_get_function_result(pr.oid) AS prorettypename,
-    typns.nspname AS typnsp, lanname, proargnames, oidvectortypes(proargtypes) AS proargtypenames,
-    pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
-    pr.pronargdefaults, proconfig, pg_get_userbyid(proowner) AS funcowner, description,
+    pr.proname, pr.proname AS name, pg_catalog.pg_get_function_result(pr.oid) AS prorettypename,
+    typns.nspname AS typnsp, lanname, proargnames, pg_catalog.oidvectortypes(proargtypes) AS proargtypenames,
+    pg_catalog.pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
+    pr.pronargdefaults, proconfig, pg_catalog.pg_get_userbyid(proowner) AS funcowner, description,
     (SELECT
-        array_agg(provider || '=' || label)
+        pg_catalog.array_agg(provider || '=' || label)
     FROM
-        pg_seclabel sl1
+        pg_catalog.pg_seclabel sl1
     WHERE
         sl1.objoid=pr.oid) AS seclabels
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_namespace typns ON typns.oid=typ.typnamespace
+    pg_catalog.pg_namespace typns ON typns.oid=typ.typnamespace
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 LEFT OUTER JOIN
-    pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass and des.objsubid = 0)
+    pg_catalog.pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass and des.objsubid = 0)
 WHERE
     proisagg = FALSE
     AND typname NOT IN ('trigger', 'event_trigger')
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/acl.sql
index 822e53b7c..c30978e02 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/acl.sql
@@ -1,7 +1,7 @@
 SELECT
     COALESCE(gt.rolname, 'PUBLIC') AS grantee,
-    g.rolname AS grantor, array_agg(privilege_type) AS privileges,
-    array_agg(is_grantable) AS grantable
+    g.rolname AS grantor, pg_catalog.array_agg(privilege_type) AS privileges,
+    pg_catalog.array_agg(is_grantable) AS grantable
 FROM
     (SELECT
         d.grantee, d.grantor, d.is_grantable,
@@ -26,7 +26,7 @@ FROM
             (d).is_grantable AS is_grantable,
             (d).privilege_type AS privilege_type
         FROM
-            (SELECT aclexplode(db.proacl) AS d FROM pg_proc db
+            (SELECT pg_catalog.aclexplode(db.proacl) AS d FROM pg_catalog.pg_proc db
             WHERE db.oid = {{fnid}}::OID) a ORDER BY privilege_type
         ) d
     ) d
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/coll_stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/coll_stats.sql
index 86a0d7be8..5dc51c08a 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/coll_stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/coll_stats.sql
@@ -4,17 +4,17 @@ SELECT
     total_time AS {{ conn|qtIdent(_('Total time')) }},
     self_time AS {{ conn|qtIdent(_('Self time')) }}
 FROM
-    pg_stat_user_functions
+    pg_catalog.pg_stat_user_functions
 WHERE
     schemaname = {{schema_name|qtLiteral}}
     AND funcid IN (
         SELECT p.oid
         FROM
-            pg_proc p
+            pg_catalog.pg_proc p
         JOIN
-            pg_type typ ON typ.oid=p.prorettype
+            pg_catalog.pg_type typ ON typ.oid=p.prorettype
         WHERE
             p.proisagg = FALSE
             AND typname NOT IN ('trigger', 'event_trigger')
     )
-ORDER BY funcname;
\ No newline at end of file
+ORDER BY funcname;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/delete.sql
index 246bec12d..440e36e47 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/delete.sql
@@ -4,11 +4,11 @@ SELECT
     .pg_get_function_identity_arguments(pr.oid), '') || ')' as func_args,
     nspname
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_namespace nsp ON nsp.oid=pr.pronamespace
+    pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
 WHERE
     proisagg = FALSE
     AND pronamespace = {{scid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/get_definition.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/get_definition.sql
index 5e5baef9f..083e294f6 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/get_definition.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/get_definition.sql
@@ -1,14 +1,14 @@
 SELECT
-    pg_get_functiondef({{fnid}}::oid) AS func_def,
+    pg_catalog.pg_get_functiondef({{fnid}}::oid) AS func_def,
     COALESCE(pg_catalog.pg_get_function_identity_arguments(pr.oid), '') as
     func_with_identity_arguments,
     nspname,
     pr.proname as proname,
     COALESCE(pg_catalog.pg_get_function_arguments(pr.oid), '') as func_args
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_namespace nsp ON nsp.oid=pr.pronamespace
+    pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
 WHERE
     proisagg = FALSE
     AND pronamespace = {{scid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/get_languages.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/get_languages.sql
index f81ddfbda..2843741f4 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/get_languages.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/get_languages.sql
@@ -1,4 +1,4 @@
 SELECT
     lanname as label, lanname as value
 FROM
-    pg_language;
+    pg_catalog.pg_language;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/get_oid.sql
index 3bfc20a61..336195aeb 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/get_oid.sql
@@ -1,15 +1,15 @@
 SELECT
     pr.oid, pr.proname || '(' || COALESCE(pg_catalog
     .pg_get_function_identity_arguments(pr.oid), '') || ')' as name,
-    lanname, pg_get_userbyid(proowner) as funcowner, pr.pronamespace as nsp
+    lanname, pg_catalog.pg_get_userbyid(proowner) as funcowner, pr.pronamespace as nsp
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 JOIN
-    pg_namespace nsp ON nsp.oid=pr.pronamespace
+    pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
     AND nsp.nspname={{ nspname|qtLiteral }}
 WHERE
     proisagg = FALSE
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/get_out_types.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/get_out_types.sql
index 64a11875f..9ec158ecd 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/get_out_types.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/get_out_types.sql
@@ -1,6 +1,6 @@
 SELECT
-    format_type(oid, NULL) AS out_arg_type
+    pg_catalog.format_type(oid, NULL) AS out_arg_type
 FROM
-    pg_type
+    pg_catalog.pg_type
 WHERE
     oid = {{ out_arg_oid }}::oid;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/get_schema.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/get_schema.sql
index 127d4b9db..2d77757ea 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/get_schema.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/get_schema.sql
@@ -1,6 +1,6 @@
 SELECT
     nspname
 FROM
-    pg_namespace
+    pg_catalog.pg_namespace
 WHERE
     oid = {{ scid }}::oid;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/get_types.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/get_types.sql
index 2a5582ee9..ed340f529 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/get_types.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/get_types.sql
@@ -2,13 +2,13 @@ SELECT
     *
 FROM
     (SELECT
-        format_type(t.oid,NULL) AS typname,
+        pg_catalog.format_type(t.oid,NULL) AS typname,
         CASE WHEN typelem > 0 THEN typelem ELSE t.oid END as elemoid, typlen, typtype, t.oid, nspname,
-        (SELECT COUNT(1) FROM pg_type t2 WHERE t2.typname = t.typname) > 1 AS isdup
+        (SELECT COUNT(1) FROM pg_catalog.pg_type t2 WHERE t2.typname = t.typname) > 1 AS isdup
     FROM
-        pg_type t
+        pg_catalog.pg_type t
     JOIN
-        pg_namespace nsp ON typnamespace=nsp.oid
+        pg_catalog.pg_namespace nsp ON typnamespace=nsp.oid
     WHERE
         (NOT (typname = 'unknown' AND nspname = 'pg_catalog'))
     AND
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/node.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/node.sql
index 238e6a06c..fc01ee107 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/node.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/node.sql
@@ -1,14 +1,14 @@
 SELECT
     pr.oid, pr.proname || '(' || COALESCE(pg_catalog.pg_get_function_identity_arguments(pr.oid), '') || ')' as name,
-    lanname, pg_get_userbyid(proowner) as funcowner, description
+    lanname, pg_catalog.pg_get_userbyid(proowner) as funcowner, description
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 LEFT OUTER JOIN
-    pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass)
+    pg_catalog.pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass)
 WHERE
     proisagg = FALSE
 {% if fnid %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/properties.sql
index ebed10505..ce707101f 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/properties.sql
@@ -3,26 +3,26 @@ SELECT
     pr.pronamespace, pr.prolang, pr.procost, pr.prorows,
     pr.prosecdef, pr.proleakproof, pr.proisstrict, pr.proretset, pr.provolatile,
     pr.pronargs, pr.prorettype, pr.proallargtypes, pr.proargmodes, pr.probin, pr.proacl,
-    pr.proname, pr.proname AS name, pg_get_function_result(pr.oid) AS prorettypename,
-    typns.nspname AS typnsp, lanname, proargnames, oidvectortypes(proargtypes) AS proargtypenames,
-    pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
-    pr.pronargdefaults, proconfig, pg_get_userbyid(proowner) AS funcowner, description,
+    pr.proname, pr.proname AS name, pg_catalog.pg_get_function_result(pr.oid) AS prorettypename,
+    typns.nspname AS typnsp, lanname, proargnames, pg_catalog.oidvectortypes(proargtypes) AS proargtypenames,
+    pg_catalog.pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
+    pr.pronargdefaults, proconfig, pg_catalog.pg_get_userbyid(proowner) AS funcowner, description,
     (SELECT
-        array_agg(provider || '=' || label)
+        pg_catalog.array_agg(provider || '=' || label)
     FROM
-        pg_seclabel sl1
+        pg_catalog.pg_seclabel sl1
     WHERE
         sl1.objoid=pr.oid) AS seclabels
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_namespace typns ON typns.oid=typ.typnamespace
+    pg_catalog.pg_namespace typns ON typns.oid=typ.typnamespace
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 LEFT OUTER JOIN
-    pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass and des.objsubid = 0)
+    pg_catalog.pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass and des.objsubid = 0)
 WHERE
     proisagg = FALSE
     AND typname NOT IN ('trigger', 'event_trigger')
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/stats.sql
index 2e276b65a..e4b99e467 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/stats.sql
@@ -3,6 +3,6 @@ SELECT
     total_time AS {{ conn|qtIdent(_('Total time')) }},
     self_time AS {{ conn|qtIdent(_('Self time')) }}
 FROM
-    pg_stat_user_functions
+    pg_catalog.pg_stat_user_functions
 WHERE
     funcid = {{fnid}}::OID
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/variables.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/variables.sql
index 5233c71ec..c75e5b47f 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/variables.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/default/variables.sql
@@ -1,6 +1,6 @@
 SELECT
     name, vartype, min_val, max_val, enumvals
 FROM
-    pg_settings
+    pg_catalog.pg_settings
 WHERE
     context in ('user', 'superuser');
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/11_plus/coll_stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/11_plus/coll_stats.sql
index cc4f73410..c8c07e127 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/11_plus/coll_stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/11_plus/coll_stats.sql
@@ -4,15 +4,15 @@ SELECT
     total_time AS {{ conn|qtIdent(_('Total time')) }},
     self_time AS {{ conn|qtIdent(_('Self time')) }}
 FROM
-    pg_stat_user_functions
+    pg_catalog.pg_stat_user_functions
 WHERE
     schemaname = {{schema_name|qtLiteral}}
     AND funcid IN (
         SELECT p.oid
         FROM
-            pg_proc p
+            pg_catalog.pg_proc p
         JOIN
-            pg_type typ ON typ.oid=p.prorettype
+            pg_catalog.pg_type typ ON typ.oid=p.prorettype
         WHERE
             p.prokind IN ('f', 'w')
             AND typname NOT IN ('trigger', 'event_trigger')
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/11_plus/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/11_plus/delete.sql
index 8a9a4ccbf..8e943b406 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/11_plus/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/11_plus/delete.sql
@@ -4,11 +4,11 @@ SELECT
     .pg_get_function_identity_arguments(pr.oid), '') || ')' as func_args,
     nspname
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_namespace nsp ON nsp.oid=pr.pronamespace
+    pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
 WHERE
     pr.prokind IN ('f', 'w')
     AND pronamespace = {{scid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/11_plus/get_definition.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/11_plus/get_definition.sql
index ab25dbf99..9a4988778 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/11_plus/get_definition.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/11_plus/get_definition.sql
@@ -1,14 +1,14 @@
 SELECT
-    pg_get_functiondef({{fnid}}::oid) AS func_def,
+    pg_catalog.pg_get_functiondef({{fnid}}::oid) AS func_def,
     COALESCE(pg_catalog.pg_get_function_identity_arguments(pr.oid), '') as
     func_with_identity_arguments,
     nspname,
     pr.proname as proname,
     COALESCE(pg_catalog.pg_get_function_arguments(pr.oid), '') as func_args
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_namespace nsp ON nsp.oid=pr.pronamespace
+    pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
 WHERE
     pr.prokind IN ('f', 'w')
     AND pronamespace = {{scid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/11_plus/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/11_plus/get_oid.sql
index 93a21079f..3d26cb9e8 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/11_plus/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/11_plus/get_oid.sql
@@ -1,15 +1,15 @@
 SELECT
     pr.oid, pr.proname || '(' || COALESCE(pg_catalog
     .pg_get_function_identity_arguments(pr.oid), '') || ')' as name,
-    lanname, pg_get_userbyid(proowner) as funcowner, pr.pronamespace as nsp
+    lanname, pg_catalog.pg_get_userbyid(proowner) as funcowner, pr.pronamespace as nsp
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 JOIN
-    pg_namespace nsp ON nsp.oid=pr.pronamespace
+    pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
     AND nsp.nspname={{ nspname|qtLiteral }}
 WHERE
     pr.prokind IN ('f', 'w')
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/11_plus/node.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/11_plus/node.sql
index baedbef83..1150b814e 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/11_plus/node.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/11_plus/node.sql
@@ -1,14 +1,14 @@
 SELECT
     pr.oid, pr.proname || '(' || COALESCE(pg_catalog.pg_get_function_identity_arguments(pr.oid), '') || ')' AS name,
-    lanname, pg_get_userbyid(proowner) AS funcowner, description
+    lanname, pg_catalog.pg_get_userbyid(proowner) AS funcowner, description
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 LEFT OUTER JOIN
-    pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass)
+    pg_catalog.pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass)
 WHERE
     pr.prokind IN ('f', 'w')
     AND pr.protype = '0'::char
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/11_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/11_plus/properties.sql
index 6b2cb2fa9..b8745c6a7 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/11_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/11_plus/properties.sql
@@ -4,26 +4,26 @@ SELECT
     pr.prosrc, pr.prosrc AS prosrc_c, pr.pronamespace, pr.prolang, pr.procost, pr.prorows, pr.prokind,
     pr.prosecdef, pr.proleakproof, pr.proisstrict, pr.proretset, pr.provolatile, pr.proparallel,
     pr.pronargs, pr.prorettype, pr.proallargtypes, pr.proargmodes, pr.probin, pr.proacl,
-    pr.proname, pr.proname AS name, pg_get_function_result(pr.oid) AS prorettypename,
-    typns.nspname AS typnsp, lanname, proargnames, oidvectortypes(proargtypes) AS proargtypenames,
-    pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
-    pr.pronargdefaults, proconfig, pg_get_userbyid(proowner) AS funcowner, description,
+    pr.proname, pr.proname AS name, pg_catalog.pg_get_function_result(pr.oid) AS prorettypename,
+    typns.nspname AS typnsp, lanname, proargnames, pg_catalog.oidvectortypes(proargtypes) AS proargtypenames,
+    pg_catalog.pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
+    pr.pronargdefaults, proconfig, pg_catalog.pg_get_userbyid(proowner) AS funcowner, description,
     (SELECT
-        array_agg(provider || '=' || label)
+        pg_catalog.array_agg(provider || '=' || label)
     FROM
-        pg_seclabel sl1
+        pg_catalog.pg_seclabel sl1
     WHERE
         sl1.objoid=pr.oid) AS seclabels
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_namespace typns ON typns.oid=typ.typnamespace
+    pg_catalog.pg_namespace typns ON typns.oid=typ.typnamespace
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 LEFT OUTER JOIN
-    pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass and des.objsubid = 0)
+    pg_catalog.pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass and des.objsubid = 0)
 WHERE
     pr.prokind IN ('f', 'w')
     AND typname NOT IN ('trigger', 'event_trigger')
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/12_plus/get_support_functions.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/12_plus/get_support_functions.sql
index 4ce65f596..7cc21ee03 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/12_plus/get_support_functions.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/12_plus/get_support_functions.sql
@@ -1,5 +1,5 @@
-SELECT quote_ident(nspname) || '.' || quote_ident(proname) AS sfunctions
-FROM pg_proc p, pg_namespace n, pg_language l
+SELECT pg_catalog.quote_ident(nspname) || '.' || pg_catalog.quote_ident(proname) AS sfunctions
+FROM pg_catalog.pg_proc p, pg_catalog.pg_namespace n, pg_catalog.pg_language l
 WHERE p.pronamespace = n.oid
 AND p.prolang = l.oid
 AND p.prorettype = 'internal'::regtype::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/12_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/12_plus/properties.sql
index 9eac4807d..920ea8fb0 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/12_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/12_plus/properties.sql
@@ -4,27 +4,27 @@ SELECT
     pr.prosrc, pr.prosrc AS prosrc_c, pr.pronamespace, pr.prolang, pr.procost, pr.prorows, pr.prokind,
     pr.prosecdef, pr.proleakproof, pr.proisstrict, pr.proretset, pr.provolatile, pr.proparallel,
     pr.pronargs, pr.prorettype, pr.proallargtypes, pr.proargmodes, pr.probin, pr.proacl,
-    pr.proname, pr.proname AS name, pg_get_function_result(pr.oid) AS prorettypename,
-    typns.nspname AS typnsp, lanname, proargnames, oidvectortypes(proargtypes) AS proargtypenames,
-    pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
-    pr.pronargdefaults, proconfig, pg_get_userbyid(proowner) AS funcowner, description,
+    pr.proname, pr.proname AS name, pg_catalog.pg_get_function_result(pr.oid) AS prorettypename,
+    typns.nspname AS typnsp, lanname, proargnames, pg_catalog.oidvectortypes(proargtypes) AS proargtypenames,
+    pg_catalog.pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
+    pr.pronargdefaults, proconfig, pg_catalog.pg_get_userbyid(proowner) AS funcowner, description,
     CASE WHEN prosupport = 0::oid THEN '' ELSE prosupport::text END AS prosupportfunc,
     (SELECT
-        array_agg(provider || '=' || label)
+        pg_catalog.array_agg(provider || '=' || label)
     FROM
-        pg_seclabel sl1
+        pg_catalog.pg_seclabel sl1
     WHERE
         sl1.objoid=pr.oid) AS seclabels
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_namespace typns ON typns.oid=typ.typnamespace
+    pg_catalog.pg_namespace typns ON typns.oid=typ.typnamespace
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 LEFT OUTER JOIN
-    pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass and des.objsubid = 0)
+    pg_catalog.pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass and des.objsubid = 0)
 WHERE
     pr.prokind IN ('f', 'w')
     AND typname NOT IN ('trigger', 'event_trigger')
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/9.2_plus/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/9.2_plus/delete.sql
index c24970c69..df58941b2 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/9.2_plus/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/9.2_plus/delete.sql
@@ -4,11 +4,11 @@ SELECT
     .pg_get_function_identity_arguments(pr.oid), '') || ')' as func_args,
     nspname
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_namespace nsp ON nsp.oid=pr.pronamespace
+    pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
 WHERE
     proisagg = FALSE
     AND pronamespace = {{scid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/9.2_plus/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/9.2_plus/get_oid.sql
index 253db08b2..39c785f39 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/9.2_plus/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/9.2_plus/get_oid.sql
@@ -1,15 +1,15 @@
 SELECT
     pr.oid, pr.proname || '(' || COALESCE(pg_catalog
     .pg_get_function_identity_arguments(pr.oid), '') || ')' as name,
-    lanname, pg_get_userbyid(proowner) as funcowner, pr.pronamespace AS nsp
+    lanname, pg_catalog.pg_get_userbyid(proowner) as funcowner, pr.pronamespace AS nsp
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 JOIN
-    pg_namespace nsp ON nsp.oid=pr.pronamespace
+    pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
     AND nsp.nspname={{ nspname|qtLiteral }}
 WHERE
     proisagg = FALSE
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/9.5_plus/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/9.5_plus/delete.sql
index 246bec12d..440e36e47 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/9.5_plus/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/9.5_plus/delete.sql
@@ -4,11 +4,11 @@ SELECT
     .pg_get_function_identity_arguments(pr.oid), '') || ')' as func_args,
     nspname
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_namespace nsp ON nsp.oid=pr.pronamespace
+    pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
 WHERE
     proisagg = FALSE
     AND pronamespace = {{scid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/9.6_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/9.6_plus/properties.sql
index 489b6ead6..5c6883761 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/9.6_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/9.6_plus/properties.sql
@@ -3,26 +3,26 @@ SELECT
     pr.pronamespace, pr.prolang, pr.procost, pr.prorows,
     pr.prosecdef, pr.proleakproof, pr.proisstrict, pr.proretset, pr.provolatile, pr.proparallel,
     pr.pronargs, pr.prorettype, pr.proallargtypes, pr.proargmodes, pr.probin, pr.proacl,
-    pr.proname, pr.proname AS name, pg_get_function_result(pr.oid) AS prorettypename,
-    typns.nspname AS typnsp, lanname, proargnames, oidvectortypes(proargtypes) AS proargtypenames,
-    pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
-    pr.pronargdefaults, proconfig, pg_get_userbyid(proowner) AS funcowner, description,
+    pr.proname, pr.proname AS name, pg_catalog.pg_get_function_result(pr.oid) AS prorettypename,
+    typns.nspname AS typnsp, lanname, proargnames, pg_catalog.oidvectortypes(proargtypes) AS proargtypenames,
+    pg_catalog.pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
+    pr.pronargdefaults, proconfig, pg_catalog.pg_get_userbyid(proowner) AS funcowner, description,
     (SELECT
-        array_agg(provider || '=' || label)
+        pg_catalog.array_agg(provider || '=' || label)
     FROM
-        pg_seclabel sl1
+        pg_catalog.pg_seclabel sl1
     WHERE
         sl1.objoid=pr.oid) AS seclabels
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_namespace typns ON typns.oid=typ.typnamespace
+    pg_catalog.pg_namespace typns ON typns.oid=typ.typnamespace
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 LEFT OUTER JOIN
-    pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass and des.objsubid = 0)
+    pg_catalog.pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass and des.objsubid = 0)
 WHERE
     proisagg = FALSE
     AND typname NOT IN ('trigger', 'event_trigger')
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/acl.sql
index 822e53b7c..c30978e02 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/acl.sql
@@ -1,7 +1,7 @@
 SELECT
     COALESCE(gt.rolname, 'PUBLIC') AS grantee,
-    g.rolname AS grantor, array_agg(privilege_type) AS privileges,
-    array_agg(is_grantable) AS grantable
+    g.rolname AS grantor, pg_catalog.array_agg(privilege_type) AS privileges,
+    pg_catalog.array_agg(is_grantable) AS grantable
 FROM
     (SELECT
         d.grantee, d.grantor, d.is_grantable,
@@ -26,7 +26,7 @@ FROM
             (d).is_grantable AS is_grantable,
             (d).privilege_type AS privilege_type
         FROM
-            (SELECT aclexplode(db.proacl) AS d FROM pg_proc db
+            (SELECT pg_catalog.aclexplode(db.proacl) AS d FROM pg_catalog.pg_proc db
             WHERE db.oid = {{fnid}}::OID) a ORDER BY privilege_type
         ) d
     ) d
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/coll_stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/coll_stats.sql
index 86a0d7be8..5dc51c08a 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/coll_stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/coll_stats.sql
@@ -4,17 +4,17 @@ SELECT
     total_time AS {{ conn|qtIdent(_('Total time')) }},
     self_time AS {{ conn|qtIdent(_('Self time')) }}
 FROM
-    pg_stat_user_functions
+    pg_catalog.pg_stat_user_functions
 WHERE
     schemaname = {{schema_name|qtLiteral}}
     AND funcid IN (
         SELECT p.oid
         FROM
-            pg_proc p
+            pg_catalog.pg_proc p
         JOIN
-            pg_type typ ON typ.oid=p.prorettype
+            pg_catalog.pg_type typ ON typ.oid=p.prorettype
         WHERE
             p.proisagg = FALSE
             AND typname NOT IN ('trigger', 'event_trigger')
     )
-ORDER BY funcname;
\ No newline at end of file
+ORDER BY funcname;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/delete.sql
index 246bec12d..440e36e47 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/delete.sql
@@ -4,11 +4,11 @@ SELECT
     .pg_get_function_identity_arguments(pr.oid), '') || ')' as func_args,
     nspname
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_namespace nsp ON nsp.oid=pr.pronamespace
+    pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
 WHERE
     proisagg = FALSE
     AND pronamespace = {{scid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/get_definition.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/get_definition.sql
index 5e5baef9f..083e294f6 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/get_definition.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/get_definition.sql
@@ -1,14 +1,14 @@
 SELECT
-    pg_get_functiondef({{fnid}}::oid) AS func_def,
+    pg_catalog.pg_get_functiondef({{fnid}}::oid) AS func_def,
     COALESCE(pg_catalog.pg_get_function_identity_arguments(pr.oid), '') as
     func_with_identity_arguments,
     nspname,
     pr.proname as proname,
     COALESCE(pg_catalog.pg_get_function_arguments(pr.oid), '') as func_args
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_namespace nsp ON nsp.oid=pr.pronamespace
+    pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
 WHERE
     proisagg = FALSE
     AND pronamespace = {{scid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/get_languages.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/get_languages.sql
index f81ddfbda..2843741f4 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/get_languages.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/get_languages.sql
@@ -1,4 +1,4 @@
 SELECT
     lanname as label, lanname as value
 FROM
-    pg_language;
+    pg_catalog.pg_language;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/get_oid.sql
index 3bfc20a61..336195aeb 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/get_oid.sql
@@ -1,15 +1,15 @@
 SELECT
     pr.oid, pr.proname || '(' || COALESCE(pg_catalog
     .pg_get_function_identity_arguments(pr.oid), '') || ')' as name,
-    lanname, pg_get_userbyid(proowner) as funcowner, pr.pronamespace as nsp
+    lanname, pg_catalog.pg_get_userbyid(proowner) as funcowner, pr.pronamespace as nsp
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 JOIN
-    pg_namespace nsp ON nsp.oid=pr.pronamespace
+    pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
     AND nsp.nspname={{ nspname|qtLiteral }}
 WHERE
     proisagg = FALSE
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/get_out_types.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/get_out_types.sql
index 64a11875f..3c51e31db 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/get_out_types.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/get_out_types.sql
@@ -1,6 +1,6 @@
 SELECT
     format_type(oid, NULL) AS out_arg_type
 FROM
-    pg_type
+    pg_catalog.pg_type
 WHERE
     oid = {{ out_arg_oid }}::oid;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/get_schema.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/get_schema.sql
index 127d4b9db..2d77757ea 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/get_schema.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/get_schema.sql
@@ -1,6 +1,6 @@
 SELECT
     nspname
 FROM
-    pg_namespace
+    pg_catalog.pg_namespace
 WHERE
     oid = {{ scid }}::oid;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/get_types.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/get_types.sql
index 2a5582ee9..ed340f529 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/get_types.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/get_types.sql
@@ -2,13 +2,13 @@ SELECT
     *
 FROM
     (SELECT
-        format_type(t.oid,NULL) AS typname,
+        pg_catalog.format_type(t.oid,NULL) AS typname,
         CASE WHEN typelem > 0 THEN typelem ELSE t.oid END as elemoid, typlen, typtype, t.oid, nspname,
-        (SELECT COUNT(1) FROM pg_type t2 WHERE t2.typname = t.typname) > 1 AS isdup
+        (SELECT COUNT(1) FROM pg_catalog.pg_type t2 WHERE t2.typname = t.typname) > 1 AS isdup
     FROM
-        pg_type t
+        pg_catalog.pg_type t
     JOIN
-        pg_namespace nsp ON typnamespace=nsp.oid
+        pg_catalog.pg_namespace nsp ON typnamespace=nsp.oid
     WHERE
         (NOT (typname = 'unknown' AND nspname = 'pg_catalog'))
     AND
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/node.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/node.sql
index 290b498d2..f52757df2 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/node.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/node.sql
@@ -1,14 +1,14 @@
 SELECT
     pr.oid, pr.proname || '(' || COALESCE(pg_catalog.pg_get_function_identity_arguments(pr.oid), '') || ')' AS name,
-    lanname, pg_get_userbyid(proowner) AS funcowner, description
+    lanname, pg_catalog.pg_get_userbyid(proowner) AS funcowner, description
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 LEFT OUTER JOIN
-    pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass)
+    pg_catalog.pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass)
 WHERE
     proisagg = FALSE
     AND pr.protype = '0'::char
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/properties.sql
index ebed10505..ce707101f 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/properties.sql
@@ -3,26 +3,26 @@ SELECT
     pr.pronamespace, pr.prolang, pr.procost, pr.prorows,
     pr.prosecdef, pr.proleakproof, pr.proisstrict, pr.proretset, pr.provolatile,
     pr.pronargs, pr.prorettype, pr.proallargtypes, pr.proargmodes, pr.probin, pr.proacl,
-    pr.proname, pr.proname AS name, pg_get_function_result(pr.oid) AS prorettypename,
-    typns.nspname AS typnsp, lanname, proargnames, oidvectortypes(proargtypes) AS proargtypenames,
-    pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
-    pr.pronargdefaults, proconfig, pg_get_userbyid(proowner) AS funcowner, description,
+    pr.proname, pr.proname AS name, pg_catalog.pg_get_function_result(pr.oid) AS prorettypename,
+    typns.nspname AS typnsp, lanname, proargnames, pg_catalog.oidvectortypes(proargtypes) AS proargtypenames,
+    pg_catalog.pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
+    pr.pronargdefaults, proconfig, pg_catalog.pg_get_userbyid(proowner) AS funcowner, description,
     (SELECT
-        array_agg(provider || '=' || label)
+        pg_catalog.array_agg(provider || '=' || label)
     FROM
-        pg_seclabel sl1
+        pg_catalog.pg_seclabel sl1
     WHERE
         sl1.objoid=pr.oid) AS seclabels
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_namespace typns ON typns.oid=typ.typnamespace
+    pg_catalog.pg_namespace typns ON typns.oid=typ.typnamespace
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 LEFT OUTER JOIN
-    pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass and des.objsubid = 0)
+    pg_catalog.pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass and des.objsubid = 0)
 WHERE
     proisagg = FALSE
     AND typname NOT IN ('trigger', 'event_trigger')
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/stats.sql
index 2e276b65a..e4b99e467 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/stats.sql
@@ -3,6 +3,6 @@ SELECT
     total_time AS {{ conn|qtIdent(_('Total time')) }},
     self_time AS {{ conn|qtIdent(_('Self time')) }}
 FROM
-    pg_stat_user_functions
+    pg_catalog.pg_stat_user_functions
 WHERE
     funcid = {{fnid}}::OID
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/variables.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/variables.sql
index 5233c71ec..c75e5b47f 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/variables.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/default/variables.sql
@@ -1,6 +1,6 @@
 SELECT
     name, vartype, min_val, max_val, enumvals
 FROM
-    pg_settings
+    pg_catalog.pg_settings
 WHERE
     context in ('user', 'superuser');
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/acl.sql
index ebbbe7d56..91a24cd3f 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/acl.sql
@@ -1,7 +1,7 @@
 SELECT
     COALESCE(gt.rolname, 'PUBLIC') AS grantee,
-    g.rolname AS grantor, array_agg(privilege_type) AS privileges,
-    array_agg(is_grantable) AS grantable
+    g.rolname AS grantor, pg_catalog.array_agg(privilege_type) AS privileges,
+    pg_catalog.array_agg(is_grantable) AS grantable
 FROM
     (SELECT
         d.grantee, d.grantor, d.is_grantable,
@@ -26,7 +26,7 @@ FROM
             (d).is_grantable AS is_grantable,
             (d).privilege_type AS privilege_type
         FROM
-            (SELECT aclexplode(db.proacl) AS d FROM pg_proc db
+            (SELECT pg_catalog.aclexplode(db.proacl) AS d FROM pg_catalog.pg_proc db
             WHERE db.oid = {{fnid}}::OID) a ORDER BY privilege_type
         ) d
     ) d
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/coll_stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/coll_stats.sql
index 59246796a..7963b50fa 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/coll_stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/coll_stats.sql
@@ -4,15 +4,15 @@ SELECT
     total_time AS {{ conn|qtIdent(_('Total time')) }},
     self_time AS {{ conn|qtIdent(_('Self time')) }}
 FROM
-    pg_stat_user_functions
+    pg_catalog.pg_stat_user_functions
 WHERE
     schemaname = {{schema_name|qtLiteral}}
     AND funcid IN (
         SELECT p.oid
         FROM
-            pg_proc p
+            pg_catalog.pg_proc p
         JOIN
-            pg_type typ ON typ.oid=p.prorettype
+            pg_catalog.pg_type typ ON typ.oid=p.prorettype
         WHERE
             p.prokind = 'p'::char
             AND typname NOT IN ('trigger', 'event_trigger')
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/delete.sql
index 383541071..851d7f18b 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/delete.sql
@@ -4,11 +4,11 @@ SELECT
     .pg_get_function_identity_arguments(pr.oid), '') || ')' as func_args,
     nspname
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_namespace nsp ON nsp.oid=pr.pronamespace
+    pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
 WHERE
     pr.prokind = 'p'::char
     AND pronamespace = {{scid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/get_definition.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/get_definition.sql
index 4c2e9d996..cd566e2d3 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/get_definition.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/get_definition.sql
@@ -1,14 +1,14 @@
 SELECT
-    pg_get_functiondef({{fnid}}::oid) AS func_def,
+    pg_catalog.pg_get_functiondef({{fnid}}::oid) AS func_def,
     COALESCE(pg_catalog.pg_get_function_identity_arguments(pr.oid), '') as
     func_with_identity_arguments,
     nspname,
     pr.proname as proname,
     COALESCE(pg_catalog.pg_get_function_arguments(pr.oid), '') as func_args
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_namespace nsp ON nsp.oid=pr.pronamespace
+    pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
 WHERE
     pr.prokind = 'p'::char
     AND pronamespace = {{scid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/get_languages.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/get_languages.sql
index f81ddfbda..2843741f4 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/get_languages.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/get_languages.sql
@@ -1,4 +1,4 @@
 SELECT
     lanname as label, lanname as value
 FROM
-    pg_language;
+    pg_catalog.pg_language;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/get_oid.sql
index be98b53ca..6490082b7 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/get_oid.sql
@@ -1,15 +1,15 @@
 SELECT
     pr.oid, pr.proname || '(' || COALESCE(pg_catalog
     .pg_get_function_identity_arguments(pr.oid), '') || ')' as name,
-    lanname, pg_get_userbyid(proowner) as funcowner, pr.pronamespace AS nsp
+    lanname, pg_catalog.pg_get_userbyid(proowner) as funcowner, pr.pronamespace AS nsp
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 JOIN
-    pg_namespace nsp ON nsp.oid=pr.pronamespace
+    pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
     AND nsp.nspname={{ nspname|qtLiteral }}
 WHERE
     pr.prokind = 'p'::char
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/get_out_types.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/get_out_types.sql
index 64a11875f..3c51e31db 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/get_out_types.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/get_out_types.sql
@@ -1,6 +1,6 @@
 SELECT
     format_type(oid, NULL) AS out_arg_type
 FROM
-    pg_type
+    pg_catalog.pg_type
 WHERE
     oid = {{ out_arg_oid }}::oid;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/get_schema.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/get_schema.sql
index 127d4b9db..2d77757ea 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/get_schema.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/get_schema.sql
@@ -1,6 +1,6 @@
 SELECT
     nspname
 FROM
-    pg_namespace
+    pg_catalog.pg_namespace
 WHERE
     oid = {{ scid }}::oid;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/get_types.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/get_types.sql
index 2a5582ee9..ed340f529 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/get_types.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/get_types.sql
@@ -2,13 +2,13 @@ SELECT
     *
 FROM
     (SELECT
-        format_type(t.oid,NULL) AS typname,
+        pg_catalog.format_type(t.oid,NULL) AS typname,
         CASE WHEN typelem > 0 THEN typelem ELSE t.oid END as elemoid, typlen, typtype, t.oid, nspname,
-        (SELECT COUNT(1) FROM pg_type t2 WHERE t2.typname = t.typname) > 1 AS isdup
+        (SELECT COUNT(1) FROM pg_catalog.pg_type t2 WHERE t2.typname = t.typname) > 1 AS isdup
     FROM
-        pg_type t
+        pg_catalog.pg_type t
     JOIN
-        pg_namespace nsp ON typnamespace=nsp.oid
+        pg_catalog.pg_namespace nsp ON typnamespace=nsp.oid
     WHERE
         (NOT (typname = 'unknown' AND nspname = 'pg_catalog'))
     AND
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/node.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/node.sql
index 0ef597bfa..abbb9cfcd 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/node.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/node.sql
@@ -7,15 +7,15 @@ SELECT
     ELSE
         pr.proname::text
     END AS name,
-    lanname, pg_get_userbyid(proowner) AS funcowner, description
+    lanname, pg_catalog.pg_get_userbyid(proowner) AS funcowner, description
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 LEFT OUTER JOIN
-    pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass)
+    pg_catalog.pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass)
 WHERE
     pr.prokind = 'p'::char
 {% if fnid %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/properties.sql
index 7efbad8e4..d51e26d5b 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/properties.sql
@@ -4,10 +4,10 @@ SELECT
     pr.prosrc, pr.prosrc AS prosrc_c, pr.pronamespace, pr.prolang, pr.procost, pr.prorows, pr.prokind,
     pr.prosecdef, pr.proleakproof, pr.proisstrict, pr.proretset, pr.provolatile, pr.proparallel,
     pr.pronargs, pr.prorettype, pr.proallargtypes, pr.proargmodes, pr.probin, pr.proacl,
-    pr.proname, pr.proname AS name, pg_get_function_result(pr.oid) AS prorettypename,
-    typns.nspname AS typnsp, lanname, proargnames, oidvectortypes(proargtypes) AS proargtypenames,
-    pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
-    pr.pronargdefaults, proconfig, pg_get_userbyid(proowner) AS funcowner, description,
+    pr.proname, pr.proname AS name, pg_catalog.pg_get_function_result(pr.oid) AS prorettypename,
+    typns.nspname AS typnsp, lanname, proargnames, pg_catalog.oidvectortypes(proargtypes) AS proargtypenames,
+    pg_catalog.pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
+    pr.pronargdefaults, proconfig, pg_catalog.pg_get_userbyid(proowner) AS funcowner, description,
     (
         WITH name_with_args_tab AS (SELECT pg_catalog.pg_get_function_identity_arguments(pr.oid) AS val)
         SELECT CASE WHEN
@@ -20,21 +20,21 @@ SELECT
         FROM name_with_args_tab
     ) AS name_with_args,
     (SELECT
-        array_agg(provider || '=' || label)
+        pg_catalog.array_agg(provider || '=' || label)
     FROM
-        pg_seclabel sl1
+        pg_catalog.pg_seclabel sl1
     WHERE
         sl1.objoid=pr.oid) AS seclabels
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_namespace typns ON typns.oid=typ.typnamespace
+    pg_catalog.pg_namespace typns ON typns.oid=typ.typnamespace
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 LEFT OUTER JOIN
-    pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass and des.objsubid = 0)
+    pg_catalog.pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass and des.objsubid = 0)
 WHERE
     pr.prokind = 'p'
     AND typname NOT IN ('trigger', 'event_trigger')
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/stats.sql
index 2e276b65a..e4b99e467 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/stats.sql
@@ -3,6 +3,6 @@ SELECT
     total_time AS {{ conn|qtIdent(_('Total time')) }},
     self_time AS {{ conn|qtIdent(_('Self time')) }}
 FROM
-    pg_stat_user_functions
+    pg_catalog.pg_stat_user_functions
 WHERE
     funcid = {{fnid}}::OID
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/variables.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/variables.sql
index 5233c71ec..c75e5b47f 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/variables.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/pg/sql/11_plus/variables.sql
@@ -1,6 +1,6 @@
 SELECT
     name, vartype, min_val, max_val, enumvals
 FROM
-    pg_settings
+    pg_catalog.pg_settings
 WHERE
     context in ('user', 'superuser');
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/11_plus/coll_stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/11_plus/coll_stats.sql
index 59246796a..7963b50fa 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/11_plus/coll_stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/11_plus/coll_stats.sql
@@ -4,15 +4,15 @@ SELECT
     total_time AS {{ conn|qtIdent(_('Total time')) }},
     self_time AS {{ conn|qtIdent(_('Self time')) }}
 FROM
-    pg_stat_user_functions
+    pg_catalog.pg_stat_user_functions
 WHERE
     schemaname = {{schema_name|qtLiteral}}
     AND funcid IN (
         SELECT p.oid
         FROM
-            pg_proc p
+            pg_catalog.pg_proc p
         JOIN
-            pg_type typ ON typ.oid=p.prorettype
+            pg_catalog.pg_type typ ON typ.oid=p.prorettype
         WHERE
             p.prokind = 'p'::char
             AND typname NOT IN ('trigger', 'event_trigger')
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/11_plus/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/11_plus/delete.sql
index 383541071..851d7f18b 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/11_plus/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/11_plus/delete.sql
@@ -4,11 +4,11 @@ SELECT
     .pg_get_function_identity_arguments(pr.oid), '') || ')' as func_args,
     nspname
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_namespace nsp ON nsp.oid=pr.pronamespace
+    pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
 WHERE
     pr.prokind = 'p'::char
     AND pronamespace = {{scid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/11_plus/get_definition.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/11_plus/get_definition.sql
index 4c2e9d996..cd566e2d3 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/11_plus/get_definition.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/11_plus/get_definition.sql
@@ -1,14 +1,14 @@
 SELECT
-    pg_get_functiondef({{fnid}}::oid) AS func_def,
+    pg_catalog.pg_get_functiondef({{fnid}}::oid) AS func_def,
     COALESCE(pg_catalog.pg_get_function_identity_arguments(pr.oid), '') as
     func_with_identity_arguments,
     nspname,
     pr.proname as proname,
     COALESCE(pg_catalog.pg_get_function_arguments(pr.oid), '') as func_args
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_namespace nsp ON nsp.oid=pr.pronamespace
+    pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
 WHERE
     pr.prokind = 'p'::char
     AND pronamespace = {{scid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/11_plus/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/11_plus/get_oid.sql
index be98b53ca..6490082b7 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/11_plus/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/11_plus/get_oid.sql
@@ -1,15 +1,15 @@
 SELECT
     pr.oid, pr.proname || '(' || COALESCE(pg_catalog
     .pg_get_function_identity_arguments(pr.oid), '') || ')' as name,
-    lanname, pg_get_userbyid(proowner) as funcowner, pr.pronamespace AS nsp
+    lanname, pg_catalog.pg_get_userbyid(proowner) as funcowner, pr.pronamespace AS nsp
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 JOIN
-    pg_namespace nsp ON nsp.oid=pr.pronamespace
+    pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
     AND nsp.nspname={{ nspname|qtLiteral }}
 WHERE
     pr.prokind = 'p'::char
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/11_plus/node.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/11_plus/node.sql
index 0ef597bfa..abbb9cfcd 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/11_plus/node.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/11_plus/node.sql
@@ -7,15 +7,15 @@ SELECT
     ELSE
         pr.proname::text
     END AS name,
-    lanname, pg_get_userbyid(proowner) AS funcowner, description
+    lanname, pg_catalog.pg_get_userbyid(proowner) AS funcowner, description
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 LEFT OUTER JOIN
-    pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass)
+    pg_catalog.pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass)
 WHERE
     pr.prokind = 'p'::char
 {% if fnid %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/11_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/11_plus/properties.sql
index 6bc8e1835..dcca1a917 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/11_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/11_plus/properties.sql
@@ -4,10 +4,10 @@ SELECT
     pr.prosrc, pr.prosrc AS prosrc_c, pr.pronamespace, pr.prolang, pr.procost, pr.prorows, pr.prokind,
     pr.prosecdef, pr.proleakproof, pr.proisstrict, pr.proretset, pr.provolatile, pr.proparallel,
     pr.pronargs, pr.prorettype, pr.proallargtypes, pr.proargmodes, pr.probin, pr.proacl,
-    pr.proname, pr.proname AS name, pg_get_function_result(pr.oid) AS prorettypename,
-    typns.nspname AS typnsp, lanname, proargnames, oidvectortypes(proargtypes) AS proargtypenames,
-    pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
-    pr.pronargdefaults, proconfig, pg_get_userbyid(proowner) AS funcowner, description,
+    pr.proname, pr.proname AS name, pg_catalog.pg_get_function_result(pr.oid) AS prorettypename,
+    typns.nspname AS typnsp, lanname, proargnames, pg_catalog.oidvectortypes(proargtypes) AS proargtypenames,
+    pg_catalog.pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
+    pr.pronargdefaults, proconfig, pg_catalog.pg_get_userbyid(proowner) AS funcowner, description,
     (
         WITH name_with_args_tab AS (SELECT pg_catalog.pg_get_function_identity_arguments(pr.oid) AS val)
         SELECT CASE WHEN
@@ -20,21 +20,21 @@ SELECT
         FROM name_with_args_tab
     ) AS name_with_args,
     (SELECT
-        array_agg(provider || '=' || label)
+        pg_catalog.array_agg(provider || '=' || label)
     FROM
-        pg_seclabel sl1
+        pg_catalog.pg_seclabel sl1
     WHERE
         sl1.objoid=pr.oid) AS seclabels
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_namespace typns ON typns.oid=typ.typnamespace
+    pg_catalog.pg_namespace typns ON typns.oid=typ.typnamespace
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 LEFT OUTER JOIN
-    pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass and des.objsubid = 0)
+    pg_catalog.pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass and des.objsubid = 0)
 WHERE
     pr.prokind = 'p'::char
     AND typname NOT IN ('trigger', 'event_trigger')
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/9.6_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/9.6_plus/properties.sql
index 0556ba3e8..af676f3e3 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/9.6_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/9.6_plus/properties.sql
@@ -3,10 +3,10 @@ SELECT
     pr.prosrc, pr.prosrc AS prosrc_c, pr.pronamespace, pr.prolang, pr.procost, pr.prorows,
     pr.prosecdef, pr.proleakproof, pr.proisstrict, pr.proretset, pr.provolatile, pr.proparallel,
     pr.pronargs, pr.prorettype, pr.proallargtypes, pr.proargmodes, pr.probin, pr.proacl,
-    pr.proname, pr.proname AS name, pg_get_function_result(pr.oid) AS prorettypename,
-    typns.nspname AS typnsp, lanname, proargnames, oidvectortypes(proargtypes) AS proargtypenames,
-    pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
-    pr.pronargdefaults, proconfig, pg_get_userbyid(proowner) AS funcowner, description,
+    pr.proname, pr.proname AS name, pg_catalog.pg_get_function_result(pr.oid) AS prorettypename,
+    typns.nspname AS typnsp, lanname, proargnames, pg_catalog.oidvectortypes(proargtypes) AS proargtypenames,
+    pg_catalog.pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
+    pr.pronargdefaults, proconfig, pg_catalog.pg_get_userbyid(proowner) AS funcowner, description,
     (
         WITH name_with_args_tab AS (SELECT pg_catalog.pg_get_function_identity_arguments(pr.oid) AS val)
         SELECT CASE WHEN
@@ -19,21 +19,21 @@ SELECT
         FROM name_with_args_tab
     ) AS name_with_args,
     (SELECT
-        array_agg(provider || '=' || label)
+        pg_catalog.array_agg(provider || '=' || label)
     FROM
-        pg_seclabel sl1
+        pg_catalog.pg_seclabel sl1
     WHERE
         sl1.objoid=pr.oid) AS seclabels
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_namespace typns ON typns.oid=typ.typnamespace
+    pg_catalog.pg_namespace typns ON typns.oid=typ.typnamespace
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 LEFT OUTER JOIN
-    pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass and des.objsubid = 0)
+    pg_catalog.pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass and des.objsubid = 0)
 WHERE
     proisagg = FALSE
     AND typname NOT IN ('trigger', 'event_trigger')
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/acl.sql
index ebbbe7d56..39ffe09a4 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/acl.sql
@@ -1,7 +1,7 @@
 SELECT
     COALESCE(gt.rolname, 'PUBLIC') AS grantee,
-    g.rolname AS grantor, array_agg(privilege_type) AS privileges,
-    array_agg(is_grantable) AS grantable
+    g.rolname AS grantor, pg_catalog.array_agg(privilege_type) AS privileges,
+    pg_catalog.array_agg(is_grantable) AS grantable
 FROM
     (SELECT
         d.grantee, d.grantor, d.is_grantable,
@@ -26,7 +26,7 @@ FROM
             (d).is_grantable AS is_grantable,
             (d).privilege_type AS privilege_type
         FROM
-            (SELECT aclexplode(db.proacl) AS d FROM pg_proc db
+            (SELECT pg_catalog.aclexplode(db.proacl) AS d FROM pg_proc db
             WHERE db.oid = {{fnid}}::OID) a ORDER BY privilege_type
         ) d
     ) d
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/coll_stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/coll_stats.sql
index 86a0d7be8..5dc51c08a 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/coll_stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/coll_stats.sql
@@ -4,17 +4,17 @@ SELECT
     total_time AS {{ conn|qtIdent(_('Total time')) }},
     self_time AS {{ conn|qtIdent(_('Self time')) }}
 FROM
-    pg_stat_user_functions
+    pg_catalog.pg_stat_user_functions
 WHERE
     schemaname = {{schema_name|qtLiteral}}
     AND funcid IN (
         SELECT p.oid
         FROM
-            pg_proc p
+            pg_catalog.pg_proc p
         JOIN
-            pg_type typ ON typ.oid=p.prorettype
+            pg_catalog.pg_type typ ON typ.oid=p.prorettype
         WHERE
             p.proisagg = FALSE
             AND typname NOT IN ('trigger', 'event_trigger')
     )
-ORDER BY funcname;
\ No newline at end of file
+ORDER BY funcname;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/delete.sql
index e140908e6..4008e7be3 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/delete.sql
@@ -4,11 +4,11 @@ SELECT
     .pg_get_function_identity_arguments(pr.oid), '') || ')' as func_args,
     nspname
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_namespace nsp ON nsp.oid=pr.pronamespace
+    pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
 WHERE
     proisagg = FALSE
     AND pronamespace = {{scid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/get_definition.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/get_definition.sql
index 5e5baef9f..083e294f6 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/get_definition.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/get_definition.sql
@@ -1,14 +1,14 @@
 SELECT
-    pg_get_functiondef({{fnid}}::oid) AS func_def,
+    pg_catalog.pg_get_functiondef({{fnid}}::oid) AS func_def,
     COALESCE(pg_catalog.pg_get_function_identity_arguments(pr.oid), '') as
     func_with_identity_arguments,
     nspname,
     pr.proname as proname,
     COALESCE(pg_catalog.pg_get_function_arguments(pr.oid), '') as func_args
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_namespace nsp ON nsp.oid=pr.pronamespace
+    pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
 WHERE
     proisagg = FALSE
     AND pronamespace = {{scid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/get_languages.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/get_languages.sql
index f81ddfbda..2843741f4 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/get_languages.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/get_languages.sql
@@ -1,4 +1,4 @@
 SELECT
     lanname as label, lanname as value
 FROM
-    pg_language;
+    pg_catalog.pg_language;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/get_oid.sql
index 253db08b2..39c785f39 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/get_oid.sql
@@ -1,15 +1,15 @@
 SELECT
     pr.oid, pr.proname || '(' || COALESCE(pg_catalog
     .pg_get_function_identity_arguments(pr.oid), '') || ')' as name,
-    lanname, pg_get_userbyid(proowner) as funcowner, pr.pronamespace AS nsp
+    lanname, pg_catalog.pg_get_userbyid(proowner) as funcowner, pr.pronamespace AS nsp
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 JOIN
-    pg_namespace nsp ON nsp.oid=pr.pronamespace
+    pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
     AND nsp.nspname={{ nspname|qtLiteral }}
 WHERE
     proisagg = FALSE
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/get_out_types.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/get_out_types.sql
index 64a11875f..9ec158ecd 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/get_out_types.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/get_out_types.sql
@@ -1,6 +1,6 @@
 SELECT
-    format_type(oid, NULL) AS out_arg_type
+    pg_catalog.format_type(oid, NULL) AS out_arg_type
 FROM
-    pg_type
+    pg_catalog.pg_type
 WHERE
     oid = {{ out_arg_oid }}::oid;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/get_schema.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/get_schema.sql
index 127d4b9db..2d77757ea 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/get_schema.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/get_schema.sql
@@ -1,6 +1,6 @@
 SELECT
     nspname
 FROM
-    pg_namespace
+    pg_catalog.pg_namespace
 WHERE
     oid = {{ scid }}::oid;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/get_types.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/get_types.sql
index 2a5582ee9..ed340f529 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/get_types.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/get_types.sql
@@ -2,13 +2,13 @@ SELECT
     *
 FROM
     (SELECT
-        format_type(t.oid,NULL) AS typname,
+        pg_catalog.format_type(t.oid,NULL) AS typname,
         CASE WHEN typelem > 0 THEN typelem ELSE t.oid END as elemoid, typlen, typtype, t.oid, nspname,
-        (SELECT COUNT(1) FROM pg_type t2 WHERE t2.typname = t.typname) > 1 AS isdup
+        (SELECT COUNT(1) FROM pg_catalog.pg_type t2 WHERE t2.typname = t.typname) > 1 AS isdup
     FROM
-        pg_type t
+        pg_catalog.pg_type t
     JOIN
-        pg_namespace nsp ON typnamespace=nsp.oid
+        pg_catalog.pg_namespace nsp ON typnamespace=nsp.oid
     WHERE
         (NOT (typname = 'unknown' AND nspname = 'pg_catalog'))
     AND
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/node.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/node.sql
index 8477aa856..1932446db 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/node.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/node.sql
@@ -7,15 +7,15 @@ SELECT
     ELSE
         pr.proname::text
     END AS name,
-    lanname, pg_get_userbyid(proowner) AS funcowner, description
+    lanname, pg_catalog.pg_get_userbyid(proowner) AS funcowner, description
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 LEFT OUTER JOIN
-    pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass)
+    pg_catalog.pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass)
 WHERE
     proisagg = FALSE
     AND pr.protype = '1'::char
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/properties.sql
index 8dbf5031c..edf682cab 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/properties.sql
@@ -3,10 +3,10 @@ SELECT
     pr.prosrc, pr.prosrc AS prosrc_c, pr.pronamespace, pr.prolang, pr.procost, pr.prorows,
     pr.prosecdef, pr.proleakproof, pr.proisstrict, pr.proretset, pr.provolatile,
     pr.pronargs, pr.prorettype, pr.proallargtypes, pr.proargmodes, pr.probin, pr.proacl,
-    pr.proname, pr.proname AS name, pg_get_function_result(pr.oid) AS prorettypename,
-    typns.nspname AS typnsp, lanname, proargnames, oidvectortypes(proargtypes) AS proargtypenames,
-    pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
-    pr.pronargdefaults, proconfig, pg_get_userbyid(proowner) AS funcowner, description,
+    pr.proname, pr.proname AS name, pg_catalog.pg_get_function_result(pr.oid) AS prorettypename,
+    typns.nspname AS typnsp, lanname, proargnames, pg_catalog.oidvectortypes(proargtypes) AS proargtypenames,
+    pg_catalog.pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
+    pr.pronargdefaults, proconfig, pg_catalog.pg_get_userbyid(proowner) AS funcowner, description,
     (
         WITH name_with_args_tab AS (SELECT pg_catalog.pg_get_function_identity_arguments(pr.oid) AS val)
         SELECT CASE WHEN
@@ -19,21 +19,21 @@ SELECT
         FROM name_with_args_tab
     ) AS name_with_args,
     (SELECT
-        array_agg(provider || '=' || label)
+        pg_catalog.array_agg(provider || '=' || label)
     FROM
-        pg_seclabel sl1
+        pg_catalog.pg_seclabel sl1
     WHERE
         sl1.objoid=pr.oid) AS seclabels
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_namespace typns ON typns.oid=typ.typnamespace
+    pg_catalog.pg_namespace typns ON typns.oid=typ.typnamespace
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 LEFT OUTER JOIN
-    pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass and des.objsubid = 0)
+    pg_catalog.pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass and des.objsubid = 0)
 WHERE
     proisagg = FALSE
     AND typname NOT IN ('trigger', 'event_trigger')
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/stats.sql
index 2e276b65a..e4b99e467 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/stats.sql
@@ -3,6 +3,6 @@ SELECT
     total_time AS {{ conn|qtIdent(_('Total time')) }},
     self_time AS {{ conn|qtIdent(_('Self time')) }}
 FROM
-    pg_stat_user_functions
+    pg_catalog.pg_stat_user_functions
 WHERE
     funcid = {{fnid}}::OID
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/variables.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/variables.sql
index 5233c71ec..c75e5b47f 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/variables.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/default/variables.sql
@@ -1,6 +1,6 @@
 SELECT
     name, vartype, min_val, max_val, enumvals
 FROM
-    pg_settings
+    pg_catalog.pg_settings
 WHERE
     context in ('user', 'superuser');
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/11_plus/coll_stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/11_plus/coll_stats.sql
index cd8cecdfe..b030c8115 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/11_plus/coll_stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/11_plus/coll_stats.sql
@@ -4,15 +4,15 @@ SELECT
     total_time AS {{ conn|qtIdent(_('Total time')) }},
     self_time AS {{ conn|qtIdent(_('Self time')) }}
 FROM
-    pg_stat_user_functions
+    pg_catalog.pg_stat_user_functions
 WHERE
     schemaname = {{schema_name|qtLiteral}}
     AND funcid IN (
         SELECT p.oid
         FROM
-            pg_proc p
+            pg_catalog.pg_proc p
         JOIN
-            pg_type typ ON typ.oid=p.prorettype
+            pg_catalog.pg_type typ ON typ.oid=p.prorettype
         WHERE
             p.prokind IN ('f', 'w')
             AND typname = 'trigger'
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/11_plus/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/11_plus/delete.sql
index f7f906b3b..4eb207cf2 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/11_plus/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/11_plus/delete.sql
@@ -4,11 +4,11 @@ SELECT
     .pg_get_function_identity_arguments(pr.oid), '') || ')' as func_args,
     nspname
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_namespace nsp ON nsp.oid=pr.pronamespace
+    pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
 WHERE
     pr.prokind IN ('f', 'w')
     AND pronamespace = {{scid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/11_plus/get_definition.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/11_plus/get_definition.sql
index ab25dbf99..9a4988778 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/11_plus/get_definition.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/11_plus/get_definition.sql
@@ -1,14 +1,14 @@
 SELECT
-    pg_get_functiondef({{fnid}}::oid) AS func_def,
+    pg_catalog.pg_get_functiondef({{fnid}}::oid) AS func_def,
     COALESCE(pg_catalog.pg_get_function_identity_arguments(pr.oid), '') as
     func_with_identity_arguments,
     nspname,
     pr.proname as proname,
     COALESCE(pg_catalog.pg_get_function_arguments(pr.oid), '') as func_args
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_namespace nsp ON nsp.oid=pr.pronamespace
+    pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
 WHERE
     pr.prokind IN ('f', 'w')
     AND pronamespace = {{scid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/11_plus/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/11_plus/get_oid.sql
index 413df9128..53bc02b24 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/11_plus/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/11_plus/get_oid.sql
@@ -1,15 +1,15 @@
 SELECT
     pr.oid, pr.proname || '(' || COALESCE(pg_catalog
     .pg_get_function_identity_arguments(pr.oid), '') || ')' as name,
-    lanname, pg_get_userbyid(proowner) as funcowner, pr.pronamespace AS nsp
+    lanname, pg_catalog.pg_get_userbyid(proowner) as funcowner, pr.pronamespace AS nsp
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 JOIN
-    pg_namespace nsp ON nsp.oid=pr.pronamespace
+    pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
     AND nsp.nspname={{ nspname|qtLiteral }}
 WHERE
     pr.prokind IN ('f', 'w')
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/11_plus/node.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/11_plus/node.sql
index 55d7c5494..7152522a1 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/11_plus/node.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/11_plus/node.sql
@@ -1,14 +1,14 @@
 SELECT
     pr.oid, pr.proname || '()' as name,
-    lanname, pg_get_userbyid(proowner) as funcowner, description
+    lanname, pg_catalog.pg_get_userbyid(proowner) as funcowner, description
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 LEFT OUTER JOIN
-    pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass)
+    pg_catalog.pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass)
 WHERE
     pr.prokind IN ('f', 'w')
 {% if fnid %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/11_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/11_plus/properties.sql
index 9c64a486a..afa3dcc1d 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/11_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/11_plus/properties.sql
@@ -4,26 +4,26 @@ SELECT
     pr.prosrc, pr.prosrc AS prosrc_c, pr.pronamespace, pr.prolang, pr.procost, pr.prorows, pr.prokind,
     pr.prosecdef, pr.proleakproof, pr.proisstrict, pr.proretset, pr.provolatile, pr.proparallel,
     pr.pronargs, pr.prorettype, pr.proallargtypes, pr.proargmodes, pr.probin, pr.proacl,
-    pr.proname, pr.proname AS name, pg_get_function_result(pr.oid) AS prorettypename,
-    typns.nspname AS typnsp, lanname, proargnames, oidvectortypes(proargtypes) AS proargtypenames,
-    pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
-    pr.pronargdefaults, proconfig, pg_get_userbyid(proowner) AS funcowner, description,
+    pr.proname, pr.proname AS name, pg_catalog.pg_get_function_result(pr.oid) AS prorettypename,
+    typns.nspname AS typnsp, lanname, proargnames, pg_catalog.oidvectortypes(proargtypes) AS proargtypenames,
+    pg_catalog.pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
+    pr.pronargdefaults, proconfig, pg_catalog.pg_get_userbyid(proowner) AS funcowner, description,
     (SELECT
-        array_agg(provider || '=' || label)
+        pg_catalog.array_agg(provider || '=' || label)
     FROM
-        pg_seclabel sl1
+        pg_catalog.pg_seclabel sl1
     WHERE
         sl1.objoid=pr.oid) AS seclabels
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_namespace typns ON typns.oid=typ.typnamespace
+    pg_catalog.pg_namespace typns ON typns.oid=typ.typnamespace
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 LEFT OUTER JOIN
-    pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass and des.objsubid = 0)
+    pg_catalog.pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass and des.objsubid = 0)
 WHERE
     pr.prokind IN ('f', 'w')
     AND typname IN ('trigger', 'event_trigger')
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/9.2_plus/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/9.2_plus/delete.sql
index cdf93c8e5..42bd27f66 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/9.2_plus/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/9.2_plus/delete.sql
@@ -4,11 +4,11 @@ SELECT
     .pg_get_function_identity_arguments(pr.oid), '') || ')' as func_args,
     nspname
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_namespace nsp ON nsp.oid=pr.pronamespace
+    pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
 WHERE
     proisagg = FALSE
     AND pronamespace = {{scid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/9.2_plus/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/9.2_plus/get_oid.sql
index 71bf1916d..86a720aac 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/9.2_plus/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/9.2_plus/get_oid.sql
@@ -1,15 +1,15 @@
 SELECT
     pr.oid, pr.proname || '(' || COALESCE(pg_catalog
     .pg_get_function_identity_arguments(pr.oid), '') || ')' as name,
-    lanname, pg_get_userbyid(proowner) as funcowner, pr.pronamespace AS nsp
+    lanname, pg_catalog.pg_get_userbyid(proowner) as funcowner, pr.pronamespace AS nsp
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 JOIN
-    pg_namespace nsp ON nsp.oid=pr.pronamespace
+    pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
     AND nsp.nspname={{ nspname|qtLiteral }}
 WHERE
     proisagg = FALSE
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/9.2_plus/node.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/9.2_plus/node.sql
index cf76ffd4b..c83249649 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/9.2_plus/node.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/9.2_plus/node.sql
@@ -1,14 +1,14 @@
 SELECT
     pr.oid, pr.proname || '()' as name,
-    lanname, pg_get_userbyid(proowner) as funcowner, description
+    lanname, pg_catalog.pg_get_userbyid(proowner) as funcowner, description
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 LEFT OUTER JOIN
-    pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass)
+    pg_catalog.pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass)
 WHERE
     proisagg = FALSE
     AND typname IN ('trigger', 'event_trigger')
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/9.2_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/9.2_plus/properties.sql
index c06915ada..9679f2c06 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/9.2_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/9.2_plus/properties.sql
@@ -3,26 +3,26 @@ SELECT
     pr.pronamespace, pr.prolang, pr.procost, pr.prorows,
     pr.prosecdef, pr.proleakproof, pr.proisstrict, pr.proretset, pr.provolatile,
     pr.pronargs, pr.prorettype, pr.proallargtypes, pr.proargmodes, pr.probin, pr.proacl,
-    pr.proname, pr.proname AS name, pg_get_function_result(pr.oid) AS prorettypename,
-    typns.nspname AS typnsp, lanname, proargnames, oidvectortypes(proargtypes) AS proargtypenames,
-    pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
-    pronargdefaults, proconfig, pg_get_userbyid(proowner) AS funcowner, description,
+    pr.proname, pr.proname AS name, pg_catalog.pg_get_function_result(pr.oid) AS prorettypename,
+    typns.nspname AS typnsp, lanname, proargnames, pg_catalog.oidvectortypes(proargtypes) AS proargtypenames,
+    pg_catalog.pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
+    pronargdefaults, proconfig, pg_catalog.pg_get_userbyid(proowner) AS funcowner, description,
     (SELECT
-        array_agg(provider || '=' || label)
+        pg_catalog.array_agg(provider || '=' || label)
     FROM
-        pg_seclabel sl1
+        pg_catalog.pg_seclabel sl1
     WHERE
         sl1.objoid=pr.oid) AS seclabels
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_namespace typns ON typns.oid=typ.typnamespace
+    pg_catalog.pg_namespace typns ON typns.oid=typ.typnamespace
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 LEFT OUTER JOIN
-    pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass and des.objsubid = 0)
+    pg_catalog.pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass and des.objsubid = 0)
 WHERE
     proisagg = FALSE
     AND typname IN ('trigger', 'event_trigger')
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/9.5_plus/node.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/9.5_plus/node.sql
index 40d6086aa..97beabb94 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/9.5_plus/node.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/9.5_plus/node.sql
@@ -1,14 +1,14 @@
 SELECT
     pr.oid, pr.proname || '()' as name,
-    lanname, pg_get_userbyid(proowner) as funcowner, description
+    lanname, pg_catalog.pg_get_userbyid(proowner) as funcowner, description
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 LEFT OUTER JOIN
-    pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass)
+    pg_catalog.pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass)
 WHERE
     proisagg = FALSE
 {% if fnid %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/acl.sql
index ebbbe7d56..91a24cd3f 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/acl.sql
@@ -1,7 +1,7 @@
 SELECT
     COALESCE(gt.rolname, 'PUBLIC') AS grantee,
-    g.rolname AS grantor, array_agg(privilege_type) AS privileges,
-    array_agg(is_grantable) AS grantable
+    g.rolname AS grantor, pg_catalog.array_agg(privilege_type) AS privileges,
+    pg_catalog.array_agg(is_grantable) AS grantable
 FROM
     (SELECT
         d.grantee, d.grantor, d.is_grantable,
@@ -26,7 +26,7 @@ FROM
             (d).is_grantable AS is_grantable,
             (d).privilege_type AS privilege_type
         FROM
-            (SELECT aclexplode(db.proacl) AS d FROM pg_proc db
+            (SELECT pg_catalog.aclexplode(db.proacl) AS d FROM pg_catalog.pg_proc db
             WHERE db.oid = {{fnid}}::OID) a ORDER BY privilege_type
         ) d
     ) d
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/coll_stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/coll_stats.sql
index ae5815e9e..8141d8c1c 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/coll_stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/coll_stats.sql
@@ -4,17 +4,17 @@ SELECT
     total_time AS {{ conn|qtIdent(_('Total time')) }},
     self_time AS {{ conn|qtIdent(_('Self time')) }}
 FROM
-    pg_stat_user_functions
+    pg_catalog.pg_stat_user_functions
 WHERE
     schemaname = {{schema_name|qtLiteral}}
     AND funcid IN (
         SELECT p.oid
         FROM
-            pg_proc p
+            pg_catalog.pg_proc p
         JOIN
-            pg_type typ ON typ.oid=p.prorettype
+            pg_catalog.pg_type typ ON typ.oid=p.prorettype
         WHERE
             p.proisagg = FALSE
             AND typname = 'trigger'
     )
-ORDER BY funcname;
\ No newline at end of file
+ORDER BY funcname;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/delete.sql
index b005e536e..9a6bb430d 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/delete.sql
@@ -4,11 +4,11 @@ SELECT
     .pg_get_function_identity_arguments(pr.oid), '') || ')' as func_args,
     nspname
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_namespace nsp ON nsp.oid=pr.pronamespace
+    pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
 WHERE
     proisagg = FALSE
     AND pronamespace = {{scid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/get_definition.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/get_definition.sql
index 5e5baef9f..083e294f6 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/get_definition.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/get_definition.sql
@@ -1,14 +1,14 @@
 SELECT
-    pg_get_functiondef({{fnid}}::oid) AS func_def,
+    pg_catalog.pg_get_functiondef({{fnid}}::oid) AS func_def,
     COALESCE(pg_catalog.pg_get_function_identity_arguments(pr.oid), '') as
     func_with_identity_arguments,
     nspname,
     pr.proname as proname,
     COALESCE(pg_catalog.pg_get_function_arguments(pr.oid), '') as func_args
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_namespace nsp ON nsp.oid=pr.pronamespace
+    pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
 WHERE
     proisagg = FALSE
     AND pronamespace = {{scid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/get_languages.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/get_languages.sql
index f81ddfbda..2843741f4 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/get_languages.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/get_languages.sql
@@ -1,4 +1,4 @@
 SELECT
     lanname as label, lanname as value
 FROM
-    pg_language;
+    pg_catalog.pg_language;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/get_oid.sql
index 72c8b49ea..f0e279c55 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/get_oid.sql
@@ -1,15 +1,15 @@
 SELECT
     pr.oid, pr.proname || '(' || COALESCE(pg_catalog
     .pg_get_function_identity_arguments(pr.oid), '') || ')' as name,
-    lanname, pg_get_userbyid(proowner) as funcowner, pr.pronamespace AS nsp
+    lanname, pg_catalog.pg_get_userbyid(proowner) as funcowner, pr.pronamespace AS nsp
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 JOIN
-    pg_namespace nsp ON nsp.oid=pr.pronamespace
+    pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
     AND nsp.nspname={{ nspname|qtLiteral }}
 WHERE
     proisagg = FALSE
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/get_out_types.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/get_out_types.sql
index 64a11875f..9ec158ecd 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/get_out_types.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/get_out_types.sql
@@ -1,6 +1,6 @@
 SELECT
-    format_type(oid, NULL) AS out_arg_type
+    pg_catalog.format_type(oid, NULL) AS out_arg_type
 FROM
-    pg_type
+    pg_catalog.pg_type
 WHERE
     oid = {{ out_arg_oid }}::oid;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/get_schema.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/get_schema.sql
index 127d4b9db..2d77757ea 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/get_schema.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/get_schema.sql
@@ -1,6 +1,6 @@
 SELECT
     nspname
 FROM
-    pg_namespace
+    pg_catalog.pg_namespace
 WHERE
     oid = {{ scid }}::oid;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/get_types.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/get_types.sql
index 2a5582ee9..ed340f529 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/get_types.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/get_types.sql
@@ -2,13 +2,13 @@ SELECT
     *
 FROM
     (SELECT
-        format_type(t.oid,NULL) AS typname,
+        pg_catalog.format_type(t.oid,NULL) AS typname,
         CASE WHEN typelem > 0 THEN typelem ELSE t.oid END as elemoid, typlen, typtype, t.oid, nspname,
-        (SELECT COUNT(1) FROM pg_type t2 WHERE t2.typname = t.typname) > 1 AS isdup
+        (SELECT COUNT(1) FROM pg_catalog.pg_type t2 WHERE t2.typname = t.typname) > 1 AS isdup
     FROM
-        pg_type t
+        pg_catalog.pg_type t
     JOIN
-        pg_namespace nsp ON typnamespace=nsp.oid
+        pg_catalog.pg_namespace nsp ON typnamespace=nsp.oid
     WHERE
         (NOT (typname = 'unknown' AND nspname = 'pg_catalog'))
     AND
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/node.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/node.sql
index bd2b56048..e695f0808 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/node.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/node.sql
@@ -1,14 +1,14 @@
 SELECT
     pr.oid, pr.proname || '()' as name,
-    lanname, pg_get_userbyid(proowner) as funcowner, description
+    lanname, pg_catalog.pg_get_userbyid(proowner) as funcowner, description
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 LEFT OUTER JOIN
-    pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass)
+    pg_catalog.pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass)
 WHERE
     proisagg = FALSE
 {% if fnid %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/properties.sql
index c06915ada..9679f2c06 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/properties.sql
@@ -3,26 +3,26 @@ SELECT
     pr.pronamespace, pr.prolang, pr.procost, pr.prorows,
     pr.prosecdef, pr.proleakproof, pr.proisstrict, pr.proretset, pr.provolatile,
     pr.pronargs, pr.prorettype, pr.proallargtypes, pr.proargmodes, pr.probin, pr.proacl,
-    pr.proname, pr.proname AS name, pg_get_function_result(pr.oid) AS prorettypename,
-    typns.nspname AS typnsp, lanname, proargnames, oidvectortypes(proargtypes) AS proargtypenames,
-    pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
-    pronargdefaults, proconfig, pg_get_userbyid(proowner) AS funcowner, description,
+    pr.proname, pr.proname AS name, pg_catalog.pg_get_function_result(pr.oid) AS prorettypename,
+    typns.nspname AS typnsp, lanname, proargnames, pg_catalog.oidvectortypes(proargtypes) AS proargtypenames,
+    pg_catalog.pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
+    pronargdefaults, proconfig, pg_catalog.pg_get_userbyid(proowner) AS funcowner, description,
     (SELECT
-        array_agg(provider || '=' || label)
+        pg_catalog.array_agg(provider || '=' || label)
     FROM
-        pg_seclabel sl1
+        pg_catalog.pg_seclabel sl1
     WHERE
         sl1.objoid=pr.oid) AS seclabels
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_namespace typns ON typns.oid=typ.typnamespace
+    pg_catalog.pg_namespace typns ON typns.oid=typ.typnamespace
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 LEFT OUTER JOIN
-    pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass and des.objsubid = 0)
+    pg_catalog.pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass and des.objsubid = 0)
 WHERE
     proisagg = FALSE
     AND typname IN ('trigger', 'event_trigger')
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/stats.sql
index 2e276b65a..e4b99e467 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/stats.sql
@@ -3,6 +3,6 @@ SELECT
     total_time AS {{ conn|qtIdent(_('Total time')) }},
     self_time AS {{ conn|qtIdent(_('Self time')) }}
 FROM
-    pg_stat_user_functions
+    pg_catalog.pg_stat_user_functions
 WHERE
     funcid = {{fnid}}::OID
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/variables.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/variables.sql
index 5233c71ec..c75e5b47f 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/variables.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/pg/sql/default/variables.sql
@@ -1,6 +1,6 @@
 SELECT
     name, vartype, min_val, max_val, enumvals
 FROM
-    pg_settings
+    pg_catalog.pg_settings
 WHERE
     context in ('user', 'superuser');
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/11_plus/coll_stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/11_plus/coll_stats.sql
index 9879f43ee..e120e0d2a 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/11_plus/coll_stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/11_plus/coll_stats.sql
@@ -4,15 +4,15 @@ SELECT
     total_time AS {{ conn|qtIdent(_('Total time')) }},
     self_time AS {{ conn|qtIdent(_('Self time')) }}
 FROM
-    pg_stat_user_functions
+    pg_catalog.pg_stat_user_functions
 WHERE
     schemaname = {{schema_name|qtLiteral}}
     AND funcid IN (
         SELECT p.oid
         FROM
-            pg_proc p
+            pg_catalog.pg_proc p
         JOIN
-            pg_type typ ON typ.oid=p.prorettype
+            pg_catalog.pg_type typ ON typ.oid=p.prorettype
         WHERE
             p.prokind IN ('f', 'w')
             AND typname IN ('trigger', 'event_trigger')
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/11_plus/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/11_plus/delete.sql
index f7f906b3b..4eb207cf2 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/11_plus/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/11_plus/delete.sql
@@ -4,11 +4,11 @@ SELECT
     .pg_get_function_identity_arguments(pr.oid), '') || ')' as func_args,
     nspname
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_namespace nsp ON nsp.oid=pr.pronamespace
+    pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
 WHERE
     pr.prokind IN ('f', 'w')
     AND pronamespace = {{scid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/11_plus/get_definition.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/11_plus/get_definition.sql
index ab25dbf99..9a4988778 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/11_plus/get_definition.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/11_plus/get_definition.sql
@@ -1,14 +1,14 @@
 SELECT
-    pg_get_functiondef({{fnid}}::oid) AS func_def,
+    pg_catalog.pg_get_functiondef({{fnid}}::oid) AS func_def,
     COALESCE(pg_catalog.pg_get_function_identity_arguments(pr.oid), '') as
     func_with_identity_arguments,
     nspname,
     pr.proname as proname,
     COALESCE(pg_catalog.pg_get_function_arguments(pr.oid), '') as func_args
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_namespace nsp ON nsp.oid=pr.pronamespace
+    pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
 WHERE
     pr.prokind IN ('f', 'w')
     AND pronamespace = {{scid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/11_plus/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/11_plus/get_oid.sql
index 413df9128..53bc02b24 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/11_plus/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/11_plus/get_oid.sql
@@ -1,15 +1,15 @@
 SELECT
     pr.oid, pr.proname || '(' || COALESCE(pg_catalog
     .pg_get_function_identity_arguments(pr.oid), '') || ')' as name,
-    lanname, pg_get_userbyid(proowner) as funcowner, pr.pronamespace AS nsp
+    lanname, pg_catalog.pg_get_userbyid(proowner) as funcowner, pr.pronamespace AS nsp
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 JOIN
-    pg_namespace nsp ON nsp.oid=pr.pronamespace
+    pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
     AND nsp.nspname={{ nspname|qtLiteral }}
 WHERE
     pr.prokind IN ('f', 'w')
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/11_plus/node.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/11_plus/node.sql
index 70119f4f7..5d3081c23 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/11_plus/node.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/11_plus/node.sql
@@ -1,14 +1,14 @@
 SELECT
     pr.oid, pr.proname || '()' AS name,
-    lanname, pg_get_userbyid(proowner) AS funcowner, description
+    lanname, pg_catalog.pg_get_userbyid(proowner) AS funcowner, description
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 LEFT OUTER JOIN
-    pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass)
+    pg_catalog.pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass)
 WHERE
     pr.prokind IN ('f', 'w')
 {% if fnid %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/11_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/11_plus/properties.sql
index d29507910..8aafa7c71 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/11_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/11_plus/properties.sql
@@ -4,26 +4,26 @@ SELECT
     pr.prosrc, pr.prosrc AS prosrc_c, pr.pronamespace, pr.prolang, pr.procost, pr.prorows, pr.prokind,
     pr.prosecdef, pr.proleakproof, pr.proisstrict, pr.proretset, pr.provolatile, pr.proparallel,
     pr.pronargs, pr.prorettype, pr.proallargtypes, pr.proargmodes, pr.probin, pr.proacl,
-    pr.proname, pr.proname AS name, pg_get_function_result(pr.oid) AS prorettypename,
-    typns.nspname AS typnsp, lanname, proargnames, oidvectortypes(proargtypes) AS proargtypenames,
-    pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
-    pr.pronargdefaults, proconfig, pg_get_userbyid(proowner) AS funcowner, description,
+    pr.proname, pr.proname AS name, pg_catalog.pg_get_function_result(pr.oid) AS prorettypename,
+    typns.nspname AS typnsp, lanname, proargnames, pg_catalog.oidvectortypes(proargtypes) AS proargtypenames,
+    pg_catalog.pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
+    pr.pronargdefaults, proconfig, pg_catalog.pg_get_userbyid(proowner) AS funcowner, description,
     (SELECT
-        array_agg(provider || '=' || label)
+        pg_catalog.array_agg(provider || '=' || label)
     FROM
-        pg_seclabel sl1
+        pg_catalog.pg_seclabel sl1
     WHERE
         sl1.objoid=pr.oid) AS seclabels
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_namespace typns ON typns.oid=typ.typnamespace
+    pg_catalog.pg_namespace typns ON typns.oid=typ.typnamespace
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 LEFT OUTER JOIN
-    pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass and des.objsubid = 0)
+    pg_catalog.pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass and des.objsubid = 0)
 WHERE
     pr.prokind IN ('f', 'w')
     AND typname IN ('trigger', 'event_trigger') AND lanname != 'edbspl'
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/9.2_plus/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/9.2_plus/delete.sql
index f781a6ee3..87eb7b3fd 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/9.2_plus/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/9.2_plus/delete.sql
@@ -4,11 +4,11 @@ SELECT
     .pg_get_function_identity_arguments(pr.oid), '') || ')' as func_args,
     nspname
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_namespace nsp ON nsp.oid=pr.pronamespace
+    pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
 WHERE
     proisagg = FALSE
     AND pronamespace = {{scid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/9.2_plus/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/9.2_plus/get_oid.sql
index 71bf1916d..86a720aac 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/9.2_plus/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/9.2_plus/get_oid.sql
@@ -1,15 +1,15 @@
 SELECT
     pr.oid, pr.proname || '(' || COALESCE(pg_catalog
     .pg_get_function_identity_arguments(pr.oid), '') || ')' as name,
-    lanname, pg_get_userbyid(proowner) as funcowner, pr.pronamespace AS nsp
+    lanname, pg_catalog.pg_get_userbyid(proowner) as funcowner, pr.pronamespace AS nsp
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 JOIN
-    pg_namespace nsp ON nsp.oid=pr.pronamespace
+    pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
     AND nsp.nspname={{ nspname|qtLiteral }}
 WHERE
     proisagg = FALSE
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/9.2_plus/node.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/9.2_plus/node.sql
index 70b83b20f..026c09899 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/9.2_plus/node.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/9.2_plus/node.sql
@@ -1,14 +1,14 @@
 SELECT
     pr.oid, pr.proname || '()' AS name,
-    lanname, pg_get_userbyid(proowner) AS funcowner, description
+    lanname, pg_catalog.pg_get_userbyid(proowner) AS funcowner, description
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 LEFT OUTER JOIN
-    pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass)
+    pg_catalog.pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass)
 WHERE
     proisagg = FALSE
 {% if fnid %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/9.2_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/9.2_plus/properties.sql
index c06915ada..9679f2c06 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/9.2_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/9.2_plus/properties.sql
@@ -3,26 +3,26 @@ SELECT
     pr.pronamespace, pr.prolang, pr.procost, pr.prorows,
     pr.prosecdef, pr.proleakproof, pr.proisstrict, pr.proretset, pr.provolatile,
     pr.pronargs, pr.prorettype, pr.proallargtypes, pr.proargmodes, pr.probin, pr.proacl,
-    pr.proname, pr.proname AS name, pg_get_function_result(pr.oid) AS prorettypename,
-    typns.nspname AS typnsp, lanname, proargnames, oidvectortypes(proargtypes) AS proargtypenames,
-    pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
-    pronargdefaults, proconfig, pg_get_userbyid(proowner) AS funcowner, description,
+    pr.proname, pr.proname AS name, pg_catalog.pg_get_function_result(pr.oid) AS prorettypename,
+    typns.nspname AS typnsp, lanname, proargnames, pg_catalog.oidvectortypes(proargtypes) AS proargtypenames,
+    pg_catalog.pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
+    pronargdefaults, proconfig, pg_catalog.pg_get_userbyid(proowner) AS funcowner, description,
     (SELECT
-        array_agg(provider || '=' || label)
+        pg_catalog.array_agg(provider || '=' || label)
     FROM
-        pg_seclabel sl1
+        pg_catalog.pg_seclabel sl1
     WHERE
         sl1.objoid=pr.oid) AS seclabels
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_namespace typns ON typns.oid=typ.typnamespace
+    pg_catalog.pg_namespace typns ON typns.oid=typ.typnamespace
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 LEFT OUTER JOIN
-    pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass and des.objsubid = 0)
+    pg_catalog.pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass and des.objsubid = 0)
 WHERE
     proisagg = FALSE
     AND typname IN ('trigger', 'event_trigger')
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/9.5_plus/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/9.5_plus/delete.sql
index cdf93c8e5..42bd27f66 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/9.5_plus/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/9.5_plus/delete.sql
@@ -4,11 +4,11 @@ SELECT
     .pg_get_function_identity_arguments(pr.oid), '') || ')' as func_args,
     nspname
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_namespace nsp ON nsp.oid=pr.pronamespace
+    pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
 WHERE
     proisagg = FALSE
     AND pronamespace = {{scid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/acl.sql
index ebbbe7d56..39ffe09a4 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/acl.sql
@@ -1,7 +1,7 @@
 SELECT
     COALESCE(gt.rolname, 'PUBLIC') AS grantee,
-    g.rolname AS grantor, array_agg(privilege_type) AS privileges,
-    array_agg(is_grantable) AS grantable
+    g.rolname AS grantor, pg_catalog.array_agg(privilege_type) AS privileges,
+    pg_catalog.array_agg(is_grantable) AS grantable
 FROM
     (SELECT
         d.grantee, d.grantor, d.is_grantable,
@@ -26,7 +26,7 @@ FROM
             (d).is_grantable AS is_grantable,
             (d).privilege_type AS privilege_type
         FROM
-            (SELECT aclexplode(db.proacl) AS d FROM pg_proc db
+            (SELECT pg_catalog.aclexplode(db.proacl) AS d FROM pg_proc db
             WHERE db.oid = {{fnid}}::OID) a ORDER BY privilege_type
         ) d
     ) d
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/coll_stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/coll_stats.sql
index ae5815e9e..8141d8c1c 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/coll_stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/coll_stats.sql
@@ -4,17 +4,17 @@ SELECT
     total_time AS {{ conn|qtIdent(_('Total time')) }},
     self_time AS {{ conn|qtIdent(_('Self time')) }}
 FROM
-    pg_stat_user_functions
+    pg_catalog.pg_stat_user_functions
 WHERE
     schemaname = {{schema_name|qtLiteral}}
     AND funcid IN (
         SELECT p.oid
         FROM
-            pg_proc p
+            pg_catalog.pg_proc p
         JOIN
-            pg_type typ ON typ.oid=p.prorettype
+            pg_catalog.pg_type typ ON typ.oid=p.prorettype
         WHERE
             p.proisagg = FALSE
             AND typname = 'trigger'
     )
-ORDER BY funcname;
\ No newline at end of file
+ORDER BY funcname;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/delete.sql
index b005e536e..9a6bb430d 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/delete.sql
@@ -4,11 +4,11 @@ SELECT
     .pg_get_function_identity_arguments(pr.oid), '') || ')' as func_args,
     nspname
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_namespace nsp ON nsp.oid=pr.pronamespace
+    pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
 WHERE
     proisagg = FALSE
     AND pronamespace = {{scid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/get_definition.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/get_definition.sql
index 5e5baef9f..083e294f6 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/get_definition.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/get_definition.sql
@@ -1,14 +1,14 @@
 SELECT
-    pg_get_functiondef({{fnid}}::oid) AS func_def,
+    pg_catalog.pg_get_functiondef({{fnid}}::oid) AS func_def,
     COALESCE(pg_catalog.pg_get_function_identity_arguments(pr.oid), '') as
     func_with_identity_arguments,
     nspname,
     pr.proname as proname,
     COALESCE(pg_catalog.pg_get_function_arguments(pr.oid), '') as func_args
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_namespace nsp ON nsp.oid=pr.pronamespace
+    pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
 WHERE
     proisagg = FALSE
     AND pronamespace = {{scid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/get_languages.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/get_languages.sql
index f81ddfbda..2843741f4 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/get_languages.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/get_languages.sql
@@ -1,4 +1,4 @@
 SELECT
     lanname as label, lanname as value
 FROM
-    pg_language;
+    pg_catalog.pg_language;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/get_oid.sql
index 72c8b49ea..f0e279c55 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/get_oid.sql
@@ -1,15 +1,15 @@
 SELECT
     pr.oid, pr.proname || '(' || COALESCE(pg_catalog
     .pg_get_function_identity_arguments(pr.oid), '') || ')' as name,
-    lanname, pg_get_userbyid(proowner) as funcowner, pr.pronamespace AS nsp
+    lanname, pg_catalog.pg_get_userbyid(proowner) as funcowner, pr.pronamespace AS nsp
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 JOIN
-    pg_namespace nsp ON nsp.oid=pr.pronamespace
+    pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
     AND nsp.nspname={{ nspname|qtLiteral }}
 WHERE
     proisagg = FALSE
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/get_out_types.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/get_out_types.sql
index 64a11875f..3c51e31db 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/get_out_types.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/get_out_types.sql
@@ -1,6 +1,6 @@
 SELECT
     format_type(oid, NULL) AS out_arg_type
 FROM
-    pg_type
+    pg_catalog.pg_type
 WHERE
     oid = {{ out_arg_oid }}::oid;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/get_schema.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/get_schema.sql
index 127d4b9db..2d77757ea 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/get_schema.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/get_schema.sql
@@ -1,6 +1,6 @@
 SELECT
     nspname
 FROM
-    pg_namespace
+    pg_catalog.pg_namespace
 WHERE
     oid = {{ scid }}::oid;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/get_types.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/get_types.sql
index 2a5582ee9..ed340f529 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/get_types.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/get_types.sql
@@ -2,13 +2,13 @@ SELECT
     *
 FROM
     (SELECT
-        format_type(t.oid,NULL) AS typname,
+        pg_catalog.format_type(t.oid,NULL) AS typname,
         CASE WHEN typelem > 0 THEN typelem ELSE t.oid END as elemoid, typlen, typtype, t.oid, nspname,
-        (SELECT COUNT(1) FROM pg_type t2 WHERE t2.typname = t.typname) > 1 AS isdup
+        (SELECT COUNT(1) FROM pg_catalog.pg_type t2 WHERE t2.typname = t.typname) > 1 AS isdup
     FROM
-        pg_type t
+        pg_catalog.pg_type t
     JOIN
-        pg_namespace nsp ON typnamespace=nsp.oid
+        pg_catalog.pg_namespace nsp ON typnamespace=nsp.oid
     WHERE
         (NOT (typname = 'unknown' AND nspname = 'pg_catalog'))
     AND
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/node.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/node.sql
index a14a20d26..9c7e998c3 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/node.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/node.sql
@@ -1,14 +1,14 @@
 SELECT
     pr.oid, pr.proname || '()' AS name,
-    lanname, pg_get_userbyid(proowner) AS funcowner, description
+    lanname, pg_catalog.pg_get_userbyid(proowner) AS funcowner, description
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 LEFT OUTER JOIN
-    pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass)
+    pg_catalog.pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass)
 WHERE
     proisagg = FALSE
 {% if fnid %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/properties.sql
index c06915ada..9679f2c06 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/properties.sql
@@ -3,26 +3,26 @@ SELECT
     pr.pronamespace, pr.prolang, pr.procost, pr.prorows,
     pr.prosecdef, pr.proleakproof, pr.proisstrict, pr.proretset, pr.provolatile,
     pr.pronargs, pr.prorettype, pr.proallargtypes, pr.proargmodes, pr.probin, pr.proacl,
-    pr.proname, pr.proname AS name, pg_get_function_result(pr.oid) AS prorettypename,
-    typns.nspname AS typnsp, lanname, proargnames, oidvectortypes(proargtypes) AS proargtypenames,
-    pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
-    pronargdefaults, proconfig, pg_get_userbyid(proowner) AS funcowner, description,
+    pr.proname, pr.proname AS name, pg_catalog.pg_get_function_result(pr.oid) AS prorettypename,
+    typns.nspname AS typnsp, lanname, proargnames, pg_catalog.oidvectortypes(proargtypes) AS proargtypenames,
+    pg_catalog.pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
+    pronargdefaults, proconfig, pg_catalog.pg_get_userbyid(proowner) AS funcowner, description,
     (SELECT
-        array_agg(provider || '=' || label)
+        pg_catalog.array_agg(provider || '=' || label)
     FROM
-        pg_seclabel sl1
+        pg_catalog.pg_seclabel sl1
     WHERE
         sl1.objoid=pr.oid) AS seclabels
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_namespace typns ON typns.oid=typ.typnamespace
+    pg_catalog.pg_namespace typns ON typns.oid=typ.typnamespace
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 LEFT OUTER JOIN
-    pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass and des.objsubid = 0)
+    pg_catalog.pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass and des.objsubid = 0)
 WHERE
     proisagg = FALSE
     AND typname IN ('trigger', 'event_trigger')
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/stats.sql
index 2e276b65a..e4b99e467 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/stats.sql
@@ -3,6 +3,6 @@ SELECT
     total_time AS {{ conn|qtIdent(_('Total time')) }},
     self_time AS {{ conn|qtIdent(_('Self time')) }}
 FROM
-    pg_stat_user_functions
+    pg_catalog.pg_stat_user_functions
 WHERE
     funcid = {{fnid}}::OID
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/variables.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/variables.sql
index 5233c71ec..c75e5b47f 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/variables.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_functions/ppas/sql/default/variables.sql
@@ -1,6 +1,6 @@
 SELECT
     name, vartype, min_val, max_val, enumvals
 FROM
-    pg_settings
+    pg_catalog.pg_settings
 WHERE
     context in ('user', 'superuser');
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbfuncs/ppas/11_plus/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbfuncs/ppas/11_plus/get_oid.sql
index 8908a2738..fda417214 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbfuncs/ppas/11_plus/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbfuncs/ppas/11_plus/get_oid.sql
@@ -1,15 +1,15 @@
 SELECT
     pr.oid, pr.proname || '(' || COALESCE(pg_catalog
     .pg_get_function_identity_arguments(pr.oid), '') || ')' as name,
-    lanname, pg_get_userbyid(proowner) as funcowner
+    lanname, pg_catalog.pg_get_userbyid(proowner) as funcowner
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 JOIN
-    pg_namespace nsp ON nsp.oid=pr.pronamespace
+    pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
     AND nsp.nspname={{ nspname|qtLiteral }}
 WHERE
     pr.prokind IN ('f', 'w')
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbfuncs/ppas/11_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbfuncs/ppas/11_plus/properties.sql
index cbef08eea..78572e40c 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbfuncs/ppas/11_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbfuncs/ppas/11_plus/properties.sql
@@ -4,19 +4,19 @@ SELECT  pg_proc.oid,
         proallargtypes,
         proargnames AS argnames,
         pronargdefaults,
-        oidvectortypes(proargtypes) AS proargtypenames,
+        pg_catalog.oidvectortypes(proargtypes) AS proargtypenames,
         proargdeclaredmodes AS proargmodes,
         proargnames,
-        pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
-        pg_get_userbyid(proowner) AS funcowner,
-        pg_get_function_result(pg_proc.oid) AS prorettypename,
+        pg_catalog.pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
+        pg_catalog.pg_get_userbyid(proowner) AS funcowner,
+        pg_catalog.pg_get_function_result(pg_proc.oid) AS prorettypename,
         prosrc,
         lanname,
         CASE
         WHEN proaccess = '+' THEN 'Public'
         WHEN proaccess = '-' THEN 'Private'
         ELSE 'Unknown' END AS visibility
-FROM pg_proc, pg_namespace, pg_language lng
+FROM pg_catalog.pg_proc, pg_catalog.pg_namespace, pg_catalog.pg_language lng
 WHERE prokind IN ('f', 'w')
 AND pronamespace = {{pkgid}}::oid
 AND pg_proc.pronamespace = pg_namespace.oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbfuncs/ppas/default/get_body.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbfuncs/ppas/default/get_body.sql
index d82e09f51..822d22d7e 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbfuncs/ppas/default/get_body.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbfuncs/ppas/default/get_body.sql
@@ -1 +1 @@
-SELECT pg_get_functiondef({{edbfnid}}::oid) AS funcdef;
+SELECT pg_catalog.pg_get_functiondef({{edbfnid}}::oid) AS funcdef;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbfuncs/ppas/default/get_name.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbfuncs/ppas/default/get_name.sql
index 7410b7173..003d8e8f7 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbfuncs/ppas/default/get_name.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbfuncs/ppas/default/get_name.sql
@@ -1,3 +1,3 @@
 SELECT  proname AS name
-FROM pg_proc
+FROM pg_catalog.pg_proc
 WHERE oid = {{edbfnid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbfuncs/ppas/default/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbfuncs/ppas/default/get_oid.sql
index 2bc76a2e4..0ffbaf1be 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbfuncs/ppas/default/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbfuncs/ppas/default/get_oid.sql
@@ -1,15 +1,15 @@
 SELECT
     pr.oid, pr.proname || '(' || COALESCE(pg_catalog
     .pg_get_function_identity_arguments(pr.oid), '') || ')' as name,
-    lanname, pg_get_userbyid(proowner) as funcowner
+    lanname, pg_catalog.pg_get_userbyid(proowner) as funcowner
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 JOIN
-    pg_namespace nsp ON nsp.oid=pr.pronamespace
+    pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
     AND nsp.nspname={{ nspname|qtLiteral }}
 WHERE
     proisagg = FALSE
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbfuncs/ppas/default/get_schema.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbfuncs/ppas/default/get_schema.sql
index 127d4b9db..2d77757ea 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbfuncs/ppas/default/get_schema.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbfuncs/ppas/default/get_schema.sql
@@ -1,6 +1,6 @@
 SELECT
     nspname
 FROM
-    pg_namespace
+    pg_catalog.pg_namespace
 WHERE
     oid = {{ scid }}::oid;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbfuncs/ppas/default/node.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbfuncs/ppas/default/node.sql
index a7d00be58..a9f2623f7 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbfuncs/ppas/default/node.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbfuncs/ppas/default/node.sql
@@ -1,7 +1,7 @@
 SELECT  pg_proc.oid,
         pg_proc.proname || '(' || COALESCE(pg_catalog.pg_get_function_identity_arguments(pg_proc.oid), '') || ')' AS name,
-        pg_get_userbyid(proowner) AS funcowner
-FROM pg_proc, pg_namespace
+        pg_catalog.pg_get_userbyid(proowner) AS funcowner
+FROM pg_catalog.pg_proc, pg_catalog.pg_namespace
 WHERE protype = '0'::char
 {% if fnid %}
 AND pg_proc.oid = {{ fnid|qtLiteral }}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbfuncs/ppas/default/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbfuncs/ppas/default/properties.sql
index dcc540df0..250115238 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbfuncs/ppas/default/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbfuncs/ppas/default/properties.sql
@@ -4,19 +4,19 @@ SELECT  pg_proc.oid,
         proallargtypes,
         proargnames AS argnames,
         pronargdefaults,
-        oidvectortypes(proargtypes) AS proargtypenames,
+        pg_catalog.oidvectortypes(proargtypes) AS proargtypenames,
         proargdeclaredmodes AS proargmodes,
         proargnames,
-        pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
-        pg_get_userbyid(proowner) AS funcowner,
-        pg_get_function_result(pg_proc.oid) AS prorettypename,
+        pg_catalog.pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
+        pg_catalog.pg_get_userbyid(proowner) AS funcowner,
+        pg_catalog.pg_get_function_result(pg_proc.oid) AS prorettypename,
         prosrc,
         lanname,
         CASE
         WHEN proaccess = '+' THEN 'Public'
         WHEN proaccess = '-' THEN 'Private'
         ELSE 'Unknown' END AS visibility
-FROM pg_proc, pg_namespace, pg_language lng
+FROM pg_catalog.pg_proc, pg_catalog.pg_namespace, pg_catalog.pg_language lng
 WHERE protype = '0'::char
 AND pronamespace = {{pkgid}}::oid
 AND pg_proc.pronamespace = pg_namespace.oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbfuncs/ppas/default/stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbfuncs/ppas/default/stats.sql
index 2e276b65a..e4b99e467 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbfuncs/ppas/default/stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbfuncs/ppas/default/stats.sql
@@ -3,6 +3,6 @@ SELECT
     total_time AS {{ conn|qtIdent(_('Total time')) }},
     self_time AS {{ conn|qtIdent(_('Self time')) }}
 FROM
-    pg_stat_user_functions
+    pg_catalog.pg_stat_user_functions
 WHERE
     funcid = {{fnid}}::OID
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbprocs/ppas/11_plus/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbprocs/ppas/11_plus/get_oid.sql
index acd5069a6..5235eba39 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbprocs/ppas/11_plus/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbprocs/ppas/11_plus/get_oid.sql
@@ -1,15 +1,15 @@
 SELECT
     pr.oid, pr.proname || '(' || COALESCE(pg_catalog
     .pg_get_function_identity_arguments(pr.oid), '') || ')' as name,
-    lanname, pg_get_userbyid(proowner) as funcowner
+    lanname, pg_catalog.pg_get_userbyid(proowner) as funcowner
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 JOIN
-    pg_namespace nsp ON nsp.oid=pr.pronamespace
+    pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
     AND nsp.nspname={{ nspname|qtLiteral }}
 WHERE
     pr.prokind = 'p'
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbprocs/ppas/11_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbprocs/ppas/11_plus/properties.sql
index 895fda383..5f25b0af1 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbprocs/ppas/11_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbprocs/ppas/11_plus/properties.sql
@@ -4,19 +4,19 @@ SELECT  pg_proc.oid,
         proallargtypes,
         proargnames AS argnames,
         pronargdefaults,
-        oidvectortypes(proargtypes) AS proargtypenames,
+        pg_catalog.oidvectortypes(proargtypes) AS proargtypenames,
         proargdeclaredmodes AS proargmodes,
         proargnames,
-        pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
-        pg_get_userbyid(proowner) AS funcowner,
-        pg_get_function_result(pg_proc.oid) AS prorettypename,
+        pg_catalog.pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
+        pg_catalog.pg_get_userbyid(proowner) AS funcowner,
+        pg_catalog.pg_get_function_result(pg_proc.oid) AS prorettypename,
         prosrc,
         lanname,
         CASE
         WHEN proaccess = '+' THEN 'Public'
         WHEN proaccess = '-' THEN 'Private'
         ELSE 'Unknown' END AS visibility
-FROM pg_proc, pg_namespace, pg_language lng
+FROM pg_catalog.pg_proc, pg_catalog.pg_namespace, pg_catalog.pg_language lng
 WHERE prokind = 'p'
 AND pronamespace = {{pkgid}}::oid
 AND pg_proc.pronamespace = pg_namespace.oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbprocs/ppas/default/get_body.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbprocs/ppas/default/get_body.sql
index d82e09f51..822d22d7e 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbprocs/ppas/default/get_body.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbprocs/ppas/default/get_body.sql
@@ -1 +1 @@
-SELECT pg_get_functiondef({{edbfnid}}::oid) AS funcdef;
+SELECT pg_catalog.pg_get_functiondef({{edbfnid}}::oid) AS funcdef;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbprocs/ppas/default/get_name.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbprocs/ppas/default/get_name.sql
index 7410b7173..003d8e8f7 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbprocs/ppas/default/get_name.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbprocs/ppas/default/get_name.sql
@@ -1,3 +1,3 @@
 SELECT  proname AS name
-FROM pg_proc
+FROM pg_catalog.pg_proc
 WHERE oid = {{edbfnid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbprocs/ppas/default/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbprocs/ppas/default/get_oid.sql
index 2bc76a2e4..0ffbaf1be 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbprocs/ppas/default/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbprocs/ppas/default/get_oid.sql
@@ -1,15 +1,15 @@
 SELECT
     pr.oid, pr.proname || '(' || COALESCE(pg_catalog
     .pg_get_function_identity_arguments(pr.oid), '') || ')' as name,
-    lanname, pg_get_userbyid(proowner) as funcowner
+    lanname, pg_catalog.pg_get_userbyid(proowner) as funcowner
 FROM
-    pg_proc pr
+    pg_catalog.pg_proc pr
 JOIN
-    pg_type typ ON typ.oid=prorettype
+    pg_catalog.pg_type typ ON typ.oid=prorettype
 JOIN
-    pg_language lng ON lng.oid=prolang
+    pg_catalog.pg_language lng ON lng.oid=prolang
 JOIN
-    pg_namespace nsp ON nsp.oid=pr.pronamespace
+    pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
     AND nsp.nspname={{ nspname|qtLiteral }}
 WHERE
     proisagg = FALSE
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbprocs/ppas/default/get_schema.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbprocs/ppas/default/get_schema.sql
index 127d4b9db..2d77757ea 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbprocs/ppas/default/get_schema.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbprocs/ppas/default/get_schema.sql
@@ -1,6 +1,6 @@
 SELECT
     nspname
 FROM
-    pg_namespace
+    pg_catalog.pg_namespace
 WHERE
     oid = {{ scid }}::oid;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbprocs/ppas/default/node.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbprocs/ppas/default/node.sql
index 4aabd45e5..f0c11211d 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbprocs/ppas/default/node.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbprocs/ppas/default/node.sql
@@ -1,7 +1,7 @@
 SELECT  pg_proc.oid,
         pg_proc.proname || '(' || COALESCE(pg_catalog.pg_get_function_identity_arguments(pg_proc.oid), '') || ')' AS name,
-        pg_get_userbyid(proowner) AS funcowner
-FROM pg_proc, pg_namespace
+        pg_catalog.pg_get_userbyid(proowner) AS funcowner
+FROM pg_catalog.pg_proc, pg_catalog.pg_namespace
 WHERE protype = '1'::char
 {% if fnid %}
 AND pg_proc.oid = {{ fnid|qtLiteral }}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbprocs/ppas/default/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbprocs/ppas/default/properties.sql
index fb90c34ba..2b39afe70 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbprocs/ppas/default/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbprocs/ppas/default/properties.sql
@@ -7,16 +7,16 @@ SELECT  pg_proc.oid,
         oidvectortypes(proargtypes) AS proargtypenames,
         proargmodes,
         proargnames,
-        pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
-        pg_get_userbyid(proowner) AS funcowner,
-        pg_get_function_result(pg_proc.oid) AS prorettypename,
+        pg_catalog.pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
+        pg_catalog.pg_get_userbyid(proowner) AS funcowner,
+        pg_catalog.pg_get_function_result(pg_proc.oid) AS prorettypename,
         prosrc,
         lanname,
         CASE
         WHEN proaccess = '+' THEN 'Public'
         WHEN proaccess = '-' THEN 'Private'
         ELSE 'Unknown' END AS visibility
-FROM pg_proc, pg_namespace, pg_language lng
+FROM pg_catalog.pg_proc, pg_catalog.pg_namespace, pg_catalog.pg_language lng
 WHERE protype = '1'::char
 AND pronamespace = {{pkgid}}::oid
 AND pg_proc.pronamespace = pg_namespace.oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbprocs/ppas/default/stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbprocs/ppas/default/stats.sql
index 2e276b65a..e4b99e467 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbprocs/ppas/default/stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbfuncs/templates/edbprocs/ppas/default/stats.sql
@@ -3,6 +3,6 @@ SELECT
     total_time AS {{ conn|qtIdent(_('Total time')) }},
     self_time AS {{ conn|qtIdent(_('Self time')) }}
 FROM
-    pg_stat_user_functions
+    pg_catalog.pg_stat_user_functions
 WHERE
     funcid = {{fnid}}::OID
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbvars/templates/edbvars/ppas/node.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbvars/templates/edbvars/ppas/node.sql
index cab8232b6..83c7aec0c 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbvars/templates/edbvars/ppas/node.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbvars/templates/edbvars/ppas/node.sql
@@ -1,6 +1,6 @@
 SELECT  oid,
         varname AS name
-FROM edb_variable
+FROM pg_catalog.edb_variable
 WHERE varpackage = {{pkgid}}::oid
 {% if varid %}
 AND oid = {{ varid|qtLiteral }}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbvars/templates/edbvars/ppas/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbvars/templates/edbvars/ppas/properties.sql
index 2c00e0375..650882e91 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbvars/templates/edbvars/ppas/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/edbvars/templates/edbvars/ppas/properties.sql
@@ -1,11 +1,11 @@
 SELECT  oid,
         varname AS name,
-        format_type(vartype, NULL) as datatype,
+        pg_catalog.format_type(vartype, NULL) as datatype,
         CASE
         WHEN varaccess = '+' THEN 'Public'
         WHEN varaccess = '-' THEN 'Private'
         ELSE 'Unknown' END AS visibility
-FROM edb_variable
+FROM pg_catalog.edb_variable
 WHERE varpackage = {{pkgid}}::oid
 {% if varid %}
 AND oid = {{varid}}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/12_plus/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/12_plus/nodes.sql
index 8b11b594a..b9535f085 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/12_plus/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/12_plus/nodes.sql
@@ -1,7 +1,7 @@
 SELECT
     nsp.oid, nspname AS name
 FROM
-    pg_namespace nsp
+    pg_catalog.pg_namespace nsp
 WHERE nspparent = {{scid}}::oid
 {% if pkgid %}
 AND nsp.oid = {{pkgid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/9.1_plus/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/9.1_plus/acl.sql
index 40a5fd03a..9c1bef1b3 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/9.1_plus/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/9.1_plus/acl.sql
@@ -1,4 +1,4 @@
-SELECT 'pkgacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor, array_agg(privilege_type) as privileges, array_agg(is_grantable) as grantable
+SELECT 'pkgacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor, pg_catalog.array_agg(privilege_type) as privileges, pg_catalog.array_agg(is_grantable) as grantable
 FROM
   (SELECT
     d.grantee, d.grantor, d.is_grantable,
@@ -19,12 +19,12 @@ FROM
     END AS privilege_type
   FROM
     (SELECT nspacl
-  FROM pg_namespace
+  FROM pg_catalog.pg_namespace
   WHERE nspparent = {{scid}}::oid
   AND oid = {{pkgid}}::oid
     ) acl,
     (SELECT (d).grantee AS grantee, (d).grantor AS grantor, (d).is_grantable
-        AS is_grantable, (d).privilege_type AS privilege_type FROM (SELECT aclexplode(nspacl) as d FROM pg_namespace
+        AS is_grantable, (d).privilege_type AS privilege_type FROM (SELECT pg_catalog.aclexplode(nspacl) as d FROM pg_catalog.pg_namespace
         WHERE nspparent = {{scid}}::oid
         AND oid = {{pkgid}}::oid) a ORDER BY privilege_type) d
     ) d
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/9.1_plus/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/9.1_plus/get_oid.sql
index 9931a115a..b4bb5e4c4 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/9.1_plus/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/9.1_plus/get_oid.sql
@@ -1,4 +1,4 @@
 SELECT nsp.oid
-FROM pg_namespace nsp
+FROM pg_catalog.pg_namespace nsp
 WHERE nspparent = {{scid}}::oid
-AND nspname = {{ name|qtLiteral }};
\ No newline at end of file
+AND nspname = {{ name|qtLiteral }};
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/9.1_plus/get_schema.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/9.1_plus/get_schema.sql
index 127d4b9db..2d77757ea 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/9.1_plus/get_schema.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/9.1_plus/get_schema.sql
@@ -1,6 +1,6 @@
 SELECT
     nspname
 FROM
-    pg_namespace
+    pg_catalog.pg_namespace
 WHERE
     oid = {{ scid }}::oid;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/9.1_plus/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/9.1_plus/nodes.sql
index a2606c7aa..a148c1b0f 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/9.1_plus/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/9.1_plus/nodes.sql
@@ -1,7 +1,7 @@
 SELECT
     nsp.oid, nspname AS name
 FROM
-    pg_namespace nsp
+    pg_catalog.pg_namespace nsp
 WHERE nspparent = {{scid}}::oid
 {% if pkgid %}
 AND nsp.oid = {{pkgid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/9.1_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/9.1_plus/properties.sql
index 85d5694c6..448d3b4de 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/9.1_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/9.1_plus/properties.sql
@@ -1,17 +1,17 @@
 SELECT nsp.oid, nsp.xmin, nspname AS name,
     pg_catalog.edb_get_packagebodydef(nsp.oid) AS pkgbodysrc,
     pg_catalog.edb_get_packageheaddef(nsp.oid) AS pkgheadsrc,
-    pg_get_userbyid(nspowner) AS owner,
-    array_to_string(nsp.nspacl::text[], ', ') as acl,
+    pg_catalog.pg_get_userbyid(nspowner) AS owner,
+    pg_catalog.array_to_string(nsp.nspacl::text[], ', ') as acl,
     description,
     CASE
       WHEN nspname LIKE E'pg\\_%' THEN true
       ELSE false
       END AS is_sys_object
-FROM pg_namespace nsp
-LEFT OUTER JOIN pg_description des ON (des.objoid=nsp.oid AND des.classoid='pg_namespace'::regclass)
+FROM pg_catalog.pg_namespace nsp
+LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=nsp.oid AND des.classoid='pg_namespace'::regclass)
 WHERE nspparent = {{scid}}::oid
 {% if pkgid %}
 AND nsp.oid = {{pkgid}}::oid
 {% endif %}
-ORDER BY nspname;
\ No newline at end of file
+ORDER BY nspname;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/9.2_plus/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/9.2_plus/acl.sql
index 7bbf16a96..4dd0185fb 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/9.2_plus/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/9.2_plus/acl.sql
@@ -1,4 +1,4 @@
-SELECT 'pkgacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor, array_agg(privilege_type) as privileges, array_agg(is_grantable) as grantable
+SELECT 'pkgacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor, pg_catalog.array_agg(privilege_type) as privileges, pg_catalog.array_agg(is_grantable) as grantable
 FROM
   (SELECT
     d.grantee, d.grantor, d.is_grantable,
@@ -19,13 +19,13 @@ FROM
     END AS privilege_type
   FROM
     (SELECT nspacl
-  FROM pg_namespace
+  FROM pg_catalog.pg_namespace
   WHERE nspparent = {{scid}}::oid
   AND oid = {{pkgid}}::oid
   AND nspobjecttype = 0
     ) acl,
     (SELECT (d).grantee AS grantee, (d).grantor AS grantor, (d).is_grantable
-        AS is_grantable, (d).privilege_type AS privilege_type FROM (SELECT aclexplode(nspacl) as d FROM pg_namespace
+        AS is_grantable, (d).privilege_type AS privilege_type FROM (SELECT pg_catalog.aclexplode(nspacl) as d FROM pg_catalog.pg_namespace
         WHERE nspparent = {{scid}}::oid
         AND oid = {{pkgid}}::oid
   AND nspobjecttype = 0) a ORDER BY privilege_type) d
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/9.2_plus/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/9.2_plus/get_oid.sql
index 5b4fd1dea..73a645870 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/9.2_plus/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/9.2_plus/get_oid.sql
@@ -1,5 +1,5 @@
 SELECT nsp.oid
-FROM pg_namespace nsp
+FROM pg_catalog.pg_namespace nsp
 WHERE nspparent = {{scid}}::oid
 AND nspname = {{ name|qtLiteral }}
-AND nspobjecttype = 0;
\ No newline at end of file
+AND nspobjecttype = 0;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/9.2_plus/get_schema.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/9.2_plus/get_schema.sql
index 127d4b9db..2d77757ea 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/9.2_plus/get_schema.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/9.2_plus/get_schema.sql
@@ -1,6 +1,6 @@
 SELECT
     nspname
 FROM
-    pg_namespace
+    pg_catalog.pg_namespace
 WHERE
     oid = {{ scid }}::oid;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/9.2_plus/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/9.2_plus/nodes.sql
index 0729883b5..2ea98bfdb 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/9.2_plus/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/9.2_plus/nodes.sql
@@ -1,7 +1,7 @@
 SELECT
     nsp.oid, nspname AS name
 FROM
-    pg_namespace nsp
+    pg_catalog.pg_namespace nsp
 WHERE nspparent = {{scid}}::oid
 {% if pkgid %}
 AND nsp.oid = {{pkgid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/9.2_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/9.2_plus/properties.sql
index 38975b12a..b572c8966 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/9.2_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/templates/packages/ppas/9.2_plus/properties.sql
@@ -1,18 +1,18 @@
 SELECT nsp.oid, nsp.xmin, nspname AS name,
     pg_catalog.edb_get_packagebodydef(nsp.oid) AS pkgbodysrc,
     pg_catalog.edb_get_packageheaddef(nsp.oid) AS pkgheadsrc,
-    pg_get_userbyid(nspowner) AS owner,
-    array_to_string(nsp.nspacl::text[], ', ') as acl,
+    pg_catalog.pg_get_userbyid(nspowner) AS owner,
+    pg_catalog.array_to_string(nsp.nspacl::text[], ', ') as acl,
     description,
     CASE
       WHEN nspname LIKE E'pg\\_%' THEN true
       ELSE false
       END AS is_sys_object
-FROM pg_namespace nsp
-LEFT OUTER JOIN pg_description des ON (des.objoid=nsp.oid AND des.classoid='pg_namespace'::regclass)
+FROM pg_catalog.pg_namespace nsp
+LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=nsp.oid AND des.classoid='pg_namespace'::regclass)
 WHERE nspparent = {{scid}}::oid
 {% if pkgid %}
 AND nsp.oid = {{pkgid}}::oid
 {% endif %}
 AND nspobjecttype = 0
-ORDER BY nspname;
\ No newline at end of file
+ORDER BY nspname;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequences/sql/10_plus/get_def.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequences/sql/10_plus/get_def.sql
index 91ca135d1..335b1fad6 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequences/sql/10_plus/get_def.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequences/sql/10_plus/get_def.sql
@@ -7,5 +7,5 @@ SELECT
     seqcycle AS is_cycled,
     seqincrement AS increment_by,
     is_called
-FROM pg_sequence, {{ conn|qtIdent(data.schema) }}.{{ conn|qtIdent(data.name) }}
+FROM pg_catalog.pg_sequence, {{ conn|qtIdent(data.schema) }}.{{ conn|qtIdent(data.name) }}
 WHERE seqrelid = {{data.oid}}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequences/sql/default/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequences/sql/default/acl.sql
index 1cd156772..1a4e6e864 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequences/sql/default/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequences/sql/default/acl.sql
@@ -1,4 +1,4 @@
-SELECT 'relacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor, array_agg(privilege_type) as privileges, array_agg(is_grantable) as grantable
+SELECT 'relacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor, pg_catalog.array_agg(privilege_type) as privileges, pg_catalog.array_agg(is_grantable) as grantable
 FROM
     (SELECT
         d.grantee, d.grantor, d.is_grantable,
@@ -18,9 +18,9 @@ FROM
         ELSE 'UNKNOWN'
         END AS privilege_type
     FROM
-        aclexplode((SELECT relacl
-            FROM pg_class cl
-            LEFT OUTER JOIN pg_description des ON (des.objoid=cl.oid AND des.classoid='pg_class'::regclass)
+        pg_catalog.aclexplode((SELECT relacl
+            FROM pg_catalog.pg_class cl
+            LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=cl.oid AND des.classoid='pg_class'::regclass)
             WHERE relkind = 'S' AND relnamespace  = {{scid}}::oid
             AND cl.oid = {{seid}}::oid )) d
         ) d
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequences/sql/default/backend_support.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequences/sql/default/backend_support.sql
index 1c8a83213..bf6c4b9e4 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequences/sql/default/backend_support.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequences/sql/default/backend_support.sql
@@ -1,15 +1,15 @@
 SELECT
     CASE WHEN nsp.nspname IN ('sys', 'dbo', 'information_schema') THEN true ELSE false END AS dbSupport
-FROM pg_namespace nsp
+FROM pg_catalog.pg_namespace nsp
 WHERE nsp.oid={{scid}}::oid AND (
     (nspname = 'pg_catalog' AND EXISTS
-        (SELECT 1 FROM pg_class WHERE relname = 'pg_class' AND relnamespace = nsp.oid LIMIT 1))
+        (SELECT 1 FROM pg_catalog.pg_class WHERE relname = 'pg_class' AND relnamespace = nsp.oid LIMIT 1))
     OR (nspname = 'pgagent' AND EXISTS
-	(SELECT 1 FROM pg_class WHERE relname = 'pga_job' AND relnamespace = nsp.oid LIMIT 1))
+	(SELECT 1 FROM pg_catalog.pg_class WHERE relname = 'pga_job' AND relnamespace = nsp.oid LIMIT 1))
     OR (nspname = 'information_schema' AND EXISTS
-	(SELECT 1 FROM pg_class WHERE relname = 'tables' AND relnamespace = nsp.oid LIMIT 1))
+	(SELECT 1 FROM pg_catalog.pg_class WHERE relname = 'tables' AND relnamespace = nsp.oid LIMIT 1))
     OR (nspname LIKE '_%' AND EXISTS
-	 (SELECT 1 FROM pg_proc WHERE proname='slonyversion' AND pronamespace = nsp.oid LIMIT 1))
+	 (SELECT 1 FROM pg_catalog.pg_proc WHERE proname='slonyversion' AND pronamespace = nsp.oid LIMIT 1))
     ) AND
     nspname NOT LIKE E'pg\\temp\\%' AND
-    nspname NOT LIKE E'pg\\toast_temp\\%'
\ No newline at end of file
+    nspname NOT LIKE E'pg\\toast_temp\\%'
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequences/sql/default/coll_stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequences/sql/default/coll_stats.sql
index 71d3c7059..5745d2834 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequences/sql/default/coll_stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequences/sql/default/coll_stats.sql
@@ -3,7 +3,7 @@ SELECT
     blks_read AS {{ conn|qtIdent(_('Blocks read')) }},
     blks_hit AS {{ conn|qtIdent(_('Blocks hit')) }}
 FROM
-    pg_statio_all_sequences
+    pg_catalog.pg_statio_all_sequences
 WHERE
     schemaname = {{ schema_name|qtLiteral }}
-ORDER BY relname;
\ No newline at end of file
+ORDER BY relname;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequences/sql/default/get_dependencies.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequences/sql/default/get_dependencies.sql
index 31812d294..d161b8f29 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequences/sql/default/get_dependencies.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequences/sql/default/get_dependencies.sql
@@ -3,10 +3,10 @@ SELECT
        ELSE ref.relname
     END AS refname,
     d2.refclassid, d1.deptype AS deptype
-FROM pg_depend d1
-    LEFT JOIN pg_depend d2 ON d1.objid=d2.objid AND d1.refobjid != d2.refobjid
-    LEFT JOIN pg_class ref ON ref.oid = d2.refobjid
-    LEFT JOIN pg_attribute att ON d2.refobjid=att.attrelid AND d2.refobjsubid=att.attnum
-WHERE d1.classid=(SELECT oid FROM pg_class WHERE relname='pg_attrdef')
-    AND d2.refobjid NOT IN (SELECT d3.refobjid FROM pg_depend d3 WHERE d3.objid=d1.refobjid)
-    AND d1.refobjid={{seid}}::oid
\ No newline at end of file
+FROM pg_catalog.pg_depend d1
+    LEFT JOIN pg_catalog.pg_depend d2 ON d1.objid=d2.objid AND d1.refobjid != d2.refobjid
+    LEFT JOIN pg_catalog.pg_class ref ON ref.oid = d2.refobjid
+    LEFT JOIN pg_catalog.pg_attribute att ON d2.refobjid=att.attrelid AND d2.refobjsubid=att.attnum
+WHERE d1.classid=(SELECT oid FROM pg_catalog.pg_class WHERE relname='pg_attrdef')
+    AND d2.refobjid NOT IN (SELECT d3.refobjid FROM pg_catalog.pg_depend d3 WHERE d3.objid=d1.refobjid)
+    AND d1.refobjid={{seid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequences/sql/default/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequences/sql/default/get_oid.sql
index 340a66416..4db094970 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequences/sql/default/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequences/sql/default/get_oid.sql
@@ -1,7 +1,7 @@
 SELECT cl.oid as oid, relnamespace
-FROM pg_class cl
-LEFT OUTER JOIN pg_description des ON (des.objoid=cl.oid AND des.classoid='pg_class'::regclass)
-LEFT OUTER JOIN pg_namespace nsp ON (nsp.oid = cl.relnamespace)
+FROM pg_catalog.pg_class cl
+LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=cl.oid AND des.classoid='pg_class'::regclass)
+LEFT OUTER JOIN pg_catalog.pg_namespace nsp ON (nsp.oid = cl.relnamespace)
 WHERE relkind = 'S'
 AND relname = {{ name|qtLiteral }}
 AND nspname = {{ schema|qtLiteral }}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequences/sql/default/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequences/sql/default/nodes.sql
index bad374250..64418dc72 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequences/sql/default/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequences/sql/default/nodes.sql
@@ -1,5 +1,5 @@
 SELECT cl.oid as oid, relname as name, relnamespace as schema
-FROM pg_class cl
+FROM pg_catalog.pg_class cl
 WHERE
     relkind = 'S'
 {% if scid %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequences/sql/default/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequences/sql/default/properties.sql
index fd97e3f1d..75e2e898a 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequences/sql/default/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequences/sql/default/properties.sql
@@ -3,13 +3,13 @@ SELECT
     cl.oid as oid,
     relname as name,
     nsp.nspname as schema,
-    pg_get_userbyid(relowner) AS seqowner,
+    pg_catalog.pg_get_userbyid(relowner) AS seqowner,
     description as comment,
-    array_to_string(relacl::text[], ', ') as acl,
-    (SELECT array_agg(provider || '=' || label) FROM pg_seclabels sl1 WHERE sl1.objoid=cl.oid) AS securities
-FROM pg_class cl
-    LEFT OUTER JOIN pg_namespace nsp ON cl.relnamespace = nsp.oid
-    LEFT OUTER JOIN pg_description des ON (des.objoid=cl.oid
+    pg_catalog.array_to_string(relacl::text[], ', ') as acl,
+    (SELECT pg_catalog.array_agg(provider || '=' || label) FROM pg_catalog.pg_seclabels sl1 WHERE sl1.objoid=cl.oid) AS securities
+FROM pg_catalog.pg_class cl
+    LEFT OUTER JOIN pg_catalog.pg_namespace nsp ON cl.relnamespace = nsp.oid
+    LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=cl.oid
         AND des.classoid='pg_class'::regclass)
 WHERE relkind = 'S' AND relnamespace  = {{scid}}::oid
 {% if seid %}AND cl.oid = {{seid}}::oid {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequences/sql/default/stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequences/sql/default/stats.sql
index cd9b0154a..ec8c119a4 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequences/sql/default/stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequences/sql/default/stats.sql
@@ -2,6 +2,6 @@ SELECT
     blks_read AS {{ conn|qtIdent(_('Blocks read')) }},
     blks_hit AS {{ conn|qtIdent(_('Blocks hit')) }}
 FROM
-    pg_statio_all_sequences
+    pg_catalog.pg_statio_all_sequences
 WHERE
-    relid = {{ seid }}::OID
\ No newline at end of file
+    relid = {{ seid }}::OID
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonyms/sql/9.2_plus/get_objects.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonyms/sql/9.2_plus/get_objects.sql
index 0ae7aec79..e284d7b46 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonyms/sql/9.2_plus/get_objects.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonyms/sql/9.2_plus/get_objects.sql
@@ -3,7 +3,7 @@
 {###########################################}
 {% if trgTyp == 'f' %}
 SELECT DISTINCT proname AS name
-    FROM pg_proc p, pg_namespace n
+    FROM pg_catalog.pg_proc p, pg_catalog.pg_namespace n
 WHERE p.pronamespace = n.oid AND
     n.nspname = {{  trgSchema|qtLiteral }} AND
     p.protype  = '0'
@@ -13,7 +13,7 @@ ORDER BY proname;
 {###########################################}
 {% elif trgTyp == 'p' %}
 SELECT DISTINCT proname AS name
-    FROM pg_proc p, pg_namespace n
+    FROM pg_catalog.pg_proc p, pg_catalog.pg_namespace n
 WHERE p.pronamespace = n.oid AND
     n.nspname = {{  trgSchema|qtLiteral }} AND
     p.protype  = '1'
@@ -23,17 +23,17 @@ ORDER BY proname;
 {###########################################}
 {% elif trgTyp == 's' %}
 SELECT synname AS name
-    FROM pg_synonym
+    FROM pg_catalog.pg_synonym
 ORDER BY synname;
 {###########################################}
 {### If Target Type is Package ###}
 {###########################################}
 {% elif trgTyp == 'P' %}
 SELECT nspname AS name
-    FROM pg_namespace
+    FROM pg_catalog.pg_namespace
 WHERE nspparent IN (
                     SELECT oid
-                        FROM pg_namespace
+                        FROM pg_catalog.pg_namespace
                     WHERE nspname = {{ trgSchema|qtLiteral }} LIMIT 1
                    )
       AND nspobjecttype = 0
@@ -43,7 +43,7 @@ ORDER BY nspname;
 {### If Target Type is Table/View/M.View/Sequnce ###}
 {###################################################}
 SELECT relname AS name
-    FROM pg_class c, pg_namespace n
+    FROM pg_catalog.pg_class c, pg_catalog.pg_namespace n
 WHERE c.relnamespace = n.oid AND
     n.nspname = {{  trgSchema|qtLiteral }} AND
 {% if trgTyp == 'v' %}
@@ -53,4 +53,4 @@ WHERE c.relnamespace = n.oid AND
     c.relkind = {{ trgTyp|qtLiteral }}
 {% endif %}
 ORDER BY relname;
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonyms/sql/9.2_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonyms/sql/9.2_plus/properties.sql
index e9501a043..7f795a18e 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonyms/sql/9.2_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonyms/sql/9.2_plus/properties.sql
@@ -1,28 +1,28 @@
-SELECT synname AS name, pg_get_userbyid(synowner) AS owner,
+SELECT synname AS name, pg_catalog.pg_get_userbyid(synowner) AS owner,
   synobjschema, synobjname,  ns.nspname as schema,
   COALESCE(
   (SELECT relkind
-  FROM pg_class c, pg_namespace n
+  FROM pg_catalog.pg_class c, pg_catalog.pg_namespace n
   WHERE c.relnamespace = n.oid
     AND n.nspname = synobjschema
     AND c.relname = synobjname),
   -- For Function/Procedure
   (SELECT CASE WHEN p.protype = '0' THEN 'f'::"char" ELSE 'p'::"char" END
-  FROM pg_proc p, pg_namespace n
+  FROM pg_catalog.pg_proc p, pg_catalog.pg_namespace n
     WHERE p.pronamespace = n.oid
       AND n.nspname = synobjschema
       AND p.proname = synobjname LIMIT 1),
   -- For Package
   (SELECT CASE WHEN count(*) > 0 THEN 'P'::"char" END
-  FROM pg_namespace
+  FROM pg_catalog.pg_namespace
     WHERE nspparent IN (SELECT oid
-                           FROM pg_namespace
+                           FROM pg_catalog.pg_namespace
                         WHERE nspname = synobjschema LIMIT 1)
       AND nspname = synobjname
       AND nspobjecttype = 0),
   -- Default s = Synonym
   's') AS targettype
-FROM pg_synonym s  JOIN pg_namespace ns ON s.synnamespace = ns.oid
+FROM pg_catalog.pg_synonym s  JOIN pg_catalog.pg_namespace ns ON s.synnamespace = ns.oid
  WHERE s.synnamespace={{scid}}::oid
  {% if syid %}
    AND s.oid={{syid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonyms/sql/9.5_plus/get_objects.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonyms/sql/9.5_plus/get_objects.sql
index 0ae7aec79..e284d7b46 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonyms/sql/9.5_plus/get_objects.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonyms/sql/9.5_plus/get_objects.sql
@@ -3,7 +3,7 @@
 {###########################################}
 {% if trgTyp == 'f' %}
 SELECT DISTINCT proname AS name
-    FROM pg_proc p, pg_namespace n
+    FROM pg_catalog.pg_proc p, pg_catalog.pg_namespace n
 WHERE p.pronamespace = n.oid AND
     n.nspname = {{  trgSchema|qtLiteral }} AND
     p.protype  = '0'
@@ -13,7 +13,7 @@ ORDER BY proname;
 {###########################################}
 {% elif trgTyp == 'p' %}
 SELECT DISTINCT proname AS name
-    FROM pg_proc p, pg_namespace n
+    FROM pg_catalog.pg_proc p, pg_catalog.pg_namespace n
 WHERE p.pronamespace = n.oid AND
     n.nspname = {{  trgSchema|qtLiteral }} AND
     p.protype  = '1'
@@ -23,17 +23,17 @@ ORDER BY proname;
 {###########################################}
 {% elif trgTyp == 's' %}
 SELECT synname AS name
-    FROM pg_synonym
+    FROM pg_catalog.pg_synonym
 ORDER BY synname;
 {###########################################}
 {### If Target Type is Package ###}
 {###########################################}
 {% elif trgTyp == 'P' %}
 SELECT nspname AS name
-    FROM pg_namespace
+    FROM pg_catalog.pg_namespace
 WHERE nspparent IN (
                     SELECT oid
-                        FROM pg_namespace
+                        FROM pg_catalog.pg_namespace
                     WHERE nspname = {{ trgSchema|qtLiteral }} LIMIT 1
                    )
       AND nspobjecttype = 0
@@ -43,7 +43,7 @@ ORDER BY nspname;
 {### If Target Type is Table/View/M.View/Sequnce ###}
 {###################################################}
 SELECT relname AS name
-    FROM pg_class c, pg_namespace n
+    FROM pg_catalog.pg_class c, pg_catalog.pg_namespace n
 WHERE c.relnamespace = n.oid AND
     n.nspname = {{  trgSchema|qtLiteral }} AND
 {% if trgTyp == 'v' %}
@@ -53,4 +53,4 @@ WHERE c.relnamespace = n.oid AND
     c.relkind = {{ trgTyp|qtLiteral }}
 {% endif %}
 ORDER BY relname;
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonyms/sql/9.5_plus/get_schema.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonyms/sql/9.5_plus/get_schema.sql
index c05ee0fcc..da5f6ad50 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonyms/sql/9.5_plus/get_schema.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonyms/sql/9.5_plus/get_schema.sql
@@ -2,6 +2,6 @@
 SELECT
     c.relnamespace as scid
 FROM
-    pg_class c
+    pg_catalog.pg_class c
 WHERE
     c.oid = {{syid|qtLiteral}}::oid;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonyms/sql/9.5_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonyms/sql/9.5_plus/properties.sql
index d78740e27..a10f7daae 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonyms/sql/9.5_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonyms/sql/9.5_plus/properties.sql
@@ -1,28 +1,28 @@
-SELECT s.oid, synname AS name, pg_get_userbyid(synowner) AS owner,
+SELECT s.oid, synname AS name, pg_catalog.pg_get_userbyid(synowner) AS owner,
   synobjschema, synobjname,  ns.nspname as schema,
   COALESCE(
   (SELECT relkind
-  FROM pg_class c, pg_namespace n
+  FROM pg_catalog.pg_class c, pg_catalog.pg_namespace n
   WHERE c.relnamespace = n.oid
     AND n.nspname = synobjschema
     AND c.relname = synobjname),
   -- For Function/Procedure
   (SELECT CASE WHEN p.protype = '0' THEN 'f'::"char" ELSE 'p'::"char" END
-  FROM pg_proc p, pg_namespace n
+  FROM pg_catalog.pg_proc p, pg_catalog.pg_namespace n
     WHERE p.pronamespace = n.oid
       AND n.nspname = synobjschema
       AND p.proname = synobjname LIMIT 1),
   -- For Package
   (SELECT CASE WHEN count(*) > 0 THEN 'P'::"char" END
-  FROM pg_namespace
+  FROM pg_catalog.pg_namespace
     WHERE nspparent IN (SELECT oid
-                           FROM pg_namespace
+                           FROM pg_catalog.pg_namespace
                         WHERE nspname = synobjschema LIMIT 1)
       AND nspname = synobjname
       AND nspobjecttype = 0),
   -- Default s = Synonym
   's') AS targettype
-FROM pg_synonym s  JOIN pg_namespace ns ON s.synnamespace = ns.oid
+FROM pg_catalog.pg_synonym s  JOIN pg_catalog.pg_namespace ns ON s.synnamespace = ns.oid
  WHERE s.synnamespace={{scid}}::oid
  {% if syid %}
    AND s.oid={{syid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonyms/sql/default/get_objects.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonyms/sql/default/get_objects.sql
index c495300c3..24fa71ff6 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonyms/sql/default/get_objects.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonyms/sql/default/get_objects.sql
@@ -3,7 +3,7 @@
 {###########################################}
 {% if trgTyp == 'f' %}
 SELECT DISTINCT proname AS name
-    FROM pg_proc p, pg_namespace n
+    FROM pg_catalog.pg_proc p, pg_catalog.pg_namespace n
 WHERE p.pronamespace = n.oid AND
     n.nspname = {{  trgSchema|qtLiteral }} AND
     p.protype  = '0'
@@ -13,7 +13,7 @@ ORDER BY proname;
 {###########################################}
 {% elif trgTyp == 'p' %}
 SELECT DISTINCT proname AS name
-    FROM pg_proc p, pg_namespace n
+    FROM pg_catalog.pg_proc p, pg_catalog.pg_namespace n
 WHERE p.pronamespace = n.oid AND
     n.nspname = {{  trgSchema|qtLiteral }} AND
     p.protype  = '1'
@@ -23,14 +23,14 @@ ORDER BY proname;
 {###########################################}
 {% elif trgTyp == 's' %}
 SELECT synname AS name
-    FROM pg_synonym
+    FROM pg_catalog.pg_synonym
 ORDER BY synname;
 {% else %}
 {###################################################}
 {### If Target Type is Table/View/M.View/Sequnce ###}
 {###################################################}
 SELECT relname AS name
-    FROM pg_class c, pg_namespace n
+    FROM pg_catalog.pg_class c, pg_catalog.pg_namespace n
 WHERE c.relnamespace = n.oid AND
     n.nspname = {{  trgSchema|qtLiteral }} AND
 {% if trgTyp == 'v' %}
@@ -40,4 +40,4 @@ WHERE c.relnamespace = n.oid AND
     c.relkind = {{ trgTyp|qtLiteral }}
 {% endif %}
 ORDER BY relname;
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonyms/sql/default/get_parent_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonyms/sql/default/get_parent_oid.sql
index e21f9683e..3360b2862 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonyms/sql/default/get_parent_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonyms/sql/default/get_parent_oid.sql
@@ -1,5 +1,5 @@
 SELECT s.oid as syid, synnamespace as scid
-    FROM pg_synonym s
+    FROM pg_catalog.pg_synonym s
 WHERE synname = {{ data.name|qtLiteral }}
 AND synnamespace IN
-    ( SELECT oid FROM pg_namespace WHERE nspname = {{ data.schema|qtLiteral }} );
+    ( SELECT oid FROM pg_catalog.pg_namespace WHERE nspname = {{ data.schema|qtLiteral }} );
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonyms/sql/default/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonyms/sql/default/nodes.sql
index c1df07f08..48cb643c9 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonyms/sql/default/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonyms/sql/default/nodes.sql
@@ -1,5 +1,5 @@
 SELECT s.oid, synname as name
-FROM pg_synonym s
-    JOIN pg_namespace ns ON s.synnamespace = ns.oid
+FROM pg_catalog.pg_synonym s
+    JOIN pg_catalog.pg_namespace ns ON s.synnamespace = ns.oid
     AND s.synnamespace = {{scid}}::oid
 ORDER BY synname;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonyms/sql/default/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonyms/sql/default/properties.sql
index ec7634a07..4a2df8e81 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonyms/sql/default/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonyms/sql/default/properties.sql
@@ -1,16 +1,16 @@
-SELECT synname AS name, pg_get_userbyid(synowner) AS owner,
+SELECT synname AS name, pg_catalog.pg_get_userbyid(synowner) AS owner,
   synobjschema, synobjname,  ns.nspname as schema,
   COALESCE((SELECT relkind
-  FROM pg_class c, pg_namespace n
+  FROM pg_catalog.pg_class c, pg_catalog.pg_namespace n
   WHERE c.relnamespace = n.oid
     AND n.nspname = synobjschema
     AND c.relname = synobjname),
   (SELECT CASE WHEN p.protype = '0' THEN 'f'::"char" ELSE 'p'::"char" END
-  FROM pg_proc p, pg_namespace n
+  FROM pg_catalog.pg_proc p, pg_catalog.pg_namespace n
     WHERE p.pronamespace = n.oid
       AND n.nspname = synobjschema
       AND p.proname = synobjname LIMIT 1), 's') AS targettype -- Default s = Synonym
-FROM pg_synonym s  JOIN pg_namespace ns ON s.synnamespace = ns.oid
+FROM pg_catalog.pg_synonym s  JOIN pg_catalog.pg_namespace ns ON s.synnamespace = ns.oid
  WHERE s.synnamespace={{scid}}::oid
  {% if syid %}
    AND s.oid={{syid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/exclusion_constraint/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/exclusion_constraint/__init__.py
index 23dedda8e..f10bde48f 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/exclusion_constraint/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/exclusion_constraint/__init__.py
@@ -835,8 +835,8 @@ class ExclusionConstraintView(PGChildNodeView):
         # Check if pgstattuple extension is already created?
         # if created then only add extended stats
         status, is_pgstattuple = self.conn.execute_scalar("""
-        SELECT (count(extname) > 0) AS is_pgstattuple
-        FROM pg_extension
+        SELECT (pg_catalog.count(extname) > 0) AS is_pgstattuple
+        FROM pg_catalog.pg_extension
         WHERE extname='pgstattuple'
         """)
         if not status:
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/__init__.py
index 0eb50597e..f7cb5d245 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/__init__.py
@@ -917,8 +917,8 @@ class IndexConstraintView(PGChildNodeView):
         # Check if pgstattuple extension is already created?
         # if created then only add extended stats
         status, is_pgstattuple = self.conn.execute_scalar("""
-        SELECT (count(extname) > 0) AS is_pgstattuple
-        FROM pg_extension
+        SELECT (pg_catalog.count(extname) > 0) AS is_pgstattuple
+        FROM pg_catalog.pg_extension
         WHERE extname='pgstattuple'
         """)
         if not status:
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/__init__.py
index e9e0cae5f..31103f0dc 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/__init__.py
@@ -947,8 +947,8 @@ class IndexesView(PGChildNodeView, SchemaDiffObjectCompare):
             # Check if pgstattuple extension is already created?
             # if created then only add extended stats
             status, is_pgstattuple = self.conn.execute_scalar("""
-            SELECT (count(extname) > 0) AS is_pgstattuple
-            FROM pg_extension
+            SELECT (pg_catalog.count(extname) > 0) AS is_pgstattuple
+            FROM pg_catalog.pg_extension
             WHERE extname='pgstattuple'
             """)
             if not status:
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/9.2_plus/get_name.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/9.2_plus/get_name.sql
index a92f89304..2bd1c2ebe 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/9.2_plus/get_name.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/9.2_plus/get_name.sql
@@ -1,5 +1,5 @@
 SELECT conname as name,
     NOT convalidated as convalidated
-FROM pg_constraint ct
+FROM pg_catalog.pg_constraint ct
 WHERE contype = 'c'
-AND  ct.oid = {{cid}}::oid
\ No newline at end of file
+AND  ct.oid = {{cid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/9.2_plus/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/9.2_plus/get_oid.sql
index 46f32c9bc..1970d96b2 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/9.2_plus/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/9.2_plus/get_oid.sql
@@ -2,7 +2,7 @@ SELECT
     oid, conname as name,
     NOT convalidated as convalidated
 FROM
-    pg_constraint
+    pg_catalog.pg_constraint
 WHERE
     conrelid = {{tid}}::oid
     AND conname={{ name|qtLiteral }};
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/9.2_plus/get_oid_with_transaction.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/9.2_plus/get_oid_with_transaction.sql
index b497e3fa1..7fca1ae37 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/9.2_plus/get_oid_with_transaction.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/9.2_plus/get_oid_with_transaction.sql
@@ -1,6 +1,6 @@
 SELECT ct.oid,
     ct.conname as name,
     NOT convalidated as convalidated
-FROM pg_constraint ct
+FROM pg_catalog.pg_constraint ct
 WHERE contype='c' AND
-    conrelid = {{tid}}::oid LIMIT 1;
\ No newline at end of file
+    conrelid = {{tid}}::oid LIMIT 1;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/9.2_plus/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/9.2_plus/nodes.sql
index 69d6c7abf..e3ac2505b 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/9.2_plus/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/9.2_plus/nodes.sql
@@ -1,6 +1,6 @@
 SELECT c.oid, conname as name,
     NOT convalidated as convalidated
-    FROM pg_constraint c
+    FROM pg_catalog.pg_constraint c
 WHERE contype = 'c'
     AND conrelid = {{ tid }}::oid
 {% if cid %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/9.2_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/9.2_plus/properties.sql
index 509d31793..08a1aa5fc 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/9.2_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/9.2_plus/properties.sql
@@ -1,14 +1,14 @@
 SELECT c.oid, conname as name, relname, nspname, description as comment,
-       pg_get_expr(conbin, conrelid, true) as consrc,
+       pg_catalog.pg_get_expr(conbin, conrelid, true) as consrc,
        connoinherit, NOT convalidated as convalidated
-    FROM pg_constraint c
-    JOIN pg_class cl ON cl.oid=conrelid
-    JOIN pg_namespace nl ON nl.oid=relnamespace
+    FROM pg_catalog.pg_constraint c
+    JOIN pg_catalog.pg_class cl ON cl.oid=conrelid
+    JOIN pg_catalog.pg_namespace nl ON nl.oid=relnamespace
 LEFT OUTER JOIN
-    pg_description des ON (des.objoid=c.oid AND
+    pg_catalog.pg_description des ON (des.objoid=c.oid AND
                            des.classoid='pg_constraint'::regclass)
 WHERE contype = 'c'
     AND conrelid = {{ tid }}::oid
 {% if cid %}
     AND c.oid = {{ cid }}::oid
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/default/get_name.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/default/get_name.sql
index 12dfa1585..0f53bcfb7 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/default/get_name.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/default/get_name.sql
@@ -1,4 +1,4 @@
 SELECT conname as name
-FROM pg_constraint ct
+FROM pg_catalog.pg_constraint ct
 WHERE contype = 'c'
-AND  ct.oid = {{cid}}::oid
\ No newline at end of file
+AND  ct.oid = {{cid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/default/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/default/get_oid.sql
index fa521e642..fe74be373 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/default/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/default/get_oid.sql
@@ -1,7 +1,7 @@
 SELECT
     oid, conname as name
 FROM
-    pg_constraint
+    pg_catalog.pg_constraint
 WHERE
     conrelid = {{tid}}::oid
     AND conname={{ name|qtLiteral }};
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/default/get_oid_with_transaction.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/default/get_oid_with_transaction.sql
index 0f2e29f59..e340a0c7f 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/default/get_oid_with_transaction.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/default/get_oid_with_transaction.sql
@@ -1,5 +1,5 @@
 SELECT ct.oid,
     ct.conname as name
-FROM pg_constraint ct
+FROM pg_catalog.pg_constraint ct
 WHERE contype='c' AND
-    conrelid = {{tid}}::oid LIMIT 1;
\ No newline at end of file
+    conrelid = {{tid}}::oid LIMIT 1;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/default/get_parent.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/default/get_parent.sql
index da79d0fcd..0e8e5a1eb 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/default/get_parent.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/default/get_parent.sql
@@ -1,7 +1,7 @@
 SELECT nsp.nspname AS schema,
     rel.relname AS table
 FROM
-    pg_class rel
-JOIN pg_namespace nsp
+    pg_catalog.pg_class rel
+JOIN pg_catalog.pg_namespace nsp
 ON rel.relnamespace = nsp.oid::oid
-WHERE rel.oid = {{tid}}::oid
\ No newline at end of file
+WHERE rel.oid = {{tid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/default/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/default/nodes.sql
index 92f8e24f2..020eecca0 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/default/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/default/nodes.sql
@@ -1,5 +1,5 @@
 SELECT c.oid, conname as name
-    FROM pg_constraint c
+    FROM pg_catalog.pg_constraint c
 WHERE contype = 'c'
     AND conrelid = {{ tid }}::oid
 {% if cid %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/default/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/default/properties.sql
index 18cdb35e3..ef0d65e22 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/default/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/default/properties.sql
@@ -1,13 +1,13 @@
 SELECT c.oid, conname as name, relname, nspname, description as comment ,
-       pg_get_expr(conbin, conrelid, true) as consrc
-    FROM pg_constraint c
-    JOIN pg_class cl ON cl.oid=conrelid
-    JOIN pg_namespace nl ON nl.oid=relnamespace
+       pg_catalog.pg_get_expr(conbin, conrelid, true) as consrc
+    FROM pg_catalog.pg_constraint c
+    JOIN pg_catalog.pg_class cl ON cl.oid=conrelid
+    JOIN pg_catalog.pg_namespace nl ON nl.oid=relnamespace
 LEFT OUTER JOIN
-    pg_description des ON (des.objoid=c.oid AND
+    pg_catalog.pg_description des ON (des.objoid=c.oid AND
                            des.classoid='pg_constraint'::regclass)
 WHERE contype = 'c'
     AND conrelid = {{ tid }}::oid
 {% if cid %}
     AND c.oid = {{ cid }}::oid
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/10_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/10_plus/properties.sql
index a2e44c231..5ac870ab7 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/10_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/10_plus/properties.sql
@@ -2,33 +2,33 @@ SELECT att.attname as name, att.atttypid, att.attlen, att.attnum, att.attndims,
 		att.atttypmod, att.attacl, att.attnotnull, att.attoptions, att.attstattarget,
 		att.attstorage, att.attidentity,
 		pg_catalog.pg_get_expr(def.adbin, def.adrelid) AS defval,
-		format_type(ty.oid,NULL) AS typname,
-        format_type(ty.oid,att.atttypmod) AS displaytypname,
-		format_type(ty.oid,att.atttypmod) AS cltype,
+		pg_catalog.format_type(ty.oid,NULL) AS typname,
+        pg_catalog.format_type(ty.oid,att.atttypmod) AS displaytypname,
+		pg_catalog.format_type(ty.oid,att.atttypmod) AS cltype,
         CASE WHEN ty.typelem > 0 THEN ty.typelem ELSE ty.oid END as elemoid,
-		(SELECT nspname FROM pg_namespace WHERE oid = ty.typnamespace) as typnspname,
+		(SELECT nspname FROM pg_catalog.pg_namespace WHERE oid = ty.typnamespace) as typnspname,
         ty.typstorage AS defaultstorage,
 		description, pi.indkey,
-	(SELECT count(1) FROM pg_type t2 WHERE t2.typname=ty.typname) > 1 AS isdup,
+	(SELECT count(1) FROM pg_catalog.pg_type t2 WHERE t2.typname=ty.typname) > 1 AS isdup,
 	CASE WHEN length(coll.collname::text) > 0 AND length(nspc.nspname::text) > 0  THEN
-	  concat(quote_ident(nspc.nspname),'.',quote_ident(coll.collname))
+	  pg_catalog.concat(pg_catalog.quote_ident(nspc.nspname),'.',pg_catalog.quote_ident(coll.collname))
 	ELSE '' END AS collspcname,
-	EXISTS(SELECT 1 FROM pg_constraint WHERE conrelid=att.attrelid AND contype='f' AND att.attnum=ANY(conkey)) As is_fk,
-	(SELECT array_agg(provider || '=' || label) FROM pg_seclabels sl1 WHERE sl1.objoid=att.attrelid AND sl1.objsubid=att.attnum) AS seclabels,
+	EXISTS(SELECT 1 FROM pg_catalog.pg_constraint WHERE conrelid=att.attrelid AND contype='f' AND att.attnum=ANY(conkey)) As is_fk,
+	(SELECT pg_catalog.array_agg(provider || '=' || label) FROM pg_catalog.pg_seclabels sl1 WHERE sl1.objoid=att.attrelid AND sl1.objsubid=att.attnum) AS seclabels,
 	(CASE WHEN (att.attnum < 1) THEN true ElSE false END) AS is_sys_column,
 	(CASE WHEN (att.attidentity in ('a', 'd')) THEN 'i' ELSE 'n' END) AS colconstype, tab.relname as relname,
 	(CASE WHEN tab.relkind = 'v' THEN true ELSE false END) AS is_view_only,
 	seq.*
-FROM pg_attribute att
-  JOIN pg_type ty ON ty.oid=atttypid
-  LEFT OUTER JOIN pg_attrdef def ON adrelid=att.attrelid AND adnum=att.attnum
-  LEFT OUTER JOIN pg_description des ON (des.objoid=att.attrelid AND des.objsubid=att.attnum AND des.classoid='pg_class'::regclass)
-  LEFT OUTER JOIN (pg_depend dep JOIN pg_class cs ON dep.classid='pg_class'::regclass AND dep.objid=cs.oid AND cs.relkind='S') ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
-  LEFT OUTER JOIN pg_index pi ON pi.indrelid=att.attrelid AND indisprimary
-  LEFT OUTER JOIN pg_collation coll ON att.attcollation=coll.oid
-  LEFT OUTER JOIN pg_namespace nspc ON coll.collnamespace=nspc.oid
-  LEFT OUTER JOIN pg_sequence seq ON cs.oid=seq.seqrelid
-  LEFT OUTER JOIN pg_class tab on tab.oid = att.attrelid
+FROM pg_catalog.pg_attribute att
+  JOIN pg_catalog.pg_type ty ON ty.oid=atttypid
+  LEFT OUTER JOIN pg_catalog.pg_attrdef def ON adrelid=att.attrelid AND adnum=att.attnum
+  LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=att.attrelid AND des.objsubid=att.attnum AND des.classoid='pg_class'::regclass)
+  LEFT OUTER JOIN (pg_catalog.pg_depend dep JOIN pg_catalog.pg_class cs ON dep.classid='pg_class'::regclass AND dep.objid=cs.oid AND cs.relkind='S') ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
+  LEFT OUTER JOIN pg_catalog.pg_index pi ON pi.indrelid=att.attrelid AND indisprimary
+  LEFT OUTER JOIN pg_catalog.pg_collation coll ON att.attcollation=coll.oid
+  LEFT OUTER JOIN pg_catalog.pg_namespace nspc ON coll.collnamespace=nspc.oid
+  LEFT OUTER JOIN pg_catalog.pg_sequence seq ON cs.oid=seq.seqrelid
+  LEFT OUTER JOIN pg_catalog.pg_class tab on tab.oid = att.attrelid
 WHERE att.attrelid = {{tid}}::oid
 {% if clid %}
     AND att.attnum = {{clid}}::int
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/12_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/12_plus/properties.sql
index b42f6f66c..799b2bb36 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/12_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/12_plus/properties.sql
@@ -2,34 +2,34 @@ SELECT att.attname as name, att.atttypid, att.attlen, att.attnum, att.attndims,
 		att.atttypmod, att.attacl, att.attnotnull, att.attoptions, att.attstattarget,
 		att.attstorage, att.attidentity,
 		pg_catalog.pg_get_expr(def.adbin, def.adrelid) AS defval,
-		format_type(ty.oid,NULL) AS typname,
-        format_type(ty.oid,att.atttypmod) AS displaytypname,
-		format_type(ty.oid,att.atttypmod) AS cltype,
+		pg_catalog.format_type(ty.oid,NULL) AS typname,
+        pg_catalog.format_type(ty.oid,att.atttypmod) AS displaytypname,
+		pg_catalog.format_type(ty.oid,att.atttypmod) AS cltype,
         CASE WHEN ty.typelem > 0 THEN ty.typelem ELSE ty.oid END as elemoid,
 		(SELECT nspname FROM pg_namespace WHERE oid = ty.typnamespace) as typnspname,
         ty.typstorage AS defaultstorage,
 		description, pi.indkey,
-	(SELECT count(1) FROM pg_type t2 WHERE t2.typname=ty.typname) > 1 AS isdup,
+	(SELECT count(1) FROM pg_catalog.pg_type t2 WHERE t2.typname=ty.typname) > 1 AS isdup,
 	CASE WHEN length(coll.collname::text) > 0 AND length(nspc.nspname::text) > 0  THEN
-	  concat(quote_ident(nspc.nspname),'.',quote_ident(coll.collname))
+	  pg_catalog.concat(pg_catalog.quote_ident(nspc.nspname),'.',pg_catalog.quote_ident(coll.collname))
 	ELSE '' END AS collspcname,
-	EXISTS(SELECT 1 FROM pg_constraint WHERE conrelid=att.attrelid AND contype='f' AND att.attnum=ANY(conkey)) As is_fk,
-	(SELECT array_agg(provider || '=' || label) FROM pg_seclabels sl1 WHERE sl1.objoid=att.attrelid AND sl1.objsubid=att.attnum) AS seclabels,
+	EXISTS(SELECT 1 FROM pg_catalog.pg_constraint WHERE conrelid=att.attrelid AND contype='f' AND att.attnum=ANY(conkey)) As is_fk,
+	(SELECT pg_catalog.array_agg(provider || '=' || label) FROM pg_catalog.pg_seclabels sl1 WHERE sl1.objoid=att.attrelid AND sl1.objsubid=att.attnum) AS seclabels,
 	(CASE WHEN (att.attnum < 1) THEN true ElSE false END) AS is_sys_column,
 	(CASE WHEN (att.attidentity in ('a', 'd')) THEN 'i' WHEN (att.attgenerated in ('s')) THEN 'g' ELSE 'n' END) AS colconstype,
 	(CASE WHEN (att.attgenerated in ('s')) THEN pg_catalog.pg_get_expr(def.adbin, def.adrelid) END) AS genexpr, tab.relname as relname,
 	(CASE WHEN tab.relkind = 'v' THEN true ELSE false END) AS is_view_only,
 	seq.*
-FROM pg_attribute att
-  JOIN pg_type ty ON ty.oid=atttypid
-  LEFT OUTER JOIN pg_attrdef def ON adrelid=att.attrelid AND adnum=att.attnum
-  LEFT OUTER JOIN pg_description des ON (des.objoid=att.attrelid AND des.objsubid=att.attnum AND des.classoid='pg_class'::regclass)
-  LEFT OUTER JOIN (pg_depend dep JOIN pg_class cs ON dep.classid='pg_class'::regclass AND dep.objid=cs.oid AND cs.relkind='S') ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
-  LEFT OUTER JOIN pg_index pi ON pi.indrelid=att.attrelid AND indisprimary
-  LEFT OUTER JOIN pg_collation coll ON att.attcollation=coll.oid
-  LEFT OUTER JOIN pg_namespace nspc ON coll.collnamespace=nspc.oid
-  LEFT OUTER JOIN pg_sequence seq ON cs.oid=seq.seqrelid
-  LEFT OUTER JOIN pg_class tab on tab.oid = att.attrelid
+FROM pg_catalog.pg_attribute att
+  JOIN pg_catalog.pg_type ty ON ty.oid=atttypid
+  LEFT OUTER JOIN pg_catalog.pg_attrdef def ON adrelid=att.attrelid AND adnum=att.attnum
+  LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=att.attrelid AND des.objsubid=att.attnum AND des.classoid='pg_class'::regclass)
+  LEFT OUTER JOIN (pg_catalog.pg_depend dep JOIN pg_catalog.pg_class cs ON dep.classid='pg_class'::regclass AND dep.objid=cs.oid AND cs.relkind='S') ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
+  LEFT OUTER JOIN pg_catalog.pg_index pi ON pi.indrelid=att.attrelid AND indisprimary
+  LEFT OUTER JOIN pg_catalog.pg_collation coll ON att.attcollation=coll.oid
+  LEFT OUTER JOIN pg_catalog.pg_namespace nspc ON coll.collnamespace=nspc.oid
+  LEFT OUTER JOIN pg_catalog.pg_sequence seq ON cs.oid=seq.seqrelid
+  LEFT OUTER JOIN pg_catalog.pg_class tab on tab.oid = att.attrelid
 WHERE att.attrelid = {{tid}}::oid
 {% if clid %}
     AND att.attnum = {{clid}}::int
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/9.1_plus/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/9.1_plus/acl.sql
index 19a65a6a7..fa9c3c5ef 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/9.1_plus/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/9.1_plus/acl.sql
@@ -1,8 +1,8 @@
 SELECT 'attacl' as deftype,
     COALESCE(gt.rolname, 'PUBLIC') grantee,
     g.rolname grantor,
-    array_agg(privilege_type order by privilege_type) as privileges,
-    array_agg(is_grantable) as grantable
+    pg_catalog.array_agg(privilege_type order by privilege_type) as privileges,
+    pg_catalog.array_agg(is_grantable) as grantable
 FROM
   (SELECT
     d.grantee, d.grantor, d.is_grantable,
@@ -23,13 +23,13 @@ FROM
     END AS privilege_type
   FROM
     (SELECT attacl
-        FROM pg_attribute att
+        FROM pg_catalog.pg_attribute att
         WHERE att.attrelid = {{tid}}::oid
         AND att.attnum = {{clid}}::int
     ) acl,
     (SELECT (d).grantee AS grantee, (d).grantor AS grantor, (d).is_grantable
         AS is_grantable, (d).privilege_type AS privilege_type FROM (SELECT
-        aclexplode(attacl) as d FROM pg_attribute att
+        pg_catalog.aclexplode(attacl) as d FROM pg_catalog.pg_attribute att
         WHERE att.attrelid = {{tid}}::oid
         AND att.attnum = {{clid}}::int) a) d
     ) d
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/9.1_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/9.1_plus/properties.sql
index 6685bb836..039541313 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/9.1_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/9.1_plus/properties.sql
@@ -1,39 +1,39 @@
 SELECT att.attname as name, att.*, def.*, pg_catalog.pg_get_expr(def.adbin, def.adrelid) AS defval,
         CASE WHEN att.attndims > 0 THEN 1 ELSE 0 END AS isarray,
-        format_type(ty.oid,NULL) AS typname,
-        format_type(ty.oid,att.atttypmod) AS displaytypname,
+        pg_catalog.format_type(ty.oid,NULL) AS typname,
+        pg_catalog.format_type(ty.oid,att.atttypmod) AS displaytypname,
         CASE WHEN ty.typelem > 0 THEN ty.typelem ELSE ty.oid END as elemoid,
         tn.nspname as typnspname, et.typname as elemtypname,
         ty.typstorage AS defaultstorage, cl.relname, na.nspname,
-        concat(quote_ident(na.nspname) ,'.', quote_ident(cl.relname)) AS parent_tbl,
+        pg_catalog.concat(pg_catalog.quote_ident(na.nspname) ,'.', pg_catalog.quote_ident(cl.relname)) AS parent_tbl,
 	att.attstattarget, description, cs.relname AS sername,
 	ns.nspname AS serschema,
-	(SELECT count(1) FROM pg_type t2 WHERE t2.typname=ty.typname) > 1 AS isdup,
+	(SELECT count(1) FROM pg_catalog.pg_type t2 WHERE t2.typname=ty.typname) > 1 AS isdup,
 	indkey, coll.collname, nspc.nspname as collnspname , attoptions,
 	-- Start pgAdmin4, added to save time on client side parsing
 	CASE WHEN length(coll.collname::text) > 0 AND length(nspc.nspname::text) > 0  THEN
-	  concat(quote_ident(nspc.nspname),'.',quote_ident(coll.collname))
+	  pg_catalog.concat(pg_catalog.quote_ident(nspc.nspname),'.',pg_catalog.quote_ident(coll.collname))
 	ELSE '' END AS collspcname,
-	CASE WHEN strpos(format_type(ty.oid,att.atttypmod), '.') > 0 THEN
-	  split_part(format_type(ty.oid,att.atttypmod), '.', 2)
-	ELSE format_type(ty.oid,att.atttypmod) END AS cltype,
+	CASE WHEN pg_catalog.strpos(pg_catalog.format_type(ty.oid,att.atttypmod), '.') > 0 THEN
+	  pg_catalog.split_part(pg_catalog.format_type(ty.oid,att.atttypmod), '.', 2)
+	ELSE pg_catalog.format_type(ty.oid,att.atttypmod) END AS cltype,
 	-- End pgAdmin4
-	EXISTS(SELECT 1 FROM pg_constraint WHERE conrelid=att.attrelid AND contype='f' AND att.attnum=ANY(conkey)) As is_fk,
-	(SELECT array_agg(provider || '=' || label) FROM pg_seclabels sl1 WHERE sl1.objoid=att.attrelid AND sl1.objsubid=att.attnum) AS seclabels,
+	EXISTS(SELECT 1 FROM pg_catalog.pg_constraint WHERE conrelid=att.attrelid AND contype='f' AND att.attnum=ANY(conkey)) As is_fk,
+	(SELECT pg_catalog.array_agg(provider || '=' || label) FROM pg_catalog.pg_seclabels sl1 WHERE sl1.objoid=att.attrelid AND sl1.objsubid=att.attnum) AS seclabels,
 	(CASE WHEN (att.attnum < 1) THEN true ElSE false END) AS is_sys_column
-FROM pg_attribute att
-  JOIN pg_type ty ON ty.oid=atttypid
-  JOIN pg_namespace tn ON tn.oid=ty.typnamespace
-  JOIN pg_class cl ON cl.oid=att.attrelid
-  JOIN pg_namespace na ON na.oid=cl.relnamespace
-  LEFT OUTER JOIN pg_type et ON et.oid=ty.typelem
-  LEFT OUTER JOIN pg_attrdef def ON adrelid=att.attrelid AND adnum=att.attnum
+FROM pg_catalog.pg_attribute att
+  JOIN pg_catalog.pg_type ty ON ty.oid=atttypid
+  JOIN pg_catalog.pg_namespace tn ON tn.oid=ty.typnamespace
+  JOIN pg_catalog.pg_class cl ON cl.oid=att.attrelid
+  JOIN pg_catalog.pg_namespace na ON na.oid=cl.relnamespace
+  LEFT OUTER JOIN pg_catalog.pg_type et ON et.oid=ty.typelem
+  LEFT OUTER JOIN pg_catalog.pg_attrdef def ON adrelid=att.attrelid AND adnum=att.attnum
   LEFT OUTER JOIN pg_description des ON (des.objoid=att.attrelid AND des.objsubid=att.attnum AND des.classoid='pg_class'::regclass)
-  LEFT OUTER JOIN (pg_depend JOIN pg_class cs ON classid='pg_class'::regclass AND objid=cs.oid AND cs.relkind='S') ON refobjid=att.attrelid AND refobjsubid=att.attnum
-  LEFT OUTER JOIN pg_namespace ns ON ns.oid=cs.relnamespace
-  LEFT OUTER JOIN pg_index pi ON pi.indrelid=att.attrelid AND indisprimary
-  LEFT OUTER JOIN pg_collation coll ON att.attcollation=coll.oid
-  LEFT OUTER JOIN pg_namespace nspc ON coll.collnamespace=nspc.oid
+  LEFT OUTER JOIN (pg_catalog.pg_depend JOIN pg_catalog.pg_class cs ON classid='pg_class'::regclass AND objid=cs.oid AND cs.relkind='S') ON refobjid=att.attrelid AND refobjsubid=att.attnum
+  LEFT OUTER JOIN pg_catalog.pg_namespace ns ON ns.oid=cs.relnamespace
+  LEFT OUTER JOIN pg_catalog.pg_index pi ON pi.indrelid=att.attrelid AND indisprimary
+  LEFT OUTER JOIN pg_catalog.pg_collation coll ON att.attcollation=coll.oid
+  LEFT OUTER JOIN pg_catalog.pg_namespace nspc ON coll.collnamespace=nspc.oid
 WHERE att.attrelid = {{tid}}::oid
 {% if clid %}
     AND att.attnum = {{clid}}::int
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/9.2_plus/get_collations.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/9.2_plus/get_collations.sql
index afc5691a6..b6b436d69 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/9.2_plus/get_collations.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/9.2_plus/get_collations.sql
@@ -1,7 +1,7 @@
 SELECT --nspname, collname,
 	CASE WHEN length(nspname::text) > 0 AND length(collname::text) > 0  THEN
-	  concat(quote_ident(nspname), '.', quote_ident(collname))
+	  pg_catalog.concat(pg_catalog.quote_ident(nspname), '.', pg_catalog.quote_ident(collname))
 	ELSE '' END AS collation
-FROM pg_collation c, pg_namespace n
+FROM pg_catalog.pg_collation c, pg_catalog.pg_namespace n
     WHERE c.collnamespace=n.oid
     ORDER BY nspname, collname;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/9.2_plus/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/9.2_plus/nodes.sql
index 2c3e5731f..ca0116a11 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/9.2_plus/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/9.2_plus/nodes.sql
@@ -1,15 +1,15 @@
-SELECT att.attname as name, att.attnum as OID, format_type(ty.oid,NULL) AS datatype,
+SELECT att.attname as name, att.attnum as OID, pg_catalog.format_type(ty.oid,NULL) AS datatype,
 att.attnotnull as not_null, att.atthasdef as has_default_val
-FROM pg_attribute att
-  JOIN pg_type ty ON ty.oid=atttypid
-  JOIN pg_namespace tn ON tn.oid=ty.typnamespace
-  JOIN pg_class cl ON cl.oid=att.attrelid
-  JOIN pg_namespace na ON na.oid=cl.relnamespace
-  LEFT OUTER JOIN pg_type et ON et.oid=ty.typelem
-  LEFT OUTER JOIN pg_attrdef def ON adrelid=att.attrelid AND adnum=att.attnum
-  LEFT OUTER JOIN (pg_depend JOIN pg_class cs ON classid='pg_class'::regclass AND objid=cs.oid AND cs.relkind='S') ON refobjid=att.attrelid AND refobjsubid=att.attnum
-  LEFT OUTER JOIN pg_namespace ns ON ns.oid=cs.relnamespace
-  LEFT OUTER JOIN pg_index pi ON pi.indrelid=att.attrelid AND indisprimary
+FROM pg_catalog.pg_attribute att
+  JOIN pg_catalog.pg_type ty ON ty.oid=atttypid
+  JOIN pg_catalog.pg_namespace tn ON tn.oid=ty.typnamespace
+  JOIN pg_catalog.pg_class cl ON cl.oid=att.attrelid
+  JOIN pg_catalog.pg_namespace na ON na.oid=cl.relnamespace
+  LEFT OUTER JOIN pg_catalog.pg_type et ON et.oid=ty.typelem
+  LEFT OUTER JOIN pg_catalog.pg_attrdef def ON adrelid=att.attrelid AND adnum=att.attnum
+  LEFT OUTER JOIN (pg_catalog.pg_depend JOIN pg_catalog.pg_class cs ON classid='pg_class'::regclass AND objid=cs.oid AND cs.relkind='S') ON refobjid=att.attrelid AND refobjsubid=att.attnum
+  LEFT OUTER JOIN pg_catalog.pg_namespace ns ON ns.oid=cs.relnamespace
+  LEFT OUTER JOIN pg_catalog.pg_index pi ON pi.indrelid=att.attrelid AND indisprimary
 WHERE
     att.attrelid = {{ tid|qtLiteral }}::oid
 {% if clid %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/9.2_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/9.2_plus/properties.sql
index 7eee42940..ec31b8bf3 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/9.2_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/9.2_plus/properties.sql
@@ -1,30 +1,30 @@
 SELECT att.attname as name, att.atttypid, att.attlen, att.attnum, att.attndims,
 		att.atttypmod, att.attacl, att.attnotnull, att.attoptions, att.attstattarget,
 		att.attstorage, pg_catalog.pg_get_expr(def.adbin, def.adrelid) AS defval,
-		format_type(ty.oid,NULL) AS typname,
-        format_type(ty.oid,att.atttypmod) AS displaytypname,
-		format_type(ty.oid,att.atttypmod) AS cltype,
+		pg_catalog.format_type(ty.oid,NULL) AS typname,
+        pg_catalog.format_type(ty.oid,att.atttypmod) AS displaytypname,
+		pg_catalog.format_type(ty.oid,att.atttypmod) AS cltype,
         CASE WHEN ty.typelem > 0 THEN ty.typelem ELSE ty.oid END as elemoid,
-		(SELECT nspname FROM pg_namespace WHERE oid = ty.typnamespace) as typnspname,
+		(SELECT nspname FROM pg_catalog.pg_namespace WHERE oid = ty.typnamespace) as typnspname,
         ty.typstorage AS defaultstorage,
 		description, pi.indkey,
-	(SELECT count(1) FROM pg_type t2 WHERE t2.typname=ty.typname) > 1 AS isdup,
+	(SELECT count(1) FROM pg_catalog.pg_type t2 WHERE t2.typname=ty.typname) > 1 AS isdup,
 	CASE WHEN length(coll.collname::text) > 0 AND length(nspc.nspname::text) > 0  THEN
-	  concat(quote_ident(nspc.nspname),'.',quote_ident(coll.collname))
+	  pg_catalog.concat(pg_catalog.quote_ident(nspc.nspname),'.',pg_catalog.quote_ident(coll.collname))
 	ELSE '' END AS collspcname,
-	EXISTS(SELECT 1 FROM pg_constraint WHERE conrelid=att.attrelid AND contype='f' AND att.attnum=ANY(conkey)) As is_fk,
-	(SELECT array_agg(provider || '=' || label) FROM pg_seclabels sl1 WHERE sl1.objoid=att.attrelid AND sl1.objsubid=att.attnum) AS seclabels,
+	EXISTS(SELECT 1 FROM pg_catalog.pg_constraint WHERE conrelid=att.attrelid AND contype='f' AND att.attnum=ANY(conkey)) As is_fk,
+	(SELECT array_agg(provider || '=' || label) FROM pg_catalog.pg_seclabels sl1 WHERE sl1.objoid=att.attrelid AND sl1.objsubid=att.attnum) AS seclabels,
 	(CASE WHEN (att.attnum < 1) THEN true ElSE false END) AS is_sys_column, tab.relname as relname,
 	(CASE WHEN tab.relkind = 'v' THEN true ELSE false END) AS is_view_only
-FROM pg_attribute att
-  JOIN pg_type ty ON ty.oid=atttypid
-  LEFT OUTER JOIN pg_attrdef def ON adrelid=att.attrelid AND adnum=att.attnum
-  LEFT OUTER JOIN pg_description des ON (des.objoid=att.attrelid AND des.objsubid=att.attnum AND des.classoid='pg_class'::regclass)
-  LEFT OUTER JOIN (pg_depend dep JOIN pg_class cs ON dep.classid='pg_class'::regclass AND dep.objid=cs.oid AND cs.relkind='S') ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
-  LEFT OUTER JOIN pg_index pi ON pi.indrelid=att.attrelid AND indisprimary
-  LEFT OUTER JOIN pg_collation coll ON att.attcollation=coll.oid
-  LEFT OUTER JOIN pg_namespace nspc ON coll.collnamespace=nspc.oid
-  LEFT OUTER JOIN pg_class tab on tab.oid = att.attrelid
+FROM pg_catalog.pg_attribute att
+  JOIN pg_catalog.pg_type ty ON ty.oid=atttypid
+  LEFT OUTER JOIN pg_catalog.pg_attrdef def ON adrelid=att.attrelid AND adnum=att.attnum
+  LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=att.attrelid AND des.objsubid=att.attnum AND des.classoid='pg_class'::regclass)
+  LEFT OUTER JOIN (pg_depend dep JOIN pg_catalog.pg_class cs ON dep.classid='pg_class'::regclass AND dep.objid=cs.oid AND cs.relkind='S') ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
+  LEFT OUTER JOIN pg_catalog.pg_index pi ON pi.indrelid=att.attrelid AND indisprimary
+  LEFT OUTER JOIN pg_catalog.pg_collation coll ON att.attcollation=coll.oid
+  LEFT OUTER JOIN pg_catalog.pg_namespace nspc ON coll.collnamespace=nspc.oid
+  LEFT OUTER JOIN pg_catalog.pg_class tab on tab.oid = att.attrelid
 WHERE att.attrelid = {{tid}}::oid
 {% if clid %}
     AND att.attnum = {{clid}}::int
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/depend.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/depend.sql
index f5f39e7d0..0371561fc 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/depend.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/depend.sql
@@ -1,9 +1,9 @@
 SELECT
     ref.relname AS refname, d2.refclassid, dep.deptype AS deptype
-FROM pg_depend dep
-    LEFT JOIN pg_depend d2 ON dep.objid=d2.objid AND dep.refobjid != d2.refobjid
-    LEFT JOIN pg_class ref ON ref.oid=d2.refobjid
-    LEFT JOIN pg_attribute att ON d2.refclassid=att.attrelid AND d2.refobjsubid=att.attnum
+FROM pg_catalog.pg_depend dep
+    LEFT JOIN pg_catalog.pg_depend d2 ON dep.objid=d2.objid AND dep.refobjid != d2.refobjid
+    LEFT JOIN pg_catalog.pg_class ref ON ref.oid=d2.refobjid
+    LEFT JOIN pg_catalog.pg_attribute att ON d2.refclassid=att.attrelid AND d2.refobjsubid=att.attnum
     {{ where }} AND
-    dep.classid=(SELECT oid FROM pg_class WHERE relname='pg_attrdef') AND
-    dep.refobjid NOT IN (SELECT d3.refobjid FROM pg_depend d3 WHERE d3.objid=d2.refobjid)
\ No newline at end of file
+    dep.classid=(SELECT oid FROM pg_catalog.pg_class WHERE relname='pg_attrdef') AND
+    dep.refobjid NOT IN (SELECT d3.refobjid FROM pg_catalog.pg_depend d3 WHERE d3.objid=d2.refobjid)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/edit_mode_types.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/edit_mode_types.sql
index 9834299a1..4832ac654 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/edit_mode_types.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/edit_mode_types.sql
@@ -1,9 +1,9 @@
-SELECT tt.oid, format_type(tt.oid,NULL) AS typname
-FROM pg_type tt
-    JOIN pg_cast pc ON tt.oid=pc.casttarget
+SELECT tt.oid, pg_catalog.format_type(tt.oid,NULL) AS typname
+FROM pg_catalog.pg_type tt
+    JOIN pg_catalog.pg_cast pc ON tt.oid=pc.casttarget
     WHERE pc.castsource= {{type_id}}
     AND pc.castcontext IN ('i', 'a')
 UNION
-SELECT tt.oid, format_type(tt.oid,NULL) AS typname
-FROM pg_type tt
+SELECT tt.oid, pg_catalog.format_type(tt.oid,NULL) AS typname
+FROM pg_catalog.pg_type tt
 WHERE tt.typbasetype = {{type_id}}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/edit_mode_types_multi.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/edit_mode_types_multi.sql
index 3dc79f0e6..9cbd793f0 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/edit_mode_types_multi.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/edit_mode_types_multi.sql
@@ -1,13 +1,13 @@
-SELECT t.main_oid, ARRAY_AGG(t.typname) as edit_types
+SELECT t.main_oid, pg_catalog.ARRAY_AGG(t.typname) as edit_types
 FROM
-(SELECT pc.castsource AS main_oid, format_type(tt.oid,NULL) AS typname
-FROM pg_type tt
-    JOIN pg_cast pc ON tt.oid=pc.casttarget
+(SELECT pc.castsource AS main_oid, pg_catalog.format_type(tt.oid,NULL) AS typname
+FROM pg_catalog.pg_type tt
+    JOIN pg_catalog.pg_cast pc ON tt.oid=pc.casttarget
     WHERE pc.castsource IN ({{type_ids}})
     AND pc.castcontext IN ('i', 'a')
 UNION
-SELECT tt.typbasetype AS main_oid, format_type(tt.oid,NULL) AS typname
-FROM pg_type tt
+SELECT tt.typbasetype AS main_oid, pg_catalog.format_type(tt.oid,NULL) AS typname
+FROM pg_catalog.pg_type tt
 WHERE tt.typbasetype  IN ({{type_ids}})
 ) t
 GROUP BY t.main_oid;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/get_collations.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/get_collations.sql
index 236e73695..2a258f8a4 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/get_collations.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/get_collations.sql
@@ -1,7 +1,7 @@
 SELECT --nspname, collname,
 	CASE WHEN length(nspname::text) > 0 AND length(collname::text) > 0  THEN
-	  concat(quote_ident(nspname), '.', quote_ident(collname))
+	  pg_catalog.concat(pg_catalog.quote_ident(nspname), '.', pg_catalog.quote_ident(collname))
 	ELSE '' END AS collation
-FROM pg_collation c, pg_namespace n
+FROM pg_catalog.pg_collation c, pg_catalog.pg_namespace n
     WHERE c.collnamespace=n.oid
 ORDER BY nspname, collname;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/get_inherited_tables.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/get_inherited_tables.sql
index 37934b8e4..f934b3e64 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/get_inherited_tables.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/get_inherited_tables.sql
@@ -1,12 +1,12 @@
-SELECT array_to_string(array_agg(inhrelname), ', ') inhrelname, attrname
+SELECT pg_catalog.array_to_string(pg_catalog.array_agg(inhrelname), ', ') inhrelname, attrname
 FROM
  (SELECT
    inhparent::regclass AS inhrelname,
    a.attname AS attrname
-  FROM pg_inherits i
-  LEFT JOIN pg_attribute a ON
+  FROM pg_catalog.pg_inherits i
+  LEFT JOIN pg_catalog.pg_attribute a ON
    (attrelid = inhparent AND attnum > 0)
   WHERE inhrelid = {{tid}}::oid
   ORDER BY inhseqno
  ) a
-GROUP BY attrname;
\ No newline at end of file
+GROUP BY attrname;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/get_parent.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/get_parent.sql
index f595cdc81..0c46d743c 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/get_parent.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/get_parent.sql
@@ -1,5 +1,5 @@
 SELECT nsp.nspname AS schema ,rel.relname AS table
-FROM pg_class rel
-    JOIN pg_namespace nsp
+FROM pg_catalog.pg_class rel
+    JOIN pg_catalog.pg_namespace nsp
     ON rel.relnamespace = nsp.oid::oid
-    WHERE rel.oid = {{tid}}::oid
\ No newline at end of file
+    WHERE rel.oid = {{tid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/get_position.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/get_position.sql
index 6a900faf0..fe640d58d 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/get_position.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/get_position.sql
@@ -1,4 +1,4 @@
 SELECT att.attnum
-FROM pg_attribute att
+FROM pg_catalog.pg_attribute att
     WHERE att.attrelid = {{tid}}::oid
     AND att.attname = {{data.name|qtLiteral(True)}}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/get_types.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/get_types.sql
index 469096c3b..fa6f630f6 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/get_types.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/get_types.sql
@@ -1,14 +1,14 @@
 SELECT * FROM
-    (SELECT format_type(t.oid,NULL) AS typname,
+    (SELECT pg_catalog.format_type(t.oid,NULL) AS typname,
     CASE WHEN typelem > 0 THEN typelem ELSE t.oid END AS elemoid
     ,typlen, typtype, t.oid, nspname,
-    (SELECT COUNT(1) FROM pg_type t2 WHERE t2.typname = t.typname) > 1 AS isdup
-FROM pg_type t
+    (SELECT COUNT(1) FROM pg_catalog.pg_type t2 WHERE t2.typname = t.typname) > 1 AS isdup
+FROM pg_catalog.pg_type t
     JOIN pg_namespace nsp ON typnamespace=nsp.oid
 WHERE (NOT (typname = 'unknown' AND nspname = 'pg_catalog'))
     AND typisdefined AND typtype IN ('b', 'c', 'd', 'e', 'r')
-    AND NOT EXISTS (select 1 from pg_class where relnamespace=typnamespace and relname = typname and relkind != 'c')
-    AND (typname not like '_%' OR NOT EXISTS (select 1 from pg_class where relnamespace=typnamespace and relname = substring(typname from 2)::name and relkind != 'c'))
+    AND NOT EXISTS (select 1 from pg_catalog.pg_class where relnamespace=typnamespace and relname = typname and relkind != 'c')
+    AND (typname not like '_%' OR NOT EXISTS (select 1 from pg_catalog.pg_class where relnamespace=typnamespace and relname = substring(typname from 2)::name and relkind != 'c'))
     AND nsp.nspname != 'information_schema'
     ) AS dummy
-    ORDER BY nspname <> 'pg_catalog', nspname <> 'public', nspname, 1
\ No newline at end of file
+    ORDER BY nspname <> 'pg_catalog', nspname <> 'public', nspname, 1
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/nodes.sql
index 584f7b1b4..259553880 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/nodes.sql
@@ -1,15 +1,15 @@
-SELECT att.attname as name, att.attnum as OID, format_type(ty.oid,NULL) AS datatype,
+SELECT att.attname as name, att.attnum as OID, pg_catalog.format_type(ty.oid,NULL) AS datatype,
 att.attnotnull as not_null, att.atthasdef as has_default_val
-FROM pg_attribute att
-    JOIN pg_type ty ON ty.oid=atttypid
-    JOIN pg_namespace tn ON tn.oid=ty.typnamespace
-    JOIN pg_class cl ON cl.oid=att.attrelid
-    JOIN pg_namespace na ON na.oid=cl.relnamespace
-    LEFT OUTER JOIN pg_type et ON et.oid=ty.typelem
-    LEFT OUTER JOIN pg_attrdef def ON adrelid=att.attrelid AND adnum=att.attnum
-    LEFT OUTER JOIN (pg_depend JOIN pg_class cs ON classid='pg_class'::regclass AND objid=cs.oid AND cs.relkind='S') ON refobjid=att.attrelid AND refobjsubid=att.attnum
-    LEFT OUTER JOIN pg_namespace ns ON ns.oid=cs.relnamespace
-    LEFT OUTER JOIN pg_index pi ON pi.indrelid=att.attrelid AND indisprimary
+FROM pg_catalog.pg_attribute att
+    JOIN pg_catalog.pg_type ty ON ty.oid=atttypid
+    JOIN pg_catalog.pg_namespace tn ON tn.oid=ty.typnamespace
+    JOIN pg_catalog.pg_class cl ON cl.oid=att.attrelid
+    JOIN pg_catalog.pg_namespace na ON na.oid=cl.relnamespace
+    LEFT OUTER JOIN pg_catalog.pg_type et ON et.oid=ty.typelem
+    LEFT OUTER JOIN pg_catalog.pg_attrdef def ON adrelid=att.attrelid AND adnum=att.attnum
+    LEFT OUTER JOIN (pg_catalog.pg_depend JOIN pg_catalog.pg_class cs ON classid='pg_class'::regclass AND objid=cs.oid AND cs.relkind='S') ON refobjid=att.attrelid AND refobjsubid=att.attnum
+    LEFT OUTER JOIN pg_catalog.pg_namespace ns ON ns.oid=cs.relnamespace
+    LEFT OUTER JOIN pg_catalog.pg_index pi ON pi.indrelid=att.attrelid AND indisprimary
 WHERE
     att.attrelid = {{ tid|qtLiteral }}::oid
 {% if clid %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/properties.sql
index a8c1798d8..cf0d7ab76 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/properties.sql
@@ -1,30 +1,30 @@
 SELECT att.attname as name, att.*, def.*, pg_catalog.pg_get_expr(def.adbin, def.adrelid) AS defval,
         CASE WHEN att.attndims > 0 THEN 1 ELSE 0 END AS isarray,
-        format_type(ty.oid,NULL) AS typname,
-        format_type(ty.oid,att.atttypmod) AS displaytypname,
+        pg_catalog.format_type(ty.oid,NULL) AS typname,
+        pg_catalog.format_type(ty.oid,att.atttypmod) AS displaytypname,
         CASE WHEN ty.typelem > 0 THEN ty.typelem ELSE ty.oid END as elemoid,
         tn.nspname as typnspname, et.typname as elemtypname,
         ty.typstorage AS defaultstorage, cl.relname, na.nspname,
-        quote_ident(na.nspname) || '.' || quote_ident(cl.relname) AS parent_tbl,
+        pg_catalog.quote_ident(na.nspname) || '.' || pg_catalog.quote_ident(cl.relname) AS parent_tbl,
 	att.attstattarget, description, cs.relname AS sername,
 	ns.nspname AS serschema,
-	(SELECT count(1) FROM pg_type t2 WHERE t2.typname=ty.typname) > 1 AS isdup,
+	(SELECT count(1) FROM pg_catalog.pg_type t2 WHERE t2.typname=ty.typname) > 1 AS isdup,
 	indkey, NULL as attoptions,
-	format_type(ty.oid,att.atttypmod) AS cltype,
-	EXISTS(SELECT 1 FROM pg_constraint WHERE conrelid=att.attrelid AND contype='f' AND att.attnum=ANY(conkey)) As is_fk,
+	pg_catalog.format_type(ty.oid,att.atttypmod) AS cltype,
+	EXISTS(SELECT 1 FROM pg_catalog.pg_constraint WHERE conrelid=att.attrelid AND contype='f' AND att.attnum=ANY(conkey)) As is_fk,
 	NULL AS seclabels,
 	(CASE WHEN (att.attnum < 1) THEN true ElSE false END) AS is_sys_column
-FROM pg_attribute att
-  JOIN pg_type ty ON ty.oid=atttypid
-  JOIN pg_namespace tn ON tn.oid=ty.typnamespace
-  JOIN pg_class cl ON cl.oid=att.attrelid
-  JOIN pg_namespace na ON na.oid=cl.relnamespace
-  LEFT OUTER JOIN pg_type et ON et.oid=ty.typelem
-  LEFT OUTER JOIN pg_attrdef def ON adrelid=att.attrelid AND adnum=att.attnum
-  LEFT OUTER JOIN pg_description des ON (des.objoid=att.attrelid AND des.objsubid=att.attnum AND des.classoid='pg_class'::regclass)
-  LEFT OUTER JOIN (pg_depend JOIN pg_class cs ON classid='pg_class'::regclass AND objid=cs.oid AND cs.relkind='S') ON refobjid=att.attrelid AND refobjsubid=att.attnum
-  LEFT OUTER JOIN pg_namespace ns ON ns.oid=cs.relnamespace
-  LEFT OUTER JOIN pg_index pi ON pi.indrelid=att.attrelid AND indisprimary
+FROM pg_catalog.pg_attribute att
+  JOIN pg_catalog.pg_type ty ON ty.oid=atttypid
+  JOIN pg_catalog.pg_namespace tn ON tn.oid=ty.typnamespace
+  JOIN pg_catalog.pg_class cl ON cl.oid=att.attrelid
+  JOIN pg_catalog.pg_namespace na ON na.oid=cl.relnamespace
+  LEFT OUTER JOIN pg_catalog.pg_type et ON et.oid=ty.typelem
+  LEFT OUTER JOIN pg_catalog.pg_attrdef def ON adrelid=att.attrelid AND adnum=att.attnum
+  LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=att.attrelid AND des.objsubid=att.attnum AND des.classoid='pg_class'::regclass)
+  LEFT OUTER JOIN (pg_catalog.pg_depend JOIN pg_catalog.pg_class cs ON classid='pg_class'::regclass AND objid=cs.oid AND cs.relkind='S') ON refobjid=att.attrelid AND refobjsubid=att.attnum
+  LEFT OUTER JOIN pg_catalog.pg_namespace ns ON ns.oid=cs.relnamespace
+  LEFT OUTER JOIN pg_catalog.pg_index pi ON pi.indrelid=att.attrelid AND indisprimary
 WHERE att.attrelid = {{tid}}::oid
 {% if clid %}
     AND att.attnum = {{clid}}::int
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/stats.sql
index cc26eacae..b9b000156 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/columns/sql/default/stats.sql
@@ -7,7 +7,7 @@ SELECT
     histogram_bounds AS {{ conn|qtIdent(_('Histogram bounds')) }},
     correlation AS {{ conn|qtIdent(_('Correlation')) }}
 FROM
-    pg_stats
+    pg_catalog.pg_stats
 WHERE
     schemaname = {{schema|qtLiteral}}
     AND tablename = {{table|qtLiteral}}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/compound_triggers/sql/ppas/12_plus/backend_support.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/compound_triggers/sql/ppas/12_plus/backend_support.sql
index bb5e8d803..4b9b6b9af 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/compound_triggers/sql/ppas/12_plus/backend_support.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/compound_triggers/sql/ppas/12_plus/backend_support.sql
@@ -3,7 +3,7 @@
 SELECT
     CASE WHEN c.relkind = 'm' THEN False ELSE True END As m_view
 FROM
-    pg_class c
+    pg_catalog.pg_class c
 WHERE
     c.oid = {{ vid }}::oid
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/compound_triggers/sql/ppas/12_plus/get_columns.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/compound_triggers/sql/ppas/12_plus/get_columns.sql
index c74c68b6a..d9c734114 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/compound_triggers/sql/ppas/12_plus/get_columns.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/compound_triggers/sql/ppas/12_plus/get_columns.sql
@@ -1,6 +1,6 @@
 SELECT att.attname as name
-FROM pg_attribute att
+FROM pg_catalog.pg_attribute att
     WHERE att.attrelid = {{tid}}::oid
     AND att.attnum IN ({{ clist }})
     AND att.attisdropped IS FALSE
-    ORDER BY att.attnum
\ No newline at end of file
+    ORDER BY att.attnum
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/compound_triggers/sql/ppas/12_plus/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/compound_triggers/sql/ppas/12_plus/get_oid.sql
index ff2638590..ff66a7f27 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/compound_triggers/sql/ppas/12_plus/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/compound_triggers/sql/ppas/12_plus/get_oid.sql
@@ -1,4 +1,4 @@
 SELECT t.oid
-FROM pg_trigger t
+FROM pg_catalog.pg_trigger t
     WHERE tgrelid = {{tid}}::OID
-    AND tgname = {{data.name|qtLiteral}};
\ No newline at end of file
+    AND tgname = {{data.name|qtLiteral}};
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/compound_triggers/sql/ppas/12_plus/get_parent.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/compound_triggers/sql/ppas/12_plus/get_parent.sql
index f595cdc81..0c46d743c 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/compound_triggers/sql/ppas/12_plus/get_parent.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/compound_triggers/sql/ppas/12_plus/get_parent.sql
@@ -1,5 +1,5 @@
 SELECT nsp.nspname AS schema ,rel.relname AS table
-FROM pg_class rel
-    JOIN pg_namespace nsp
+FROM pg_catalog.pg_class rel
+    JOIN pg_catalog.pg_namespace nsp
     ON rel.relnamespace = nsp.oid::oid
-    WHERE rel.oid = {{tid}}::oid
\ No newline at end of file
+    WHERE rel.oid = {{tid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/compound_triggers/sql/ppas/12_plus/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/compound_triggers/sql/ppas/12_plus/nodes.sql
index cee1d6376..e92ade3df 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/compound_triggers/sql/ppas/12_plus/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/compound_triggers/sql/ppas/12_plus/nodes.sql
@@ -1,5 +1,5 @@
 SELECT t.oid, t.tgname as name, t.tgenabled AS is_enable_trigger
-FROM pg_trigger t
+FROM pg_catalog.pg_trigger t
 
     WHERE NOT tgisinternal
     AND tgrelid = {{tid}}::OID
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/compound_triggers/sql/ppas/12_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/compound_triggers/sql/ppas/12_plus/properties.sql
index 27e35b556..694266ea5 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/compound_triggers/sql/ppas/12_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/compound_triggers/sql/ppas/12_plus/properties.sql
@@ -1,17 +1,19 @@
 SELECT t.oid,t.tgname AS name, t.xmin, t.tgenabled AS is_enable_trigger, t.tgtype, t.tgattr, relname,
     CASE WHEN relkind = 'r' THEN TRUE ELSE FALSE END AS parentistable,
     nspname, des.description,
-    regexp_replace(regexp_replace(pg_get_triggerdef(t.oid),
-        'CREATE TRIGGER (.*) FOR (.*) ON (.*) \nCOMPOUND TRIGGER (.*)\n', ''), '[\n]?END$', ''
+    pg_catalog.regexp_replace(
+        regexp_replace(
+            pg_catalog.pg_get_triggerdef(t.oid),
+            'CREATE TRIGGER (.*) FOR (.*) ON (.*) \nCOMPOUND TRIGGER (.*)\n', ''), '[\n]?END$', ''
     ) AS prosrc,
 {% if datlastsysoid %}
     (CASE WHEN t.oid <= {{ datlastsysoid}}::oid THEN true ElSE false END) AS is_sys_trigger,
 {% endif %}
-    COALESCE(substring(pg_get_triggerdef(t.oid), 'WHEN (.*) \nCOMPOUND'), NULL) AS whenclause
-FROM pg_trigger t
-    JOIN pg_class cl ON cl.oid=tgrelid
-    JOIN pg_namespace na ON na.oid=relnamespace
-    LEFT OUTER JOIN pg_description des ON (des.objoid=t.oid AND des.classoid='pg_trigger'::regclass)
+    COALESCE(pg_catalog.substring(pg_catalog.pg_get_triggerdef(t.oid), 'WHEN (.*) \nCOMPOUND'), NULL) AS whenclause
+FROM pg_catalog.pg_trigger t
+    JOIN pg_catalog.pg_class cl ON cl.oid=tgrelid
+    JOIN pg_catalog.pg_namespace na ON na.oid=relnamespace
+    LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=t.oid AND des.classoid='pg_trigger'::regclass)
 WHERE NOT tgisinternal
     AND tgrelid = {{tid}}::OID
     AND tgpackageoid != 0
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/11_plus/get_constraint_include.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/11_plus/get_constraint_include.sql
index 73e7c59b1..8b35db815 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/11_plus/get_constraint_include.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/11_plus/get_constraint_include.sql
@@ -5,12 +5,12 @@ FROM (
     SELECT
       i.indnkeyatts,
       i.indrelid,
-      unnest(indkey) AS table_colnum,
-      unnest(ARRAY(SELECT generate_series(1, i.indnatts) AS n)) attnum
+      pg_catalog.unnest(indkey) AS table_colnum,
+      pg_catalog.unnest(ARRAY(SELECT pg_catalog.generate_series(1, i.indnatts) AS n)) attnum
     FROM
-      pg_index i
+      pg_catalog.pg_index i
     WHERE i.indexrelid = {{cid}}::OID
-) i JOIN pg_attribute a
+) i JOIN pg_catalog.pg_attribute a
 ON (a.attrelid = i.indrelid AND i.table_colnum = a.attnum)
 WHERE i.attnum > i.indnkeyatts
 ORDER BY i.attnum
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/11_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/11_plus/properties.sql
index 2f71ba3f6..0298674f1 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/11_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/11_plus/properties.sql
@@ -4,7 +4,7 @@ SELECT cls.oid,
     amname,
     CASE WHEN length(spcname::text) > 0 THEN spcname ELSE
         (SELECT sp.spcname FROM pg_database dtb
-        JOIN pg_tablespace sp ON dtb.dattablespace=sp.oid
+        JOIN pg_catalog.pg_tablespace sp ON dtb.dattablespace=sp.oid
         WHERE dtb.oid = {{ did }}::oid)
     END as spcname,
     CASE contype
@@ -15,16 +15,16 @@ SELECT cls.oid,
     END AS comment,
     condeferrable,
     condeferred,
-    substring(array_to_string(cls.reloptions, ',') from 'fillfactor=([0-9]*)') AS fillfactor,
-    pg_get_expr(idx.indpred, idx.indrelid, true) AS indconstraint
-FROM pg_index idx
-JOIN pg_class cls ON cls.oid=indexrelid
-LEFT OUTER JOIN pg_tablespace ta on ta.oid=cls.reltablespace
-JOIN pg_am am ON am.oid=cls.relam
-LEFT JOIN pg_depend dep ON (dep.classid = cls.tableoid AND dep.objid = cls.oid AND dep.refobjsubid = '0' AND dep.refclassid=(SELECT oid FROM pg_class WHERE relname='pg_constraint') AND dep.deptype='i')
-LEFT OUTER JOIN pg_constraint con ON (con.tableoid = dep.refclassid AND con.oid = dep.refobjid)
-LEFT OUTER JOIN pg_description des ON (des.objoid=cls.oid AND des.classoid='pg_class'::regclass)
-LEFT OUTER JOIN pg_description desp ON (desp.objoid=con.oid AND desp.objsubid = 0 AND desp.classoid='pg_constraint'::regclass)
+    substring(pg_catalog.array_to_string(cls.reloptions, ',') from 'fillfactor=([0-9]*)') AS fillfactor,
+    pg_catalog.pg_get_expr(idx.indpred, idx.indrelid, true) AS indconstraint
+FROM pg_catalog.pg_index idx
+JOIN pg_catalog.pg_class cls ON cls.oid=indexrelid
+LEFT OUTER JOIN pg_catalog.pg_tablespace ta on ta.oid=cls.reltablespace
+JOIN pg_catalog.pg_am am ON am.oid=cls.relam
+LEFT JOIN pg_catalog.pg_depend dep ON (dep.classid = cls.tableoid AND dep.objid = cls.oid AND dep.refobjsubid = '0' AND dep.refclassid=(SELECT oid FROM pg_catalog.pg_class WHERE relname='pg_constraint') AND dep.deptype='i')
+LEFT OUTER JOIN pg_catalog.pg_constraint con ON (con.tableoid = dep.refclassid AND con.oid = dep.refobjid)
+LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=cls.oid AND des.classoid='pg_class'::regclass)
+LEFT OUTER JOIN pg_catalog.pg_description desp ON (desp.objoid=con.oid AND desp.objsubid = 0 AND desp.classoid='pg_constraint'::regclass)
 WHERE indrelid = {{tid}}::oid
 {% if cid %}
 AND cls.oid = {{cid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/get_oid_with_transaction.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/get_oid_with_transaction.sql
index 13f809552..fd7ac3953 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/get_oid_with_transaction.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/get_oid_with_transaction.sql
@@ -1,6 +1,6 @@
 SELECT ct.conindid AS oid,
     ct.conname AS name,
     NOT convalidated AS convalidated
-FROM pg_constraint ct
+FROM pg_catalog.pg_constraint ct
 WHERE contype='x' AND
-    conrelid = {{tid}}::oid LIMIT 1;
\ No newline at end of file
+    conrelid = {{tid}}::oid LIMIT 1;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/nodes.sql
index 70cb041a6..2c09229ce 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/nodes.sql
@@ -1,10 +1,10 @@
 SELECT conindid as oid,
     conname as name,
     NOT convalidated as convalidated
-FROM pg_constraint ct
+FROM pg_catalog.pg_constraint ct
 WHERE contype='x' AND
     conrelid = {{tid}}::oid
 {% if exid %}
     AND conindid = {{exid}}::oid
 {% endif %}
-ORDER BY conname
\ No newline at end of file
+ORDER BY conname
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.2_plus/get_constraint_cols.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.2_plus/get_constraint_cols.sql
index c3a9f2c3a..0f4cef14c 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.2_plus/get_constraint_cols.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.2_plus/get_constraint_cols.sql
@@ -4,20 +4,20 @@ UNION
 {% endif %}
 SELECT
   i.indoption[{{loop.index -1}}] AS options,
-  pg_get_indexdef(i.indexrelid, {{loop.index}}, true) AS coldef,
+  pg_catalog.pg_get_indexdef(i.indexrelid, {{loop.index}}, true) AS coldef,
   op.oprname,
   CASE WHEN (o.opcdefault = FALSE) THEN o.opcname ELSE null END AS opcname
 ,
   coll.collname,
   nspc.nspname as collnspname,
-  format_type(ty.oid,NULL) AS datatype,
-  CASE WHEN pg_get_indexdef(i.indexrelid, {{loop.index}}, true) = a.attname THEN FALSE ELSE TRUE END AS is_exp
-FROM pg_index i
-JOIN pg_attribute a ON (a.attrelid = i.indexrelid AND attnum = {{loop.index}})
-JOIN pg_type ty ON ty.oid=a.atttypid
-LEFT OUTER JOIN pg_opclass o ON (o.oid = i.indclass[{{loop.index -1}}])
-LEFT OUTER JOIN pg_constraint c ON (c.conindid = i.indexrelid) LEFT OUTER JOIN pg_operator op ON (op.oid = c.conexclop[{{loop.index}}])
-LEFT OUTER JOIN pg_collation coll ON a.attcollation=coll.oid
-LEFT OUTER JOIN pg_namespace nspc ON coll.collnamespace=nspc.oid
+  pg_catalog.format_type(ty.oid,NULL) AS datatype,
+  CASE WHEN pg_catalog.pg_get_indexdef(i.indexrelid, {{loop.index}}, true) = a.attname THEN FALSE ELSE TRUE END AS is_exp
+FROM pg_catalog.pg_index i
+JOIN pg_catalog.pg_attribute a ON (a.attrelid = i.indexrelid AND attnum = {{loop.index}})
+JOIN pg_catalog.pg_type ty ON ty.oid=a.atttypid
+LEFT OUTER JOIN pg_catalog.pg_opclass o ON (o.oid = i.indclass[{{loop.index -1}}])
+LEFT OUTER JOIN pg_catalog.pg_constraint c ON (c.conindid = i.indexrelid) LEFT OUTER JOIN pg_operator op ON (op.oid = c.conexclop[{{loop.index}}])
+LEFT OUTER JOIN pg_catalog.pg_collation coll ON a.attcollation=coll.oid
+LEFT OUTER JOIN pg_catalog.pg_namespace nspc ON coll.collnamespace=nspc.oid
 WHERE i.indexrelid = {{cid}}::oid
 {% endfor %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.2_plus/get_operator.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.2_plus/get_operator.sql
index 3c10f708b..eb0c72fd2 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.2_plus/get_operator.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.2_plus/get_operator.sql
@@ -1,22 +1,22 @@
 {% if type is not none %}
 SELECT DISTINCT op.oprname as oprname
-FROM pg_operator op,
+FROM pg_catalog.pg_operator op,
 ( SELECT oid
-  FROM (SELECT format_type(t.oid,NULL) AS typname,
+  FROM (SELECT pg_catalog.format_type(t.oid,NULL) AS typname,
       t.oid as oid
-      FROM pg_type t
-      JOIN pg_namespace nsp ON typnamespace=nsp.oid
+      FROM pg_catalog.pg_type t
+      JOIN pg_catalog.pg_namespace nsp ON typnamespace=nsp.oid
       WHERE (NOT (typname = 'unknown' AND nspname = 'pg_catalog')) AND
       typisdefined AND
       typtype IN ('b', 'c', 'd', 'e', 'r') AND
       NOT EXISTS (SELECT 1
-                  FROM pg_class
+                  FROM pg_catalog.pg_class
                   WHERE relnamespace=typnamespace AND
                   relname = typname AND
                   relkind != 'c') AND
       (typname NOT LIKE '_%' OR
       NOT EXISTS (SELECT 1
-                  FROM pg_class
+                  FROM pg_catalog.pg_class
                   WHERE relnamespace=typnamespace AND
                     relname = SUBSTRING(typname FROM 2)::name AND
                     relkind != 'c'))
@@ -31,6 +31,6 @@ WHERE oprcom > 0 AND
       (op.oprleft=types.oid OR op.oprright=types.oid)
 {% else %}
 SELECT DISTINCT op.oprname as oprname
-FROM pg_operator op
+FROM pg_catalog.pg_operator op
 WHERE oprcom > 0
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.6_plus/get_access_methods.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.6_plus/get_access_methods.sql
index f5b1f144a..e46955433 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.6_plus/get_access_methods.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.6_plus/get_access_methods.sql
@@ -1,6 +1,6 @@
 SELECT amname
-FROM pg_am
+FROM pg_catalog.pg_am
 WHERE EXISTS (SELECT 1
-              FROM pg_proc
+              FROM pg_catalog.pg_proc
               WHERE oid=amhandler)
-ORDER BY amname;
\ No newline at end of file
+ORDER BY amname;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_access_methods.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_access_methods.sql
index 5d740578d..b47abe738 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_access_methods.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_access_methods.sql
@@ -1,6 +1,6 @@
 SELECT amname
-FROM pg_am
+FROM pg_catalog.pg_am
 WHERE EXISTS (SELECT 1
-              FROM pg_proc
+              FROM pg_catalog.pg_proc
               WHERE oid=amgettuple)
-ORDER BY amname;
\ No newline at end of file
+ORDER BY amname;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_constraint_cols.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_constraint_cols.sql
index 3d024db66..0a2e3f6d6 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_constraint_cols.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_constraint_cols.sql
@@ -4,21 +4,21 @@ UNION
 {% endif %}
 SELECT
   i.indoption[{{loop.index -1}}] AS options,
-  pg_get_indexdef(i.indexrelid, {{loop.index}}, true) AS coldef,
+  pg_catalog.pg_get_indexdef(i.indexrelid, {{loop.index}}, true) AS coldef,
   op.oprname,
   CASE WHEN (o.opcdefault = FALSE) THEN o.opcname ELSE null END AS opcname
 ,
   coll.collname,
   nspc.nspname as collnspname,
-  format_type(ty.oid,NULL) AS datatype,
-  CASE WHEN pg_get_indexdef(i.indexrelid, {{loop.index}}, true) = a.attname THEN FALSE ELSE TRUE END AS is_exp
-FROM pg_index i
-JOIN pg_attribute a ON (a.attrelid = i.indexrelid AND attnum = {{loop.index}})
-JOIN pg_type ty ON ty.oid=a.atttypid
-LEFT OUTER JOIN pg_opclass o ON (o.oid = i.indclass[{{loop.index -1}}])
-LEFT OUTER JOIN pg_constraint c ON (c.conindid = i.indexrelid)
-LEFT OUTER JOIN pg_operator op ON (op.oid = c.conexclop[{{loop.index}}])
-LEFT OUTER JOIN pg_collation coll ON a.attcollation=coll.oid
-LEFT OUTER JOIN pg_namespace nspc ON coll.collnamespace=nspc.oid
+  pg_catalog.format_type(ty.oid,NULL) AS datatype,
+  CASE WHEN pg_catalog.pg_get_indexdef(i.indexrelid, {{loop.index}}, true) = a.attname THEN FALSE ELSE TRUE END AS is_exp
+FROM pg_catalog.pg_index i
+JOIN pg_catalog.pg_attribute a ON (a.attrelid = i.indexrelid AND attnum = {{loop.index}})
+JOIN pg_catalog.pg_type ty ON ty.oid=a.atttypid
+LEFT OUTER JOIN pg_catalog.pg_opclass o ON (o.oid = i.indclass[{{loop.index -1}}])
+LEFT OUTER JOIN pg_catalog.pg_constraint c ON (c.conindid = i.indexrelid)
+LEFT OUTER JOIN pg_catalog.pg_operator op ON (op.oid = c.conexclop[{{loop.index}}])
+LEFT OUTER JOIN pg_catalog.pg_collation coll ON a.attcollation=coll.oid
+LEFT OUTER JOIN pg_catalog.pg_namespace nspc ON coll.collnamespace=nspc.oid
 WHERE i.indexrelid = {{cid}}::oid
 {% endfor %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_name.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_name.sql
index 7aaa5223f..42d8e5b54 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_name.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_name.sql
@@ -1,3 +1,3 @@
 SELECT conname as name
-FROM pg_constraint ct
-WHERE ct.conindid = {{cid}}::oid
\ No newline at end of file
+FROM pg_catalog.pg_constraint ct
+WHERE ct.conindid = {{cid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_oid.sql
index 7d4e46439..21599a558 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_oid.sql
@@ -1,4 +1,4 @@
 SELECT ct.conindid AS oid
-FROM pg_constraint ct
+FROM pg_catalog.pg_constraint ct
 WHERE contype='x' AND
-ct.conname = {{ name|qtLiteral }};
\ No newline at end of file
+ct.conname = {{ name|qtLiteral }};
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_oid_with_transaction.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_oid_with_transaction.sql
index 1b2b72799..52024fe30 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_oid_with_transaction.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_oid_with_transaction.sql
@@ -1,6 +1,6 @@
 SELECT ct.conindid AS oid,
     ct.conname AS name,
     true AS convalidated
-FROM pg_constraint ct
+FROM pg_catalog.pg_constraint ct
 WHERE contype='x' AND
     conrelid = {{tid}}::oid LIMIT 1;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_oper_class.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_oper_class.sql
index c6739d0d6..0624a0e49 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_oper_class.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_oper_class.sql
@@ -1,7 +1,7 @@
 SELECT opcname
-FROM pg_opclass opc,
-pg_am am
+FROM pg_catalog.pg_opclass opc,
+pg_catalog.pg_am am
 WHERE opcmethod=am.oid AND
       am.amname ={{indextype|qtLiteral}} AND
       NOT opcdefault
-ORDER BY 1
\ No newline at end of file
+ORDER BY 1
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_operator.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_operator.sql
index 684e1dd4d..a1ad0d3d3 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_operator.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_operator.sql
@@ -1,22 +1,22 @@
 {% if type is not none %}
 SELECT DISTINCT op.oprname as oprname
-FROM pg_operator op,
+FROM pg_catalog.pg_operator op,
 ( SELECT oid
-  FROM (SELECT format_type(t.oid,NULL) AS typname,
+  FROM (SELECT pg_catalog.format_type(t.oid,NULL) AS typname,
       t.oid as oid
-      FROM pg_type t
-      JOIN pg_namespace nsp ON typnamespace=nsp.oid
+      FROM pg_catalog.pg_type t
+      JOIN pg_catalog.pg_namespace nsp ON typnamespace=nsp.oid
       WHERE (NOT (typname = 'unknown' AND nspname = 'pg_catalog')) AND
       typisdefined AND
       typtype IN ('b', 'c', 'd', 'e', 'r') AND
       NOT EXISTS (SELECT 1
-                  FROM pg_class
+                  FROM pg_catalog.pg_class
                   WHERE relnamespace=typnamespace AND
                   relname = typname AND
                   relkind != 'c') AND
       (typname NOT LIKE '_%' OR
       NOT EXISTS (SELECT 1
-                  FROM pg_class
+                  FROM pg_catalog.pg_class
                   WHERE relnamespace=typnamespace AND
                     relname = SUBSTRING(typname FROM 2)::name AND
                     relkind != 'c'))
@@ -30,6 +30,6 @@ WHERE oprcom > 0 AND
       (op.oprleft=types.oid OR op.oprright=types.oid)
 {% else %}
 SELECT DISTINCT op.oprname as oprname
-FROM pg_operator op
+FROM pg_catalog.pg_operator op
 WHERE oprcom > 0
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_parent.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_parent.sql
index da79d0fcd..0e8e5a1eb 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_parent.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_parent.sql
@@ -1,7 +1,7 @@
 SELECT nsp.nspname AS schema,
     rel.relname AS table
 FROM
-    pg_class rel
-JOIN pg_namespace nsp
+    pg_catalog.pg_class rel
+JOIN pg_catalog.pg_namespace nsp
 ON rel.relnamespace = nsp.oid::oid
-WHERE rel.oid = {{tid}}::oid
\ No newline at end of file
+WHERE rel.oid = {{tid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/nodes.sql
index 8f0ab4121..8d13cb899 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/nodes.sql
@@ -1,3 +1,3 @@
 SELECT '' AS oid, '' AS conname, '' AS convalidated
-FROM pg_constraint ct
+FROM pg_catalog.pg_constraint ct
 WHERE false
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/properties.sql
index a1a7b5a4e..d27fcced4 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/properties.sql
@@ -3,8 +3,8 @@ SELECT cls.oid,
     indnatts as col_count,
     amname,
     CASE WHEN length(spcname::text) > 0 THEN spcname ELSE
-        (SELECT sp.spcname FROM pg_database dtb
-        JOIN pg_tablespace sp ON dtb.dattablespace=sp.oid
+        (SELECT sp.spcname FROM pg_catalog.pg_database dtb
+        JOIN pg_catalog.pg_tablespace sp ON dtb.dattablespace=sp.oid
         WHERE dtb.oid = {{ did }}::oid)
     END as spcname,
     CASE contype
@@ -15,16 +15,16 @@ SELECT cls.oid,
     END AS comment,
     condeferrable,
     condeferred,
-    substring(array_to_string(cls.reloptions, ',') from 'fillfactor=([0-9]*)') AS fillfactor,
-    pg_get_expr(idx.indpred, idx.indrelid, true) AS indconstraint
-FROM pg_index idx
-JOIN pg_class cls ON cls.oid=indexrelid
-LEFT OUTER JOIN pg_tablespace ta on ta.oid=cls.reltablespace
-JOIN pg_am am ON am.oid=cls.relam
-LEFT JOIN pg_depend dep ON (dep.classid = cls.tableoid AND dep.objid = cls.oid AND dep.refobjsubid = '0' AND dep.refclassid=(SELECT oid FROM pg_class WHERE relname='pg_constraint') AND dep.deptype='i')
-LEFT OUTER JOIN pg_constraint con ON (con.tableoid = dep.refclassid AND con.oid = dep.refobjid)
-LEFT OUTER JOIN pg_description des ON (des.objoid=cls.oid AND des.classoid='pg_class'::regclass)
-LEFT OUTER JOIN pg_description desp ON (desp.objoid=con.oid AND desp.objsubid = 0 AND desp.classoid='pg_constraint'::regclass)
+    substring(pg_catalog.array_to_string(cls.reloptions, ',') from 'fillfactor=([0-9]*)') AS fillfactor,
+    pg_catalog.pg_get_expr(idx.indpred, idx.indrelid, true) AS indconstraint
+FROM pg_catalog.pg_index idx
+JOIN pg_catalog.pg_class cls ON cls.oid=indexrelid
+LEFT OUTER JOIN pg_catalog.pg_tablespace ta on ta.oid=cls.reltablespace
+JOIN pg_catalog.pg_am am ON am.oid=cls.relam
+LEFT JOIN pg_catalog.pg_depend dep ON (dep.classid = cls.tableoid AND dep.objid = cls.oid AND dep.refobjsubid = '0' AND dep.refclassid=(SELECT oid FROM pg_catalog.pg_class WHERE relname='pg_constraint') AND dep.deptype='i')
+LEFT OUTER JOIN pg_catalog.pg_constraint con ON (con.tableoid = dep.refclassid AND con.oid = dep.refobjid)
+LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=cls.oid AND des.classoid='pg_class'::regclass)
+LEFT OUTER JOIN pg_catalog.pg_description desp ON (desp.objoid=con.oid AND desp.objsubid = 0 AND desp.classoid='pg_constraint'::regclass)
 WHERE indrelid = {{tid}}::oid
 {% if cid %}
 AND cls.oid = {{cid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/stats.sql
index 6e170b967..e127f1a65 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/stats.sql
@@ -4,7 +4,7 @@ SELECT
     idx_tup_fetch AS {{ conn|qtIdent(_('Index tuples fetched')) }},
     idx_blks_read AS {{ conn|qtIdent(_('Index blocks read')) }},
     idx_blks_hit AS {{ conn|qtIdent(_('Index blocks hit')) }},
-    pg_relation_size({{ exid }}::OID) AS {{ conn|qtIdent(_('Index size')) }}
+    pg_catalog.pg_relation_size({{ exid }}::OID) AS {{ conn|qtIdent(_('Index size')) }}
 {#=== Extended stats ===#}
 {% if is_pgstattuple %}
     ,version AS {{ conn|qtIdent(_('Version')) }},
@@ -18,11 +18,11 @@ SELECT
     avg_leaf_density AS {{ conn|qtIdent(_('Average leaf density')) }},
     leaf_fragmentation AS {{ conn|qtIdent(_('Leaf fragmentation')) }}
 FROM
-    pgstatindex('{{conn|qtIdent(schema)}}.{{conn|qtIdent(name)}}'), pg_stat_all_indexes stat
+    pgstatindex('{{conn|qtIdent(schema)}}.{{conn|qtIdent(name)}}'), pg_catalog.pg_stat_all_indexes stat
 {% else %}
 FROM
-    pg_stat_all_indexes stat
+    pg_catalog.pg_stat_all_indexes stat
 {% endif %}
-    JOIN pg_statio_all_indexes statio ON stat.indexrelid = statio.indexrelid
-    JOIN pg_class cl ON cl.oid=stat.indexrelid
+    JOIN pg_catalog.pg_statio_all_indexes statio ON stat.indexrelid = statio.indexrelid
+    JOIN pg_catalog.pg_class cl ON cl.oid=stat.indexrelid
     WHERE stat.indexrelid = {{ exid }}::OID
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/9.1_plus/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/9.1_plus/get_oid.sql
index 576c9761c..5b0b42132 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/9.1_plus/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/9.1_plus/get_oid.sql
@@ -1,5 +1,5 @@
 SELECT ct.oid,
     NOT convalidated as convalidated
-FROM pg_constraint ct
+FROM pg_catalog.pg_constraint ct
 WHERE contype='f' AND
-ct.conname = {{ name|qtLiteral }};
\ No newline at end of file
+ct.conname = {{ name|qtLiteral }};
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/9.1_plus/get_oid_with_transaction.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/9.1_plus/get_oid_with_transaction.sql
index abe636a18..1a700e62e 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/9.1_plus/get_oid_with_transaction.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/9.1_plus/get_oid_with_transaction.sql
@@ -1,6 +1,6 @@
 SELECT ct.oid,
     ct.conname as name,
     NOT convalidated as convalidated
-FROM pg_constraint ct
+FROM pg_catalog.pg_constraint ct
 WHERE contype='f' AND
-    conrelid = {{tid}}::oid LIMIT 1;
\ No newline at end of file
+    conrelid = {{tid}}::oid LIMIT 1;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/9.1_plus/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/9.1_plus/nodes.sql
index be54e8cb0..765c0391a 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/9.1_plus/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/9.1_plus/nodes.sql
@@ -1,7 +1,7 @@
 SELECT ct.oid,
     conname as name,
     NOT convalidated as convalidated
-FROM pg_constraint ct
+FROM pg_catalog.pg_constraint ct
 WHERE contype='f' AND
     conrelid = {{tid}}::oid
 ORDER BY conname
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/9.1_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/9.1_plus/properties.sql
index c25cbd6c9..ce2c5a1fe 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/9.1_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/9.1_plus/properties.sql
@@ -17,12 +17,12 @@ SELECT ct.oid,
       cr.relname as reftab,
       description as comment,
       convalidated
-FROM pg_constraint ct
-JOIN pg_class cl ON cl.oid=conrelid
-JOIN pg_namespace nl ON nl.oid=cl.relnamespace
-JOIN pg_class cr ON cr.oid=confrelid
-JOIN pg_namespace nr ON nr.oid=cr.relnamespace
-LEFT OUTER JOIN pg_description des ON (des.objoid=ct.oid AND des.classoid='pg_constraint'::regclass)
+FROM pg_catalog.pg_constraint ct
+JOIN pg_catalog.pg_class cl ON cl.oid=conrelid
+JOIN pg_catalog.pg_namespace nl ON nl.oid=cl.relnamespace
+JOIN pg_catalog.pg_class cr ON cr.oid=confrelid
+JOIN pg_catalog.pg_namespace nr ON nr.oid=cr.relnamespace
+LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=ct.oid AND des.classoid='pg_constraint'::regclass)
 WHERE contype='f' AND
 conrelid = {{tid}}::oid
 {% if cid %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/default/get_cols.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/default/get_cols.sql
index 4b2fee25a..bd3d0697d 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/default/get_cols.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/default/get_cols.sql
@@ -1,7 +1,7 @@
 {% for n in range(colcnt|int) %}
 {% if loop.index != 1 %}
-UNION SELECT  pg_get_indexdef({{ cid|string }}, {{ loop.index|string }}, true) AS column
+UNION SELECT  pg_catalog.pg_get_indexdef({{ cid|string }}, {{ loop.index|string }}, true) AS column
 {% else %}
-SELECT  pg_get_indexdef({{ cid|string }} , {{ loop.index|string }} , true) AS column
+SELECT  pg_catalog.pg_get_indexdef({{ cid|string }} , {{ loop.index|string }} , true) AS column
 {% endif %}
-{% endfor %}
\ No newline at end of file
+{% endfor %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/default/get_constraint_cols.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/default/get_constraint_cols.sql
index a96e575c0..508cb295a 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/default/get_constraint_cols.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/default/get_constraint_cols.sql
@@ -4,10 +4,10 @@ UNION
 {% endif %}
 SELECT a1.attname as conattname,
     a2.attname as confattname
-FROM pg_attribute a1,
-    pg_attribute a2
+FROM pg_catalog.pg_attribute a1,
+    pg_catalog.pg_attribute a2
 WHERE a1.attrelid={{tid}}::oid
     AND a1.attnum={{keypair[1]}}
     AND a2.attrelid={{confrelid}}::oid
     AND a2.attnum={{keypair[0]}}
-{% endfor %}
\ No newline at end of file
+{% endfor %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/default/get_constraints.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/default/get_constraints.sql
index 9313a030a..c89a6f310 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/default/get_constraints.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/default/get_constraints.sql
@@ -1,37 +1,37 @@
 SELECT   cls.oid, cls.relname as idxname, indnatts as col_count
-  FROM pg_index idx
-  JOIN pg_class cls ON cls.oid=indexrelid
-  LEFT JOIN pg_depend dep ON (dep.classid = cls.tableoid AND dep.objid = cls.oid AND dep.refobjsubid = '0' AND dep.refclassid=(SELECT oid FROM pg_class WHERE relname='pg_constraint') AND dep.deptype='i')
-  LEFT OUTER JOIN pg_constraint con ON (con.tableoid = dep.refclassid AND con.oid = dep.refobjid)
+  FROM pg_catalog.pg_index idx
+  JOIN pg_catalog.pg_class cls ON cls.oid=indexrelid
+  LEFT JOIN pg_catalog.pg_depend dep ON (dep.classid = cls.tableoid AND dep.objid = cls.oid AND dep.refobjsubid = '0' AND dep.refclassid=(SELECT oid FROM pg_catalog.pg_class WHERE relname='pg_constraint') AND dep.deptype='i')
+  LEFT OUTER JOIN pg_catalog.pg_constraint con ON (con.tableoid = dep.refclassid AND con.oid = dep.refobjid)
 WHERE idx.indrelid = {{tid}}::oid
     AND con.contype='p'
 
 UNION
 
 SELECT  cls.oid, cls.relname as idxname, indnatts
-    FROM pg_index idx
-    JOIN pg_class cls ON cls.oid=indexrelid
-    LEFT JOIN pg_depend dep ON (dep.classid = cls.tableoid AND dep.objid = cls.oid AND dep.refobjsubid = '0' AND dep.refclassid=(SELECT oid FROM pg_class WHERE relname='pg_constraint') AND dep.deptype='i')
-    LEFT OUTER JOIN pg_constraint con ON (con.tableoid = dep.refclassid AND con.oid = dep.refobjid)
+    FROM pg_catalog.pg_index idx
+    JOIN pg_catalog.pg_class cls ON cls.oid=indexrelid
+    LEFT JOIN pg_catalog.pg_depend dep ON (dep.classid = cls.tableoid AND dep.objid = cls.oid AND dep.refobjsubid = '0' AND dep.refclassid=(SELECT oid FROM pg_catalog.pg_class WHERE relname='pg_constraint') AND dep.deptype='i')
+    LEFT OUTER JOIN pg_catalog.pg_constraint con ON (con.tableoid = dep.refclassid AND con.oid = dep.refobjid)
 WHERE idx.indrelid = {{tid}}::oid
     AND con.contype='x'
 
 UNION
 
 SELECT  cls.oid, cls.relname as idxname, indnatts
-    FROM pg_index idx
-    JOIN pg_class cls ON cls.oid=indexrelid
-    LEFT JOIN pg_depend dep ON (dep.classid = cls.tableoid AND dep.objid = cls.oid AND dep.refobjsubid = '0' AND dep.refclassid=(SELECT oid FROM pg_class WHERE relname='pg_constraint') AND dep.deptype='i')
-    LEFT OUTER JOIN pg_constraint con ON (con.tableoid = dep.refclassid AND con.oid = dep.refobjid)
+    FROM pg_catalog.pg_index idx
+    JOIN pg_catalog.pg_class cls ON cls.oid=indexrelid
+    LEFT JOIN pg_catalog.pg_depend dep ON (dep.classid = cls.tableoid AND dep.objid = cls.oid AND dep.refobjsubid = '0' AND dep.refclassid=(SELECT oid FROM pg_catalog.pg_class WHERE relname='pg_constraint') AND dep.deptype='i')
+    LEFT OUTER JOIN pg_catalog.pg_constraint con ON (con.tableoid = dep.refclassid AND con.oid = dep.refobjid)
 WHERE idx.indrelid = {{tid}}::oid
     AND con.contype='u'
 
 UNION
 
 SELECT  cls.oid, cls.relname as idxname, indnatts
-    FROM pg_index idx
-    JOIN pg_class cls ON cls.oid=indexrelid
-    LEFT JOIN pg_depend dep ON (dep.classid = cls.tableoid AND dep.objid = cls.oid AND dep.refobjsubid = '0' AND dep.refclassid=(SELECT oid FROM pg_class WHERE relname='pg_constraint') AND dep.deptype='i')
-    LEFT OUTER JOIN pg_constraint con ON (con.tableoid = dep.refclassid AND con.oid = dep.refobjid)
+    FROM pg_catalog.pg_index idx
+    JOIN pg_catalog.pg_class cls ON cls.oid=indexrelid
+    LEFT JOIN pg_catalog.pg_depend dep ON (dep.classid = cls.tableoid AND dep.objid = cls.oid AND dep.refobjsubid = '0' AND dep.refclassid=(SELECT oid FROM pg_catalog.pg_class WHERE relname='pg_constraint') AND dep.deptype='i')
+    LEFT OUTER JOIN pg_catalog.pg_constraint con ON (con.tableoid = dep.refclassid AND con.oid = dep.refobjid)
 WHERE idx.indrelid = {{tid}}::oid
    AND conname IS NULL
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/default/get_name.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/default/get_name.sql
index 07fdae243..39d830edf 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/default/get_name.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/default/get_name.sql
@@ -1,3 +1,3 @@
 SELECT conname as name
-FROM pg_constraint ct
-WHERE ct.oid = {{fkid}}::oid
\ No newline at end of file
+FROM pg_catalog.pg_constraint ct
+WHERE ct.oid = {{fkid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/default/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/default/get_oid.sql
index 20d84278b..eda42e318 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/default/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/default/get_oid.sql
@@ -1,5 +1,5 @@
 SELECT ct.oid,
     true as convalidated
-FROM pg_constraint ct
+FROM pg_catalog.pg_constraint ct
 WHERE contype='f' AND
 ct.conname = {{ name|qtLiteral }};
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/default/get_oid_with_transaction.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/default/get_oid_with_transaction.sql
index b3728a53c..7d01b1598 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/default/get_oid_with_transaction.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/default/get_oid_with_transaction.sql
@@ -1,6 +1,6 @@
 SELECT ct.oid,
     ct.conname as name,
     true as convalidated
-FROM pg_constraint ct
+FROM pg_catalog.pg_constraint ct
 WHERE contype='f' AND
     conrelid = {{tid}}::oid LIMIT 1;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/default/get_parent.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/default/get_parent.sql
index da79d0fcd..0e8e5a1eb 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/default/get_parent.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/default/get_parent.sql
@@ -1,7 +1,7 @@
 SELECT nsp.nspname AS schema,
     rel.relname AS table
 FROM
-    pg_class rel
-JOIN pg_namespace nsp
+    pg_catalog.pg_class rel
+JOIN pg_catalog.pg_namespace nsp
 ON rel.relnamespace = nsp.oid::oid
-WHERE rel.oid = {{tid}}::oid
\ No newline at end of file
+WHERE rel.oid = {{tid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/default/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/default/nodes.sql
index 8ca7dc56f..51e2861cd 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/default/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/default/nodes.sql
@@ -1,7 +1,7 @@
 SELECT ct.oid,
     conname as name,
     true as convalidated
-FROM pg_constraint ct
+FROM pg_catalog.pg_constraint ct
 WHERE contype='f' AND
     conrelid = {{tid}}::oid
 ORDER BY conname
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/default/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/default/properties.sql
index 592f78efc..0a2b4f484 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/default/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/foreign_key/sql/default/properties.sql
@@ -18,12 +18,12 @@ SELECT
       nr.nspname as refnsp,
       cr.relname as reftab,
       description as comment
-FROM pg_constraint ct
-JOIN pg_class cl ON cl.oid=conrelid
-JOIN pg_namespace nl ON nl.oid=cl.relnamespace
-JOIN pg_class cr ON cr.oid=confrelid
-JOIN pg_namespace nr ON nr.oid=cr.relnamespace
-LEFT OUTER JOIN pg_description des ON (des.objoid=ct.oid AND des.classoid='pg_constraint'::regclass)
+FROM pg_catalog.pg_constraint ct
+JOIN pg_catalog.pg_class cl ON cl.oid=conrelid
+JOIN pg_catalog.pg_namespace nl ON nl.oid=cl.relnamespace
+JOIN pg_catalog.pg_class cr ON cr.oid=confrelid
+JOIN pg_catalog.pg_namespace nr ON nr.oid=cr.relnamespace
+LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=ct.oid AND des.classoid='pg_constraint'::regclass)
 WHERE contype='f' AND
 conrelid = {{tid}}::oid
 {% if cid %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index_constraint/sql/11_plus/get_constraint_include.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index_constraint/sql/11_plus/get_constraint_include.sql
index 73e7c59b1..ae9c84a40 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index_constraint/sql/11_plus/get_constraint_include.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index_constraint/sql/11_plus/get_constraint_include.sql
@@ -5,12 +5,12 @@ FROM (
     SELECT
       i.indnkeyatts,
       i.indrelid,
-      unnest(indkey) AS table_colnum,
-      unnest(ARRAY(SELECT generate_series(1, i.indnatts) AS n)) attnum
+      pg_catalog.unnest(indkey) AS table_colnum,
+      pg_catalog.unnest(ARRAY(SELECT pg_catalog.generate_series(1, i.indnatts) AS n)) attnum
     FROM
       pg_index i
     WHERE i.indexrelid = {{cid}}::OID
-) i JOIN pg_attribute a
+) i JOIN pg_catalog.pg_attribute a
 ON (a.attrelid = i.indrelid AND i.table_colnum = a.attnum)
 WHERE i.attnum > i.indnkeyatts
 ORDER BY i.attnum
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index_constraint/sql/11_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index_constraint/sql/11_plus/properties.sql
index 16549fa33..b1d5c69c5 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index_constraint/sql/11_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index_constraint/sql/11_plus/properties.sql
@@ -2,8 +2,8 @@ SELECT cls.oid,
     cls.relname as name,
     indnkeyatts as col_count,
     CASE WHEN length(spcname::text) > 0 THEN spcname ELSE
-        (SELECT sp.spcname FROM pg_database dtb
-        JOIN pg_tablespace sp ON dtb.dattablespace=sp.oid
+        (SELECT sp.spcname FROM pg_catalog.pg_database dtb
+        JOIN pg_catalog.pg_tablespace sp ON dtb.dattablespace=sp.oid
         WHERE dtb.oid = {{ did }}::oid)
     END as spcname,
     CASE contype
@@ -14,14 +14,14 @@ SELECT cls.oid,
     END AS comment,
     condeferrable,
     condeferred,
-    substring(array_to_string(cls.reloptions, ',') from 'fillfactor=([0-9]*)') AS fillfactor
-FROM pg_index idx
-JOIN pg_class cls ON cls.oid=indexrelid
-LEFT OUTER JOIN pg_tablespace ta on ta.oid=cls.reltablespace
-LEFT JOIN pg_depend dep ON (dep.classid = cls.tableoid AND dep.objid = cls.oid AND dep.refobjsubid = '0' AND dep.refclassid=(SELECT oid FROM pg_class WHERE relname='pg_constraint') AND dep.deptype='i')
-LEFT OUTER JOIN pg_constraint con ON (con.tableoid = dep.refclassid AND con.oid = dep.refobjid)
-LEFT OUTER JOIN pg_description des ON (des.objoid=cls.oid AND des.classoid='pg_class'::regclass)
-LEFT OUTER JOIN pg_description desp ON (desp.objoid=con.oid AND desp.objsubid = 0 AND desp.classoid='pg_constraint'::regclass)
+    substring(pg_catalog.array_to_string(cls.reloptions, ',') from 'fillfactor=([0-9]*)') AS fillfactor
+FROM pg_catalog.pg_index idx
+JOIN pg_catalog.pg_class cls ON cls.oid=indexrelid
+LEFT OUTER JOIN pg_catalog.pg_tablespace ta on ta.oid=cls.reltablespace
+LEFT JOIN pg_catalog.pg_depend dep ON (dep.classid = cls.tableoid AND dep.objid = cls.oid AND dep.refobjsubid = '0' AND dep.refclassid=(SELECT oid FROM pg_catalog.pg_class WHERE relname='pg_constraint') AND dep.deptype='i')
+LEFT OUTER JOIN pg_catalog.pg_constraint con ON (con.tableoid = dep.refclassid AND con.oid = dep.refobjid)
+LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=cls.oid AND des.classoid='pg_class'::regclass)
+LEFT OUTER JOIN pg_catalog.pg_description desp ON (desp.objoid=con.oid AND desp.objsubid = 0 AND desp.classoid='pg_constraint'::regclass)
 WHERE indrelid = {{tid}}::oid
 {% if cid %}
 AND cls.oid = {{cid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index_constraint/sql/default/get_constraint_cols.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index_constraint/sql/default/get_constraint_cols.sql
index 61233c192..b2106137e 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index_constraint/sql/default/get_constraint_cols.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index_constraint/sql/default/get_constraint_cols.sql
@@ -5,10 +5,10 @@ because we lose ordering when we use UNION
 SELECT * FROM (
 {% for n in range(colcnt|int) %}
 {% if loop.index != 1 %}
-UNION SELECT  pg_get_indexdef({{ cid|string }}, {{ loop.index|string }}, true) AS column, {{ n }} AS dummy
+UNION SELECT  pg_catalog.pg_get_indexdef({{ cid|string }}, {{ loop.index|string }}, true) AS column, {{ n }} AS dummy
 {% else %}
-SELECT  pg_get_indexdef({{ cid|string }} , {{ loop.index|string }} , true) AS column, {{ n }} AS dummy
+SELECT  pg_catalog.pg_get_indexdef({{ cid|string }} , {{ loop.index|string }} , true) AS column, {{ n }} AS dummy
 {% endif %}
 {% endfor %}
 ) tmp
-ORDER BY dummy
\ No newline at end of file
+ORDER BY dummy
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index_constraint/sql/default/get_indices.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index_constraint/sql/default/get_indices.sql
index b9cab213b..3e10bbd87 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index_constraint/sql/default/get_indices.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index_constraint/sql/default/get_indices.sql
@@ -1,3 +1,3 @@
-SELECT relname FROM pg_class, pg_index
-WHERE pg_class.oid=indexrelid
-AND indrelid={{ tid }}
\ No newline at end of file
+SELECT relname FROM pg_catalog.pg_class, pg_catalog.pg_index
+WHERE pg_catalog.pg_class.oid=indexrelid
+AND indrelid={{ tid }}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index_constraint/sql/default/get_name.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index_constraint/sql/default/get_name.sql
index a1beafb04..a46813521 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index_constraint/sql/default/get_name.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index_constraint/sql/default/get_name.sql
@@ -1,15 +1,15 @@
 SELECT cls.relname as name
-FROM pg_index idx
-JOIN pg_class cls ON cls.oid=indexrelid
-LEFT JOIN pg_depend dep ON (dep.classid = cls.tableoid AND
+FROM pg_catalog.pg_index idx
+JOIN pg_catalog.pg_class cls ON cls.oid=indexrelid
+LEFT JOIN pg_catalog.pg_depend dep ON (dep.classid = cls.tableoid AND
                             dep.objid = cls.oid AND
                             dep.refobjsubid = '0'
                             AND dep.refclassid=(SELECT oid
-                                                FROM pg_class
+                                                FROM pg_catalog.pg_class
                                                 WHERE relname='pg_constraint') AND
                             dep.deptype='i')
-LEFT OUTER JOIN pg_constraint con ON (con.tableoid = dep.refclassid AND
+LEFT OUTER JOIN pg_catalog.pg_constraint con ON (con.tableoid = dep.refclassid AND
                                       con.oid = dep.refobjid)
 WHERE indrelid = {{tid}}::oid
 AND contype='{{constraint_type}}'
-AND cls.oid = {{cid}}::oid;
\ No newline at end of file
+AND cls.oid = {{cid}}::oid;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index_constraint/sql/default/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index_constraint/sql/default/get_oid.sql
index 861ff5060..154b8c44c 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index_constraint/sql/default/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index_constraint/sql/default/get_oid.sql
@@ -1,4 +1,4 @@
 SELECT ct.conindid as oid
-FROM pg_constraint ct
+FROM pg_catalog.pg_constraint ct
 WHERE contype='{{constraint_type}}' AND
-ct.conname = {{ name|qtLiteral }};
\ No newline at end of file
+ct.conname = {{ name|qtLiteral }};
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index_constraint/sql/default/get_oid_with_transaction.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index_constraint/sql/default/get_oid_with_transaction.sql
index 9ad802003..968c4be38 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index_constraint/sql/default/get_oid_with_transaction.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index_constraint/sql/default/get_oid_with_transaction.sql
@@ -1,5 +1,5 @@
 SELECT ct.conindid as oid,
     ct.conname as name
-FROM pg_constraint ct
+FROM pg_catalog.pg_constraint ct
 WHERE contype='{{constraint_type}}' AND
-    conrelid = {{tid}}::oid LIMIT 1;
\ No newline at end of file
+    conrelid = {{tid}}::oid LIMIT 1;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index_constraint/sql/default/get_parent.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index_constraint/sql/default/get_parent.sql
index da79d0fcd..0e8e5a1eb 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index_constraint/sql/default/get_parent.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index_constraint/sql/default/get_parent.sql
@@ -1,7 +1,7 @@
 SELECT nsp.nspname AS schema,
     rel.relname AS table
 FROM
-    pg_class rel
-JOIN pg_namespace nsp
+    pg_catalog.pg_class rel
+JOIN pg_catalog.pg_namespace nsp
 ON rel.relnamespace = nsp.oid::oid
-WHERE rel.oid = {{tid}}::oid
\ No newline at end of file
+WHERE rel.oid = {{tid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index_constraint/sql/default/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index_constraint/sql/default/nodes.sql
index 1e84585a2..ca9d53a51 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index_constraint/sql/default/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index_constraint/sql/default/nodes.sql
@@ -1,17 +1,17 @@
 SELECT cls.oid, cls.relname as name
-FROM pg_index idx
-JOIN pg_class cls ON cls.oid=indexrelid
-LEFT JOIN pg_depend dep ON (dep.classid = cls.tableoid AND
+FROM pg_catalog.pg_index idx
+JOIN pg_catalog.pg_class cls ON cls.oid=indexrelid
+LEFT JOIN pg_catalog.pg_depend dep ON (dep.classid = cls.tableoid AND
                             dep.objid = cls.oid AND
                             dep.refobjsubid = '0' AND
                             dep.refclassid=(SELECT oid
-                                            FROM pg_class
+                                            FROM pg_catalog.pg_class
                                             WHERE relname='pg_constraint') AND
                             dep.deptype='i')
-LEFT OUTER JOIN pg_constraint con ON (con.tableoid = dep.refclassid AND
+LEFT OUTER JOIN pg_catalog.pg_constraint con ON (con.tableoid = dep.refclassid AND
                                       con.oid = dep.refobjid)
 WHERE indrelid = {{tid}}::oid
 AND contype='{{constraint_type}}'
 {% if cid %}
 AND cls.oid = {{cid}}::oid
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index_constraint/sql/default/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index_constraint/sql/default/properties.sql
index cab1e4137..0307e46c6 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index_constraint/sql/default/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index_constraint/sql/default/properties.sql
@@ -2,8 +2,8 @@ SELECT cls.oid,
     cls.relname as name,
     indnatts as col_count,
     CASE WHEN length(spcname::text) > 0 THEN spcname ELSE
-        (SELECT sp.spcname FROM pg_database dtb
-        JOIN pg_tablespace sp ON dtb.dattablespace=sp.oid
+        (SELECT sp.spcname FROM pg_catalog.pg_database dtb
+        JOIN pg_catalog.pg_tablespace sp ON dtb.dattablespace=sp.oid
         WHERE dtb.oid = {{ did }}::oid)
     END as spcname,
     CASE contype
@@ -14,14 +14,14 @@ SELECT cls.oid,
     END AS comment,
     condeferrable,
     condeferred,
-    substring(array_to_string(cls.reloptions, ',') from 'fillfactor=([0-9]*)') AS fillfactor
-FROM pg_index idx
-JOIN pg_class cls ON cls.oid=indexrelid
-LEFT OUTER JOIN pg_tablespace ta on ta.oid=cls.reltablespace
-LEFT JOIN pg_depend dep ON (dep.classid = cls.tableoid AND dep.objid = cls.oid AND dep.refobjsubid = '0' AND dep.refclassid=(SELECT oid FROM pg_class WHERE relname='pg_constraint') AND dep.deptype='i')
-LEFT OUTER JOIN pg_constraint con ON (con.tableoid = dep.refclassid AND con.oid = dep.refobjid)
-LEFT OUTER JOIN pg_description des ON (des.objoid=cls.oid AND des.classoid='pg_class'::regclass)
-LEFT OUTER JOIN pg_description desp ON (desp.objoid=con.oid AND desp.objsubid = 0 AND desp.classoid='pg_constraint'::regclass)
+    substring(pg_catalog.array_to_string(cls.reloptions, ',') from 'fillfactor=([0-9]*)') AS fillfactor
+FROM pg_catalog.pg_index idx
+JOIN pg_catalog.pg_class cls ON cls.oid=indexrelid
+LEFT OUTER JOIN pg_catalog.pg_tablespace ta on ta.oid=cls.reltablespace
+LEFT JOIN pg_catalog.pg_depend dep ON (dep.classid = cls.tableoid AND dep.objid = cls.oid AND dep.refobjsubid = '0' AND dep.refclassid=(SELECT oid FROM pg_catalog.pg_class WHERE relname='pg_constraint') AND dep.deptype='i')
+LEFT OUTER JOIN pg_catalog.pg_constraint con ON (con.tableoid = dep.refclassid AND con.oid = dep.refobjid)
+LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=cls.oid AND des.classoid='pg_class'::regclass)
+LEFT OUTER JOIN pg_catalog.pg_description desp ON (desp.objoid=con.oid AND desp.objsubid = 0 AND desp.classoid='pg_constraint'::regclass)
 WHERE indrelid = {{tid}}::oid
 {% if cid %}
 AND cls.oid = {{cid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index_constraint/sql/default/stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index_constraint/sql/default/stats.sql
index 793d780fb..8c55db597 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index_constraint/sql/default/stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index_constraint/sql/default/stats.sql
@@ -18,11 +18,11 @@ SELECT
     avg_leaf_density AS {{ conn|qtIdent(_('Average leaf density')) }},
     leaf_fragmentation AS {{ conn|qtIdent(_('Leaf fragmentation')) }}
 FROM
-    pgstatindex('{{conn|qtIdent(schema)}}.{{conn|qtIdent(name)}}'), pg_stat_all_indexes stat
+    pgstatindex('{{conn|qtIdent(schema)}}.{{conn|qtIdent(name)}}'), pg_catalog.pg_stat_all_indexes stat
 {% else %}
 FROM
-    pg_stat_all_indexes stat
+    pg_catalog.pg_stat_all_indexes stat
 {% endif %}
-    JOIN pg_statio_all_indexes statio ON stat.indexrelid = statio.indexrelid
-    JOIN pg_class cl ON cl.oid=stat.indexrelid
+    JOIN pg_catalog.pg_statio_all_indexes statio ON stat.indexrelid = statio.indexrelid
+    JOIN pg_catalog.pg_class cl ON cl.oid=stat.indexrelid
     WHERE stat.indexrelid = {{ cid }}::OID
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/11_plus/column_details.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/11_plus/column_details.sql
index b8524168e..491ff4d47 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/11_plus/column_details.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/11_plus/column_details.sql
@@ -8,24 +8,24 @@ SELECT
     ELSE ARRAY['UNKNOWN OPTION' || i.indoption[i.attnum - 1]::text, '']
     END::text[] AS options,
     i.attnum,
-    pg_get_indexdef(i.indexrelid, i.attnum, true) as attdef,
+    pg_catalog.pg_get_indexdef(i.indexrelid, i.attnum, true) as attdef,
     CASE WHEN (o.opcdefault = FALSE) THEN o.opcname ELSE null END AS opcname,
     op.oprname AS oprname,
 	CASE WHEN length(nspc.nspname::text) > 0 AND length(coll.collname::text) > 0  THEN
-	  concat(quote_ident(nspc.nspname), '.', quote_ident(coll.collname))
+	  pg_catalog.concat(pg_catalog.quote_ident(nspc.nspname), '.', pg_catalog.quote_ident(coll.collname))
 	ELSE '' END AS collnspname
 FROM (
       SELECT
           indexrelid, i.indoption, i.indclass,
-          unnest(ARRAY(SELECT generate_series(1, i.indnkeyatts) AS n)) AS attnum
+          pg_catalog.unnest(ARRAY(SELECT pg_catalog.generate_series(1, i.indnkeyatts) AS n)) AS attnum
       FROM
-          pg_index i
+          pg_catalog.pg_index i
       WHERE i.indexrelid = {{idx}}::OID
 ) i
-    LEFT JOIN pg_opclass o ON (o.oid = i.indclass[i.attnum - 1])
-    LEFT OUTER JOIN pg_constraint c ON (c.conindid = i.indexrelid)
-    LEFT OUTER JOIN pg_operator op ON (op.oid = c.conexclop[i.attnum])
-    LEFT JOIN pg_attribute a ON (a.attrelid = i.indexrelid AND a.attnum = i.attnum)
-    LEFT OUTER JOIN pg_collation coll ON a.attcollation=coll.oid
-    LEFT OUTER JOIN pg_namespace nspc ON coll.collnamespace=nspc.oid
+    LEFT JOIN pg_catalog.pg_opclass o ON (o.oid = i.indclass[i.attnum - 1])
+    LEFT OUTER JOIN pg_catalog.pg_constraint c ON (c.conindid = i.indexrelid)
+    LEFT OUTER JOIN pg_catalog.pg_operator op ON (op.oid = c.conexclop[i.attnum])
+    LEFT JOIN pg_catalog.pg_attribute a ON (a.attrelid = i.indexrelid AND a.attnum = i.attnum)
+    LEFT OUTER JOIN pg_catalog.pg_collation coll ON a.attcollation=coll.oid
+    LEFT OUTER JOIN pg_catalog.pg_namespace nspc ON coll.collnamespace=nspc.oid
 ORDER BY i.attnum;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/11_plus/include_details.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/11_plus/include_details.sql
index 49d6173cd..38daa85c4 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/11_plus/include_details.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/11_plus/include_details.sql
@@ -5,12 +5,12 @@ FROM (
     SELECT
       i.indnkeyatts,
       i.indrelid,
-      unnest(indkey) AS table_colnum,
-      unnest(ARRAY(SELECT generate_series(1, i.indnatts) AS n)) attnum
+      pg_catalog.unnest(indkey) AS table_colnum,
+      pg_catalog.unnest(ARRAY(SELECT pg_catalog.generate_series(1, i.indnatts) AS n)) attnum
     FROM
-      pg_index i
+      pg_catalog.pg_index i
     WHERE i.indexrelid = {{idx}}::OID
-) i JOIN pg_attribute a
+) i JOIN pg_catalog.pg_attribute a
 ON (a.attrelid = i.indrelid AND i.table_colnum = a.attnum)
 WHERE i.attnum > i.indnkeyatts
 ORDER BY i.attnum
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/default/backend_support.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/default/backend_support.sql
index 6f66ed1b4..bb6264517 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/default/backend_support.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/default/backend_support.sql
@@ -3,7 +3,7 @@
 SELECT
     CASE WHEN c.relkind = 'm' THEN True ELSE False END As m_view
 FROM
-    pg_class c
+    pg_catalog.pg_class c
 WHERE
     c.oid = {{ vid }}::oid
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/default/coll_stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/default/coll_stats.sql
index 6cade6f59..239ca9054 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/default/coll_stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/default/coll_stats.sql
@@ -3,13 +3,13 @@ SELECT
     idx_scan AS {{ conn|qtIdent(_('Index scans')) }},
     idx_tup_read AS {{ conn|qtIdent(_('Index tuples read')) }},
     idx_tup_fetch AS {{ conn|qtIdent(_('Index tuples fetched')) }},
-    pg_relation_size(indexrelid) AS {{ conn|qtIdent(_('Size')) }}
+    pg_catalog.pg_relation_size(indexrelid) AS {{ conn|qtIdent(_('Size')) }}
 FROM
-    pg_stat_all_indexes stat
-    JOIN pg_class cls ON cls.oid=indexrelid
-    LEFT JOIN pg_depend dep ON (dep.classid = cls.tableoid AND dep.objid = cls.oid AND dep.refobjsubid = '0'
-        AND dep.refclassid=(SELECT oid FROM pg_class WHERE relname='pg_constraint'))
-    LEFT OUTER JOIN pg_constraint con ON (con.tableoid = dep.refclassid AND con.oid = dep.refobjid)
+    pg_catalog.pg_stat_all_indexes stat
+    JOIN pg_catalog.pg_class cls ON cls.oid=indexrelid
+    LEFT JOIN pg_catalog.pg_depend dep ON (dep.classid = cls.tableoid AND dep.objid = cls.oid AND dep.refobjsubid = '0'
+        AND dep.refclassid=(SELECT oid FROM pg_catalog.pg_class WHERE relname='pg_constraint'))
+    LEFT OUTER JOIN pg_catalog.pg_constraint con ON (con.tableoid = dep.refclassid AND con.oid = dep.refobjid)
 WHERE
     schemaname = '{{schema}}'
     AND stat.relname = '{{table}}'
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/default/column_details.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/default/column_details.sql
index 68bfc7451..dc9d79ee2 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/default/column_details.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/default/column_details.sql
@@ -8,24 +8,24 @@ SELECT
     ELSE ARRAY['UNKNOWN OPTION' || i.indoption[i.attnum - 1]::text, '']
     END::text[] AS options,
     i.attnum,
-    pg_get_indexdef(i.indexrelid, i.attnum, true) as attdef,
+    pg_catalog.pg_get_indexdef(i.indexrelid, i.attnum, true) as attdef,
     CASE WHEN (o.opcdefault = FALSE) THEN o.opcname ELSE null END AS opcname,
     op.oprname AS oprname,
 	CASE WHEN length(nspc.nspname::text) > 0 AND length(coll.collname::text) > 0  THEN
-	  concat(quote_ident(nspc.nspname), '.', quote_ident(coll.collname))
+	  pg_catalog.concat(pg_catalog.quote_ident(nspc.nspname), '.', pg_catalog.quote_ident(coll.collname))
 	ELSE '' END AS collnspname
 FROM (
       SELECT
           indexrelid, i.indoption, i.indclass,
-          unnest(ARRAY(SELECT generate_series(1, i.indnatts) AS n)) AS attnum
+          pg_catalog.unnest(ARRAY(SELECT pg_catalog.generate_series(1, i.indnatts) AS n)) AS attnum
       FROM
-          pg_index i
+          pg_catalog.pg_index i
       WHERE i.indexrelid = {{idx}}::OID
 ) i
-    LEFT JOIN pg_opclass o ON (o.oid = i.indclass[i.attnum - 1])
-    LEFT OUTER JOIN pg_constraint c ON (c.conindid = i.indexrelid)
-    LEFT OUTER JOIN pg_operator op ON (op.oid = c.conexclop[i.attnum])
-    LEFT JOIN pg_attribute a ON (a.attrelid = i.indexrelid AND a.attnum = i.attnum)
-    LEFT OUTER JOIN pg_collation coll ON a.attcollation=coll.oid
-    LEFT OUTER JOIN pg_namespace nspc ON coll.collnamespace=nspc.oid
+    LEFT JOIN pg_catalog.pg_opclass o ON (o.oid = i.indclass[i.attnum - 1])
+    LEFT OUTER JOIN pg_catalog.pg_constraint c ON (c.conindid = i.indexrelid)
+    LEFT OUTER JOIN pg_catalog.pg_operator op ON (op.oid = c.conexclop[i.attnum])
+    LEFT JOIN pg_catalog.pg_attribute a ON (a.attrelid = i.indexrelid AND a.attnum = i.attnum)
+    LEFT OUTER JOIN pg_catalog.pg_collation coll ON a.attcollation=coll.oid
+    LEFT OUTER JOIN pg_catalog.pg_namespace nspc ON coll.collnamespace=nspc.oid
 ORDER BY i.attnum;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/default/get_am.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/default/get_am.sql
index 5bb579b50..4b268eaef 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/default/get_am.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/default/get_am.sql
@@ -1,3 +1,3 @@
 -- Fetches access methods
 SELECT oid, amname
-FROM pg_am
\ No newline at end of file
+FROM pg_catalog.pg_am
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/default/get_collations.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/default/get_collations.sql
index afc5691a6..06c40a81a 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/default/get_collations.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/default/get_collations.sql
@@ -1,7 +1,7 @@
 SELECT --nspname, collname,
 	CASE WHEN length(nspname::text) > 0 AND length(collname::text) > 0  THEN
-	  concat(quote_ident(nspname), '.', quote_ident(collname))
+	  pg_catalog.concat(quote_ident(nspname), '.', pg_catalog.quote_ident(collname))
 	ELSE '' END AS collation
-FROM pg_collation c, pg_namespace n
+FROM pg_catalog.pg_collation c, pg_catalog.pg_namespace n
     WHERE c.collnamespace=n.oid
     ORDER BY nspname, collname;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/default/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/default/get_oid.sql
index c32402f51..e47573ad6 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/default/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/default/get_oid.sql
@@ -1,7 +1,7 @@
 SELECT DISTINCT ON(cls.relname) cls.oid
-FROM pg_index idx
-    JOIN pg_class cls ON cls.oid=indexrelid
-    JOIN pg_class tab ON tab.oid=indrelid
-    JOIN pg_namespace n ON n.oid=tab.relnamespace
+FROM pg_catalog.pg_index idx
+    JOIN pg_catalog.pg_class cls ON cls.oid=indexrelid
+    JOIN pg_catalog.pg_class tab ON tab.oid=indrelid
+    JOIN pg_catalog.pg_namespace n ON n.oid=tab.relnamespace
 WHERE indrelid = {{tid}}::OID
-    AND cls.relname = {{data.name|qtLiteral}};
\ No newline at end of file
+    AND cls.relname = {{data.name|qtLiteral}};
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/default/get_op_class.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/default/get_op_class.sql
index af0133ac5..79f8c6ff3 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/default/get_op_class.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/default/get_op_class.sql
@@ -1,5 +1,5 @@
 SELECT opcname,  opcmethod
-FROM pg_opclass
+FROM pg_catalog.pg_opclass
     WHERE opcmethod = {{oid}}::OID
     AND NOT opcdefault
-    ORDER BY 1;
\ No newline at end of file
+    ORDER BY 1;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/default/get_parent.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/default/get_parent.sql
index f595cdc81..0c46d743c 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/default/get_parent.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/default/get_parent.sql
@@ -1,5 +1,5 @@
 SELECT nsp.nspname AS schema ,rel.relname AS table
-FROM pg_class rel
-    JOIN pg_namespace nsp
+FROM pg_catalog.pg_class rel
+    JOIN pg_catalog.pg_namespace nsp
     ON rel.relnamespace = nsp.oid::oid
-    WHERE rel.oid = {{tid}}::oid
\ No newline at end of file
+    WHERE rel.oid = {{tid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/default/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/default/nodes.sql
index 3f28269e0..26826ef73 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/default/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/default/nodes.sql
@@ -1,15 +1,15 @@
 SELECT DISTINCT ON(cls.relname) cls.oid, cls.relname as name
-FROM pg_index idx
-    JOIN pg_class cls ON cls.oid=indexrelid
-    JOIN pg_class tab ON tab.oid=indrelid
-    LEFT OUTER JOIN pg_tablespace ta on ta.oid=cls.reltablespace
-    JOIN pg_namespace n ON n.oid=tab.relnamespace
-    JOIN pg_am am ON am.oid=cls.relam
-    LEFT JOIN pg_depend dep ON (dep.classid = cls.tableoid AND dep.objid = cls.oid AND dep.refobjsubid = '0' AND dep.refclassid=(SELECT oid FROM pg_class WHERE relname='pg_constraint') AND dep.deptype='i')
-    LEFT OUTER JOIN pg_constraint con ON (con.tableoid = dep.refclassid AND con.oid = dep.refobjid)
+FROM pg_catalog.pg_index idx
+    JOIN pg_catalog.pg_class cls ON cls.oid=indexrelid
+    JOIN pg_catalog.pg_class tab ON tab.oid=indrelid
+    LEFT OUTER JOIN pg_catalog.pg_tablespace ta on ta.oid=cls.reltablespace
+    JOIN pg_catalog.pg_namespace n ON n.oid=tab.relnamespace
+    JOIN pg_catalog.pg_am am ON am.oid=cls.relam
+    LEFT JOIN pg_catalog.pg_depend dep ON (dep.classid = cls.tableoid AND dep.objid = cls.oid AND dep.refobjsubid = '0' AND dep.refclassid=(SELECT oid FROM pg_catalog.pg_class WHERE relname='pg_constraint') AND dep.deptype='i')
+    LEFT OUTER JOIN pg_catalog.pg_constraint con ON (con.tableoid = dep.refclassid AND con.oid = dep.refobjid)
 WHERE indrelid = {{tid}}::OID
     AND conname is NULL
 {% if idx %}
     AND cls.oid = {{ idx }}::OID
 {% endif %}
-    ORDER BY cls.relname
\ No newline at end of file
+    ORDER BY cls.relname
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/default/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/default/properties.sql
index 28c34e0ea..975099c6b 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/default/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/default/properties.sql
@@ -1,26 +1,26 @@
 SELECT DISTINCT ON(cls.relname) cls.oid, cls.relname as name, indrelid, indkey, indisclustered,
     indisvalid, indisunique, indisprimary, n.nspname,indnatts,cls.reltablespace AS spcoid,
     CASE WHEN length(spcname::text) > 0 THEN spcname ELSE
-        (SELECT sp.spcname FROM pg_database dtb
-        JOIN pg_tablespace sp ON dtb.dattablespace=sp.oid
+        (SELECT sp.spcname FROM pg_catalog.pg_database dtb
+        JOIN pg_catalog.pg_tablespace sp ON dtb.dattablespace=sp.oid
         WHERE dtb.oid = {{ did }}::oid)
     END as spcname,
     tab.relname as tabname, indclass, con.oid AS conoid,
     CASE WHEN contype IN ('p', 'u', 'x') THEN desp.description
          ELSE des.description END AS description,
-    pg_get_expr(indpred, indrelid, true) as indconstraint, contype, condeferrable, condeferred, amname,
-    substring(array_to_string(cls.reloptions, ',') from 'fillfactor=([0-9]*)') AS fillfactor
+    pg_catalog.pg_get_expr(indpred, indrelid, true) as indconstraint, contype, condeferrable, condeferred, amname,
+    substring(pg_catalog.array_to_string(cls.reloptions, ',') from 'fillfactor=([0-9]*)') AS fillfactor
     {% if datlastsysoid %}, (CASE WHEN cls.oid <= {{ datlastsysoid}}::oid THEN true ElSE false END) AS is_sys_idx {% endif %}
-FROM pg_index idx
-    JOIN pg_class cls ON cls.oid=indexrelid
-    JOIN pg_class tab ON tab.oid=indrelid
-    LEFT OUTER JOIN pg_tablespace ta on ta.oid=cls.reltablespace
-    JOIN pg_namespace n ON n.oid=tab.relnamespace
-    JOIN pg_am am ON am.oid=cls.relam
-    LEFT JOIN pg_depend dep ON (dep.classid = cls.tableoid AND dep.objid = cls.oid AND dep.refobjsubid = '0' AND dep.refclassid=(SELECT oid FROM pg_class WHERE relname='pg_constraint') AND dep.deptype='i')
-    LEFT OUTER JOIN pg_constraint con ON (con.tableoid = dep.refclassid AND con.oid = dep.refobjid)
-    LEFT OUTER JOIN pg_description des ON (des.objoid=cls.oid AND des.classoid='pg_class'::regclass)
-    LEFT OUTER JOIN pg_description desp ON (desp.objoid=con.oid AND desp.objsubid = 0 AND desp.classoid='pg_constraint'::regclass)
+FROM pg_catalog.pg_index idx
+    JOIN pg_catalog.pg_class cls ON cls.oid=indexrelid
+    JOIN pg_catalog.pg_class tab ON tab.oid=indrelid
+    LEFT OUTER JOIN pg_catalog.pg_tablespace ta on ta.oid=cls.reltablespace
+    JOIN pg_catalog.pg_namespace n ON n.oid=tab.relnamespace
+    JOIN pg_catalog.pg_am am ON am.oid=cls.relam
+    LEFT JOIN pg_catalog.pg_depend dep ON (dep.classid = cls.tableoid AND dep.objid = cls.oid AND dep.refobjsubid = '0' AND dep.refclassid=(SELECT oid FROM pg_catalog.pg_class WHERE relname='pg_constraint') AND dep.deptype='i')
+    LEFT OUTER JOIN pg_catalog.pg_constraint con ON (con.tableoid = dep.refclassid AND con.oid = dep.refobjid)
+    LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=cls.oid AND des.classoid='pg_class'::regclass)
+    LEFT OUTER JOIN pg_catalog.pg_description desp ON (desp.objoid=con.oid AND desp.objsubid = 0 AND desp.classoid='pg_constraint'::regclass)
 WHERE indrelid = {{tid}}::OID
     AND conname is NULL
     {% if idx %}AND cls.oid = {{idx}}::OID {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/default/stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/default/stats.sql
index 459a7aa2f..73bbed979 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/default/stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/indexes/sql/default/stats.sql
@@ -4,7 +4,7 @@ SELECT
     idx_tup_fetch AS {{ conn|qtIdent(_('Index tuples fetched')) }},
     idx_blks_read AS {{ conn|qtIdent(_('Index blocks read')) }},
     idx_blks_hit AS {{ conn|qtIdent(_('Index blocks hit')) }},
-    pg_relation_size({{ idx }}::OID) AS {{ conn|qtIdent(_('Index size')) }}
+    pg_catalog.pg_relation_size({{ idx }}::OID) AS {{ conn|qtIdent(_('Index size')) }}
 {#=== Extended stats ===#}
 {% if is_pgstattuple %}
     ,version AS {{ conn|qtIdent(_('Version')) }},
@@ -18,11 +18,11 @@ SELECT
     avg_leaf_density AS {{ conn|qtIdent(_('Average leaf density')) }},
     leaf_fragmentation AS {{ conn|qtIdent(_('Leaf fragmentation')) }}
 FROM
-    pgstatindex('{{conn|qtIdent(schema)}}.{{conn|qtIdent(index)}}'), pg_stat_all_indexes stat
+    pgstatindex('{{conn|qtIdent(schema)}}.{{conn|qtIdent(index)}}'), pg_catalog.pg_stat_all_indexes stat
 {% else %}
 FROM
-    pg_stat_all_indexes stat
+    pg_catalog.pg_stat_all_indexes stat
 {% endif %}
-    JOIN pg_statio_all_indexes statio ON stat.indexrelid = statio.indexrelid
-    JOIN pg_class cl ON cl.oid=stat.indexrelid
+    JOIN pg_catalog.pg_statio_all_indexes statio ON stat.indexrelid = statio.indexrelid
+    JOIN pg_catalog.pg_class cl ON cl.oid=stat.indexrelid
     WHERE stat.indexrelid = {{ idx }}::OID
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/pg/10_plus/backend_support.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/pg/10_plus/backend_support.sql
index 5fa1d7e5b..aa0326f5d 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/pg/10_plus/backend_support.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/pg/10_plus/backend_support.sql
@@ -3,7 +3,7 @@
 SELECT
     CASE WHEN c.relkind = 'p' THEN True ELSE False END As ptable
 FROM
-    pg_class c
+    pg_catalog.pg_class c
 WHERE
     c.oid = {{ tid }}::oid
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/pg/10_plus/get_attach_tables.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/pg/10_plus/get_attach_tables.sql
index dccda3217..db22e4a8f 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/pg/10_plus/get_attach_tables.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/pg/10_plus/get_attach_tables.sql
@@ -1,6 +1,6 @@
-SELECT oid, quote_ident(nspname)||'.'||quote_ident(relname) AS table_name FROM
+SELECT oid, pg_catalog.quote_ident(nspname)||'.'||pg_catalog.quote_ident(relname) AS table_name FROM
 (SELECT
-	r.oid, r.relname, n.nspname, array_agg(a.attname) attnames, array_agg(a.atttypid) atttypes
+	r.oid, r.relname, n.nspname, pg_catalog.array_agg(a.attname) attnames, pg_catalog.array_agg(a.atttypid) atttypes
 FROM
 	(SELECT oid, relname, relnamespace FROM pg_catalog.pg_class
 	  WHERE relkind in ('r', 'p') AND NOT relispartition) r
@@ -13,7 +13,7 @@ FROM
 GROUP BY r.oid, r.relname, r.relnamespace, n.nspname) all_tables
 JOIN
 (SELECT
-	attrelid, array_agg(attname) attnames, array_agg(atttypid) atttypes
+	attrelid, pg_catalog.array_agg(attname) attnames, pg_catalog.array_agg(atttypid) atttypes
 FROM
 	(SELECT * FROM pg_catalog.pg_attribute
 	  WHERE attrelid = {{ tid }} AND attnum > 0
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/pg/10_plus/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/pg/10_plus/nodes.sql
index 3cfe09856..bd9006fa4 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/pg/10_plus/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/pg/10_plus/nodes.sql
@@ -1,44 +1,44 @@
 SELECT rel.oid, rel.relname AS name,
-    (SELECT count(*) FROM pg_trigger WHERE tgrelid=rel.oid AND tgisinternal = FALSE) AS triggercount,
-    (SELECT count(*) FROM pg_trigger WHERE tgrelid=rel.oid AND tgisinternal = FALSE AND tgenabled = 'O') AS has_enable_triggers,
-    pg_get_expr(rel.relpartbound, rel.oid) AS partition_value,
+    (SELECT count(*) FROM pg_catalog.pg_trigger WHERE tgrelid=rel.oid AND tgisinternal = FALSE) AS triggercount,
+    (SELECT count(*) FROM pg_catalog.pg_trigger WHERE tgrelid=rel.oid AND tgisinternal = FALSE AND tgenabled = 'O') AS has_enable_triggers,
+    pg_catalog.pg_get_expr(rel.relpartbound, rel.oid) AS partition_value,
     rel.relnamespace AS schema_id,
     nsp.nspname AS schema_name,
     (CASE WHEN rel.relkind = 'p' THEN true ELSE false END) AS is_partitioned,
     (CASE WHEN rel.relkind = 'p' THEN true ELSE false END) AS is_sub_partitioned,
-    (CASE WHEN rel.relkind = 'p' THEN pg_get_partkeydef(rel.oid::oid) ELSE '' END) AS partition_scheme,
-    (CASE WHEN rel.relkind = 'p' THEN pg_get_partkeydef(rel.oid::oid) ELSE '' END) AS sub_partition_scheme,
+    (CASE WHEN rel.relkind = 'p' THEN pg_catalog.pg_get_partkeydef(rel.oid::oid) ELSE '' END) AS partition_scheme,
+    (CASE WHEN rel.relkind = 'p' THEN pg_catalog.pg_get_partkeydef(rel.oid::oid) ELSE '' END) AS sub_partition_scheme,
     (CASE WHEN rel.relpersistence = 'u' THEN true ELSE false END) AS relpersistence,
-	substring(array_to_string(rel.reloptions, ',') FROM 'fillfactor=([0-9]*)') AS fillfactor,
-	(substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS autovacuum_enabled,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS autovacuum_vacuum_threshold,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_vacuum_scale_factor,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS autovacuum_analyze_threshold,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_analyze_scale_factor,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS autovacuum_vacuum_cost_delay,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS autovacuum_vacuum_cost_limit,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS autovacuum_freeze_min_age,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS autovacuum_freeze_max_age,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS autovacuum_freeze_table_age,
-	(substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS toast_autovacuum_enabled,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS toast_autovacuum_vacuum_threshold,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_vacuum_scale_factor,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS toast_autovacuum_analyze_threshold,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_analyze_scale_factor,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS toast_autovacuum_vacuum_cost_delay,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS toast_autovacuum_vacuum_cost_limit,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS toast_autovacuum_freeze_min_age,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS toast_autovacuum_freeze_max_age,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS toast_autovacuum_freeze_table_age,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'fillfactor=([0-9]*)') AS fillfactor,
+	(substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS autovacuum_enabled,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS autovacuum_vacuum_threshold,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_vacuum_scale_factor,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS autovacuum_analyze_threshold,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_analyze_scale_factor,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS autovacuum_vacuum_cost_delay,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS autovacuum_vacuum_cost_limit,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS autovacuum_freeze_min_age,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS autovacuum_freeze_max_age,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS autovacuum_freeze_table_age,
+	(substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS toast_autovacuum_enabled,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS toast_autovacuum_vacuum_threshold,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_vacuum_scale_factor,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS toast_autovacuum_analyze_threshold,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_analyze_scale_factor,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS toast_autovacuum_vacuum_cost_delay,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS toast_autovacuum_vacuum_cost_limit,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS toast_autovacuum_freeze_min_age,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS toast_autovacuum_freeze_max_age,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS toast_autovacuum_freeze_table_age,
 	rel.reloptions AS reloptions, tst.reloptions AS toast_reloptions, rel.reloftype, typ.typname,
-	typ.typrelid AS typoid, des.description, pg_get_userbyid(rel.relowner) AS relowner
+	typ.typrelid AS typoid, des.description, pg_catalog.pg_get_userbyid(rel.relowner) AS relowner
 FROM
-    (SELECT * FROM pg_inherits WHERE inhparent = {{ tid }}::oid) inh
-    LEFT JOIN pg_class rel ON inh.inhrelid = rel.oid
-    LEFT JOIN pg_namespace nsp ON rel.relnamespace = nsp.oid
-    LEFT OUTER JOIN pg_class tst ON tst.oid = rel.reltoastrelid
-    LEFT OUTER JOIN pg_description des ON (des.objoid=rel.oid AND des.objsubid=0 AND des.classoid='pg_class'::regclass)
-    LEFT JOIN pg_type typ ON rel.reloftype=typ.oid
+    (SELECT * FROM pg_catalog.pg_inherits WHERE inhparent = {{ tid }}::oid) inh
+    LEFT JOIN pg_catalog.pg_class rel ON inh.inhrelid = rel.oid
+    LEFT JOIN pg_catalog.pg_namespace nsp ON rel.relnamespace = nsp.oid
+    LEFT OUTER JOIN pg_catalog.pg_class tst ON tst.oid = rel.reltoastrelid
+    LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=rel.oid AND des.objsubid=0 AND des.classoid='pg_class'::regclass)
+    LEFT JOIN pg_catalog.pg_type typ ON rel.reloftype=typ.oid
     WHERE rel.relispartition
     {% if ptid %} AND rel.oid = {{ ptid }}::OID {% endif %}
     ORDER BY rel.relname;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/pg/10_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/pg/10_plus/properties.sql
index eed03bbaa..c1365a2ae 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/pg/10_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/pg/10_plus/properties.sql
@@ -1,75 +1,75 @@
 SELECT rel.oid, rel.relname AS name, rel.reltablespace AS spcoid,rel.relacl AS relacl_str,
   (CASE WHEN length(spc.spcname::text) > 0 THEN spc.spcname ELSE
-    (SELECT sp.spcname FROM pg_database dtb
-    JOIN pg_tablespace sp ON dtb.dattablespace=sp.oid
+    (SELECT sp.spcname FROM pg_catalog.pg_database dtb
+    JOIN pg_catalog.pg_tablespace sp ON dtb.dattablespace=sp.oid
     WHERE dtb.oid = {{ did }}::oid)
   END) as spcname,
-  (select nspname FROM pg_namespace WHERE oid = {{scid}}::oid ) as parent_schema,
+  (select nspname FROM pg_catalog.pg_namespace WHERE oid = {{scid}}::oid ) as parent_schema,
   nsp.nspname as schema,
-  pg_get_userbyid(rel.relowner) AS relowner, rel.relhasoids, rel.relispartition,
+  pg_catalog.pg_get_userbyid(rel.relowner) AS relowner, rel.relhasoids, rel.relispartition,
   rel.relhassubclass, rel.reltuples::bigint, des.description, con.conname, con.conkey,
-	EXISTS(select 1 FROM pg_trigger
-			JOIN pg_proc pt ON pt.oid=tgfoid AND pt.proname='logtrigger'
-			JOIN pg_proc pc ON pc.pronamespace=pt.pronamespace AND pc.proname='slonyversion'
+	EXISTS(select 1 FROM pg_catalog.pg_trigger
+			JOIN pg_catalog.pg_proc pt ON pt.oid=tgfoid AND pt.proname='logtrigger'
+			JOIN pg_catalog.pg_proc pc ON pc.pronamespace=pt.pronamespace AND pc.proname='slonyversion'
 			WHERE tgrelid=rel.oid) AS isrepl,
-	(SELECT count(*) FROM pg_trigger WHERE tgrelid=rel.oid AND tgisinternal = FALSE) AS triggercount,
+	(SELECT count(*) FROM pg_catalog.pg_trigger WHERE tgrelid=rel.oid AND tgisinternal = FALSE) AS triggercount,
 	(SELECT ARRAY(SELECT CASE WHEN (nspname NOT LIKE 'pg\_%') THEN
-            quote_ident(nspname)||'.'||quote_ident(c.relname)
-            ELSE quote_ident(c.relname) END AS inherited_tables
-    FROM pg_inherits i
-    JOIN pg_class c ON c.oid = i.inhparent
-    JOIN pg_namespace n ON n.oid=c.relnamespace
+            pg_catalog.quote_ident(nspname)||'.'||pg_catalog.quote_ident(c.relname)
+            ELSE pg_catalog.quote_ident(c.relname) END AS inherited_tables
+    FROM pg_catalog.pg_inherits i
+    JOIN pg_catalog.pg_class c ON c.oid = i.inhparent
+    JOIN pg_catalog.pg_namespace n ON n.oid=c.relnamespace
     WHERE i.inhrelid = rel.oid ORDER BY inhseqno)) AS coll_inherits,
   (SELECT count(*)
-		FROM pg_inherits i
-      JOIN pg_class c ON c.oid = i.inhparent
-      JOIN pg_namespace n ON n.oid=c.relnamespace
+		FROM pg_catalog.pg_inherits i
+      JOIN pg_catalog.pg_class c ON c.oid = i.inhparent
+      JOIN pg_catalog.pg_namespace n ON n.oid=c.relnamespace
 		WHERE i.inhrelid = rel.oid) AS inherited_tables_cnt,
 	(CASE WHEN rel.relpersistence = 'u' THEN true ELSE false END) AS relpersistence,
-	substring(array_to_string(rel.reloptions, ',') FROM 'fillfactor=([0-9]*)') AS fillfactor,
-	(substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS autovacuum_enabled,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS autovacuum_vacuum_threshold,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_vacuum_scale_factor,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS autovacuum_analyze_threshold,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_analyze_scale_factor,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS autovacuum_vacuum_cost_delay,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS autovacuum_vacuum_cost_limit,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS autovacuum_freeze_min_age,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS autovacuum_freeze_max_age,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS autovacuum_freeze_table_age,
-	(substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS toast_autovacuum_enabled,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS toast_autovacuum_vacuum_threshold,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_vacuum_scale_factor,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS toast_autovacuum_analyze_threshold,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_analyze_scale_factor,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS toast_autovacuum_vacuum_cost_delay,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS toast_autovacuum_vacuum_cost_limit,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS toast_autovacuum_freeze_min_age,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS toast_autovacuum_freeze_max_age,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS toast_autovacuum_freeze_table_age,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'fillfactor=([0-9]*)') AS fillfactor,
+	(substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS autovacuum_enabled,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS autovacuum_vacuum_threshold,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_vacuum_scale_factor,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS autovacuum_analyze_threshold,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_analyze_scale_factor,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS autovacuum_vacuum_cost_delay,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS autovacuum_vacuum_cost_limit,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS autovacuum_freeze_min_age,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS autovacuum_freeze_max_age,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS autovacuum_freeze_table_age,
+	(substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS toast_autovacuum_enabled,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS toast_autovacuum_vacuum_threshold,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_vacuum_scale_factor,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS toast_autovacuum_analyze_threshold,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_analyze_scale_factor,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS toast_autovacuum_vacuum_cost_delay,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS toast_autovacuum_vacuum_cost_limit,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS toast_autovacuum_freeze_min_age,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS toast_autovacuum_freeze_max_age,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS toast_autovacuum_freeze_table_age,
 	rel.reloptions AS reloptions, tst.reloptions AS toast_reloptions, rel.reloftype, typ.typname,
 	typ.typrelid AS typoid,
 	(CASE WHEN rel.reltoastrelid = 0 THEN false ELSE true END) AS hastoasttable,
-	(SELECT array_agg(provider || '=' || label) FROM pg_seclabels sl1 WHERE sl1.objoid=rel.oid AND sl1.objsubid=0) AS seclabels,
+	(SELECT pg_catalog.array_agg(provider || '=' || label) FROM pg_catalog.pg_seclabels sl1 WHERE sl1.objoid=rel.oid AND sl1.objsubid=0) AS seclabels,
 	(CASE WHEN rel.oid <= {{ datlastsysoid}}::oid THEN true ElSE false END) AS is_sys_table,
 	-- Added for partition table
 	(CASE WHEN rel.relkind = 'p' THEN true ELSE false END) AS is_partitioned,
-	(CASE WHEN rel.relkind = 'p' THEN pg_get_partkeydef(rel.oid::oid) ELSE '' END) AS partition_scheme,
+	(CASE WHEN rel.relkind = 'p' THEN pg_catalog.pg_get_partkeydef(rel.oid::oid) ELSE '' END) AS partition_scheme,
 	{% if ptid %}
-	  (CASE WHEN rel.relispartition THEN pg_get_expr(rel.relpartbound, {{ ptid }}::oid) ELSE '' END) AS partition_value,
-	  (SELECT relname FROM pg_class WHERE oid = {{ tid }}::oid) AS partitioned_table_name
+	  (CASE WHEN rel.relispartition THEN pg_catalog.pg_get_expr(rel.relpartbound, {{ ptid }}::oid) ELSE '' END) AS partition_value,
+	  (SELECT relname FROM pg_catalog.pg_class WHERE oid = {{ tid }}::oid) AS partitioned_table_name
 	{% else %}
-	  pg_get_expr(rel.relpartbound, rel.oid) AS partition_value
+	  pg_catalog.pg_get_expr(rel.relpartbound, rel.oid) AS partition_value
 	{% endif %}
 
-FROM pg_class rel
-  LEFT OUTER JOIN pg_tablespace spc on spc.oid=rel.reltablespace
-  LEFT OUTER JOIN pg_description des ON (des.objoid=rel.oid AND des.objsubid=0 AND des.classoid='pg_class'::regclass)
-  LEFT OUTER JOIN pg_constraint con ON con.conrelid=rel.oid AND con.contype='p'
-  LEFT OUTER JOIN pg_class tst ON tst.oid = rel.reltoastrelid
-  LEFT JOIN pg_type typ ON rel.reloftype=typ.oid
-  LEFT JOIN pg_inherits inh ON inh.inhrelid = rel.oid
-  LEFT JOIN pg_namespace nsp ON rel.relnamespace = nsp.oid
+FROM pg_catalog.pg_class rel
+  LEFT OUTER JOIN pg_catalog.pg_tablespace spc on spc.oid=rel.reltablespace
+  LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=rel.oid AND des.objsubid=0 AND des.classoid='pg_class'::regclass)
+  LEFT OUTER JOIN pg_catalog.pg_constraint con ON con.conrelid=rel.oid AND con.contype='p'
+  LEFT OUTER JOIN pg_catalog.pg_class tst ON tst.oid = rel.reltoastrelid
+  LEFT JOIN pg_catalog.pg_type typ ON rel.reloftype=typ.oid
+  LEFT JOIN pg_catalog.pg_inherits inh ON inh.inhrelid = rel.oid
+  LEFT JOIN pg_catalog.pg_namespace nsp ON rel.relnamespace = nsp.oid
 WHERE rel.relispartition AND inh.inhparent = {{ tid }}::oid
 {% if ptid %}  AND rel.oid = {{ ptid }}::oid {% endif %}
 ORDER BY rel.relname;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/pg/12_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/pg/12_plus/properties.sql
index 9de83f353..94a44f1b0 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/pg/12_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/pg/12_plus/properties.sql
@@ -1,75 +1,75 @@
 SELECT rel.oid, rel.relname AS name, rel.reltablespace AS spcoid,rel.relacl AS relacl_str,
   (CASE WHEN length(spc.spcname::text) > 0 OR rel.relkind = 'p' THEN spc.spcname ELSE
-    (SELECT sp.spcname FROM pg_database dtb
-    JOIN pg_tablespace sp ON dtb.dattablespace=sp.oid
+    (SELECT sp.spcname FROM pg_catalog.pg_database dtb
+    JOIN pg_catalog.pg_tablespace sp ON dtb.dattablespace=sp.oid
     WHERE dtb.oid = {{ did }}::oid)
   END) as spcname,
-  (select nspname FROM pg_namespace WHERE oid = {{scid}}::oid ) as parent_schema,
+  (select nspname FROM pg_catalog.pg_namespace WHERE oid = {{scid}}::oid ) as parent_schema,
   nsp.nspname as schema,
   pg_get_userbyid(rel.relowner) AS relowner, rel.relispartition,
   rel.relhassubclass, rel.reltuples::bigint, des.description, con.conname, con.conkey,
-	EXISTS(select 1 FROM pg_trigger
-			JOIN pg_proc pt ON pt.oid=tgfoid AND pt.proname='logtrigger'
-			JOIN pg_proc pc ON pc.pronamespace=pt.pronamespace AND pc.proname='slonyversion'
+	EXISTS(select 1 FROM pg_catalog.pg_trigger
+			JOIN pg_catalog.pg_proc pt ON pt.oid=tgfoid AND pt.proname='logtrigger'
+			JOIN pg_catalog.pg_proc pc ON pc.pronamespace=pt.pronamespace AND pc.proname='slonyversion'
 			WHERE tgrelid=rel.oid) AS isrepl,
-	(SELECT count(*) FROM pg_trigger WHERE tgrelid=rel.oid AND tgisinternal = FALSE) AS triggercount,
-	(SELECT ARRAY(SELECT CASE WHEN (nspname NOT LIKE 'pg\_%') THEN
-            quote_ident(nspname)||'.'||quote_ident(c.relname)
-            ELSE quote_ident(c.relname) END AS inherited_tables
-    FROM pg_inherits i
-    JOIN pg_class c ON c.oid = i.inhparent
-    JOIN pg_namespace n ON n.oid=c.relnamespace
+	(SELECT count(*) FROM pg_catalog.pg_trigger WHERE tgrelid=rel.oid AND tgisinternal = FALSE) AS triggercount,
+	(SELECT pg_catalog.ARRAY(SELECT CASE WHEN (nspname NOT LIKE 'pg\_%') THEN
+            pg_catalog.quote_ident(nspname)||'.'||pg_catalog.quote_ident(c.relname)
+            ELSE pg_catalog.quote_ident(c.relname) END AS inherited_tables
+    FROM pg_catalog.pg_inherits i
+    JOIN pg_catalog.pg_class c ON c.oid = i.inhparent
+    JOIN pg_catalog.pg_namespace n ON n.oid=c.relnamespace
     WHERE i.inhrelid = rel.oid ORDER BY inhseqno)) AS coll_inherits,
   (SELECT count(*)
-		FROM pg_inherits i
-      JOIN pg_class c ON c.oid = i.inhparent
-      JOIN pg_namespace n ON n.oid=c.relnamespace
+		FROM pg_catalog.pg_inherits i
+      JOIN pg_catalog.pg_class c ON c.oid = i.inhparent
+      JOIN pg_catalog.pg_namespace n ON n.oid=c.relnamespace
 		WHERE i.inhrelid = rel.oid) AS inherited_tables_cnt,
 	(CASE WHEN rel.relpersistence = 'u' THEN true ELSE false END) AS relpersistence,
-	substring(array_to_string(rel.reloptions, ',') FROM 'fillfactor=([0-9]*)') AS fillfactor,
-	(substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS autovacuum_enabled,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS autovacuum_vacuum_threshold,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_vacuum_scale_factor,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS autovacuum_analyze_threshold,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_analyze_scale_factor,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS autovacuum_vacuum_cost_delay,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS autovacuum_vacuum_cost_limit,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS autovacuum_freeze_min_age,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS autovacuum_freeze_max_age,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS autovacuum_freeze_table_age,
-	(substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS toast_autovacuum_enabled,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS toast_autovacuum_vacuum_threshold,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_vacuum_scale_factor,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS toast_autovacuum_analyze_threshold,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_analyze_scale_factor,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS toast_autovacuum_vacuum_cost_delay,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS toast_autovacuum_vacuum_cost_limit,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS toast_autovacuum_freeze_min_age,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS toast_autovacuum_freeze_max_age,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS toast_autovacuum_freeze_table_age,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'fillfactor=([0-9]*)') AS fillfactor,
+	(substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS autovacuum_enabled,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS autovacuum_vacuum_threshold,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_vacuum_scale_factor,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS autovacuum_analyze_threshold,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_analyze_scale_factor,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS autovacuum_vacuum_cost_delay,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS autovacuum_vacuum_cost_limit,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS autovacuum_freeze_min_age,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS autovacuum_freeze_max_age,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS autovacuum_freeze_table_age,
+	(substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS toast_autovacuum_enabled,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS toast_autovacuum_vacuum_threshold,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_vacuum_scale_factor,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS toast_autovacuum_analyze_threshold,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_analyze_scale_factor,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS toast_autovacuum_vacuum_cost_delay,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS toast_autovacuum_vacuum_cost_limit,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS toast_autovacuum_freeze_min_age,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS toast_autovacuum_freeze_max_age,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS toast_autovacuum_freeze_table_age,
 	rel.reloptions AS reloptions, tst.reloptions AS toast_reloptions, rel.reloftype, typ.typname,
 	typ.typrelid AS typoid,
 	(CASE WHEN rel.reltoastrelid = 0 THEN false ELSE true END) AS hastoasttable,
-	(SELECT array_agg(provider || '=' || label) FROM pg_seclabels sl1 WHERE sl1.objoid=rel.oid AND sl1.objsubid=0) AS seclabels,
+	(SELECT pg_catalog.array_agg(provider || '=' || label) FROM pg_catalog.pg_seclabels sl1 WHERE sl1.objoid=rel.oid AND sl1.objsubid=0) AS seclabels,
 	(CASE WHEN rel.oid <= {{ datlastsysoid}}::oid THEN true ElSE false END) AS is_sys_table,
 	-- Added for partition table
 	(CASE WHEN rel.relkind = 'p' THEN true ELSE false END) AS is_partitioned,
-	(CASE WHEN rel.relkind = 'p' THEN pg_get_partkeydef(rel.oid::oid) ELSE '' END) AS partition_scheme,
+	(CASE WHEN rel.relkind = 'p' THEN pg_catalog.pg_get_partkeydef(rel.oid::oid) ELSE '' END) AS partition_scheme,
 	{% if ptid %}
-	  (CASE WHEN rel.relispartition THEN pg_get_expr(rel.relpartbound, {{ ptid }}::oid) ELSE '' END) AS partition_value,
-	  (SELECT relname FROM pg_class WHERE oid = {{ tid }}::oid) AS partitioned_table_name
+	  (CASE WHEN rel.relispartition THEN pg_catalog.pg_get_expr(rel.relpartbound, {{ ptid }}::oid) ELSE '' END) AS partition_value,
+	  (SELECT relname FROM pg_catalog.pg_class WHERE oid = {{ tid }}::oid) AS partitioned_table_name
 	{% else %}
-	  pg_get_expr(rel.relpartbound, rel.oid) AS partition_value
+	  pg_catalog.pg_get_expr(rel.relpartbound, rel.oid) AS partition_value
 	{% endif %}
 
-FROM pg_class rel
-  LEFT OUTER JOIN pg_tablespace spc on spc.oid=rel.reltablespace
-  LEFT OUTER JOIN pg_description des ON (des.objoid=rel.oid AND des.objsubid=0 AND des.classoid='pg_class'::regclass)
-  LEFT OUTER JOIN pg_constraint con ON con.conrelid=rel.oid AND con.contype='p'
-  LEFT OUTER JOIN pg_class tst ON tst.oid = rel.reltoastrelid
-  LEFT JOIN pg_type typ ON rel.reloftype=typ.oid
-  LEFT JOIN pg_inherits inh ON inh.inhrelid = rel.oid
-  LEFT JOIN pg_namespace nsp ON rel.relnamespace = nsp.oid
+FROM pg_catalog.pg_class rel
+  LEFT OUTER JOIN pg_catalog.pg_tablespace spc on spc.oid=rel.reltablespace
+  LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=rel.oid AND des.objsubid=0 AND des.classoid='pg_class'::regclass)
+  LEFT OUTER JOIN pg_catalog.pg_constraint con ON con.conrelid=rel.oid AND con.contype='p'
+  LEFT OUTER JOIN pg_catalog.pg_class tst ON tst.oid = rel.reltoastrelid
+  LEFT JOIN pg_catalog.pg_type typ ON rel.reloftype=typ.oid
+  LEFT JOIN pg_catalog.pg_inherits inh ON inh.inhrelid = rel.oid
+  LEFT JOIN pg_catalog.pg_namespace nsp ON rel.relnamespace = nsp.oid
 WHERE rel.relispartition AND inh.inhparent = {{ tid }}::oid
 {% if ptid %}  AND rel.oid = {{ ptid }}::oid {% endif %}
 ORDER BY rel.relname;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/ppas/10_plus/backend_support.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/ppas/10_plus/backend_support.sql
index 5fa1d7e5b..aa0326f5d 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/ppas/10_plus/backend_support.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/ppas/10_plus/backend_support.sql
@@ -3,7 +3,7 @@
 SELECT
     CASE WHEN c.relkind = 'p' THEN True ELSE False END As ptable
 FROM
-    pg_class c
+    pg_catalog.pg_class c
 WHERE
     c.oid = {{ tid }}::oid
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/ppas/10_plus/get_attach_tables.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/ppas/10_plus/get_attach_tables.sql
index dccda3217..db22e4a8f 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/ppas/10_plus/get_attach_tables.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/ppas/10_plus/get_attach_tables.sql
@@ -1,6 +1,6 @@
-SELECT oid, quote_ident(nspname)||'.'||quote_ident(relname) AS table_name FROM
+SELECT oid, pg_catalog.quote_ident(nspname)||'.'||pg_catalog.quote_ident(relname) AS table_name FROM
 (SELECT
-	r.oid, r.relname, n.nspname, array_agg(a.attname) attnames, array_agg(a.atttypid) atttypes
+	r.oid, r.relname, n.nspname, pg_catalog.array_agg(a.attname) attnames, pg_catalog.array_agg(a.atttypid) atttypes
 FROM
 	(SELECT oid, relname, relnamespace FROM pg_catalog.pg_class
 	  WHERE relkind in ('r', 'p') AND NOT relispartition) r
@@ -13,7 +13,7 @@ FROM
 GROUP BY r.oid, r.relname, r.relnamespace, n.nspname) all_tables
 JOIN
 (SELECT
-	attrelid, array_agg(attname) attnames, array_agg(atttypid) atttypes
+	attrelid, pg_catalog.array_agg(attname) attnames, pg_catalog.array_agg(atttypid) atttypes
 FROM
 	(SELECT * FROM pg_catalog.pg_attribute
 	  WHERE attrelid = {{ tid }} AND attnum > 0
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/ppas/10_plus/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/ppas/10_plus/nodes.sql
index 3cfe09856..bd9006fa4 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/ppas/10_plus/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/ppas/10_plus/nodes.sql
@@ -1,44 +1,44 @@
 SELECT rel.oid, rel.relname AS name,
-    (SELECT count(*) FROM pg_trigger WHERE tgrelid=rel.oid AND tgisinternal = FALSE) AS triggercount,
-    (SELECT count(*) FROM pg_trigger WHERE tgrelid=rel.oid AND tgisinternal = FALSE AND tgenabled = 'O') AS has_enable_triggers,
-    pg_get_expr(rel.relpartbound, rel.oid) AS partition_value,
+    (SELECT count(*) FROM pg_catalog.pg_trigger WHERE tgrelid=rel.oid AND tgisinternal = FALSE) AS triggercount,
+    (SELECT count(*) FROM pg_catalog.pg_trigger WHERE tgrelid=rel.oid AND tgisinternal = FALSE AND tgenabled = 'O') AS has_enable_triggers,
+    pg_catalog.pg_get_expr(rel.relpartbound, rel.oid) AS partition_value,
     rel.relnamespace AS schema_id,
     nsp.nspname AS schema_name,
     (CASE WHEN rel.relkind = 'p' THEN true ELSE false END) AS is_partitioned,
     (CASE WHEN rel.relkind = 'p' THEN true ELSE false END) AS is_sub_partitioned,
-    (CASE WHEN rel.relkind = 'p' THEN pg_get_partkeydef(rel.oid::oid) ELSE '' END) AS partition_scheme,
-    (CASE WHEN rel.relkind = 'p' THEN pg_get_partkeydef(rel.oid::oid) ELSE '' END) AS sub_partition_scheme,
+    (CASE WHEN rel.relkind = 'p' THEN pg_catalog.pg_get_partkeydef(rel.oid::oid) ELSE '' END) AS partition_scheme,
+    (CASE WHEN rel.relkind = 'p' THEN pg_catalog.pg_get_partkeydef(rel.oid::oid) ELSE '' END) AS sub_partition_scheme,
     (CASE WHEN rel.relpersistence = 'u' THEN true ELSE false END) AS relpersistence,
-	substring(array_to_string(rel.reloptions, ',') FROM 'fillfactor=([0-9]*)') AS fillfactor,
-	(substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS autovacuum_enabled,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS autovacuum_vacuum_threshold,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_vacuum_scale_factor,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS autovacuum_analyze_threshold,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_analyze_scale_factor,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS autovacuum_vacuum_cost_delay,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS autovacuum_vacuum_cost_limit,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS autovacuum_freeze_min_age,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS autovacuum_freeze_max_age,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS autovacuum_freeze_table_age,
-	(substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS toast_autovacuum_enabled,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS toast_autovacuum_vacuum_threshold,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_vacuum_scale_factor,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS toast_autovacuum_analyze_threshold,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_analyze_scale_factor,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS toast_autovacuum_vacuum_cost_delay,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS toast_autovacuum_vacuum_cost_limit,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS toast_autovacuum_freeze_min_age,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS toast_autovacuum_freeze_max_age,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS toast_autovacuum_freeze_table_age,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'fillfactor=([0-9]*)') AS fillfactor,
+	(substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS autovacuum_enabled,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS autovacuum_vacuum_threshold,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_vacuum_scale_factor,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS autovacuum_analyze_threshold,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_analyze_scale_factor,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS autovacuum_vacuum_cost_delay,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS autovacuum_vacuum_cost_limit,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS autovacuum_freeze_min_age,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS autovacuum_freeze_max_age,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS autovacuum_freeze_table_age,
+	(substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS toast_autovacuum_enabled,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS toast_autovacuum_vacuum_threshold,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_vacuum_scale_factor,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS toast_autovacuum_analyze_threshold,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_analyze_scale_factor,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS toast_autovacuum_vacuum_cost_delay,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS toast_autovacuum_vacuum_cost_limit,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS toast_autovacuum_freeze_min_age,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS toast_autovacuum_freeze_max_age,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS toast_autovacuum_freeze_table_age,
 	rel.reloptions AS reloptions, tst.reloptions AS toast_reloptions, rel.reloftype, typ.typname,
-	typ.typrelid AS typoid, des.description, pg_get_userbyid(rel.relowner) AS relowner
+	typ.typrelid AS typoid, des.description, pg_catalog.pg_get_userbyid(rel.relowner) AS relowner
 FROM
-    (SELECT * FROM pg_inherits WHERE inhparent = {{ tid }}::oid) inh
-    LEFT JOIN pg_class rel ON inh.inhrelid = rel.oid
-    LEFT JOIN pg_namespace nsp ON rel.relnamespace = nsp.oid
-    LEFT OUTER JOIN pg_class tst ON tst.oid = rel.reltoastrelid
-    LEFT OUTER JOIN pg_description des ON (des.objoid=rel.oid AND des.objsubid=0 AND des.classoid='pg_class'::regclass)
-    LEFT JOIN pg_type typ ON rel.reloftype=typ.oid
+    (SELECT * FROM pg_catalog.pg_inherits WHERE inhparent = {{ tid }}::oid) inh
+    LEFT JOIN pg_catalog.pg_class rel ON inh.inhrelid = rel.oid
+    LEFT JOIN pg_catalog.pg_namespace nsp ON rel.relnamespace = nsp.oid
+    LEFT OUTER JOIN pg_catalog.pg_class tst ON tst.oid = rel.reltoastrelid
+    LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=rel.oid AND des.objsubid=0 AND des.classoid='pg_class'::regclass)
+    LEFT JOIN pg_catalog.pg_type typ ON rel.reloftype=typ.oid
     WHERE rel.relispartition
     {% if ptid %} AND rel.oid = {{ ptid }}::OID {% endif %}
     ORDER BY rel.relname;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/ppas/10_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/ppas/10_plus/properties.sql
index eed03bbaa..5cd7f26e5 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/ppas/10_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/ppas/10_plus/properties.sql
@@ -1,75 +1,75 @@
 SELECT rel.oid, rel.relname AS name, rel.reltablespace AS spcoid,rel.relacl AS relacl_str,
   (CASE WHEN length(spc.spcname::text) > 0 THEN spc.spcname ELSE
     (SELECT sp.spcname FROM pg_database dtb
-    JOIN pg_tablespace sp ON dtb.dattablespace=sp.oid
+    JOIN pg_catalog.pg_tablespace sp ON dtb.dattablespace=sp.oid
     WHERE dtb.oid = {{ did }}::oid)
   END) as spcname,
-  (select nspname FROM pg_namespace WHERE oid = {{scid}}::oid ) as parent_schema,
+  (select nspname FROM pg_catalog.pg_namespace WHERE oid = {{scid}}::oid ) as parent_schema,
   nsp.nspname as schema,
   pg_get_userbyid(rel.relowner) AS relowner, rel.relhasoids, rel.relispartition,
   rel.relhassubclass, rel.reltuples::bigint, des.description, con.conname, con.conkey,
-	EXISTS(select 1 FROM pg_trigger
-			JOIN pg_proc pt ON pt.oid=tgfoid AND pt.proname='logtrigger'
-			JOIN pg_proc pc ON pc.pronamespace=pt.pronamespace AND pc.proname='slonyversion'
+	EXISTS(select 1 FROM pg_catalog.pg_trigger
+			JOIN pg_catalog.pg_proc pt ON pt.oid=tgfoid AND pt.proname='logtrigger'
+			JOIN pg_catalog.pg_proc pc ON pc.pronamespace=pt.pronamespace AND pc.proname='slonyversion'
 			WHERE tgrelid=rel.oid) AS isrepl,
-	(SELECT count(*) FROM pg_trigger WHERE tgrelid=rel.oid AND tgisinternal = FALSE) AS triggercount,
+	(SELECT count(*) FROM pg_catalog.pg_trigger WHERE tgrelid=rel.oid AND tgisinternal = FALSE) AS triggercount,
 	(SELECT ARRAY(SELECT CASE WHEN (nspname NOT LIKE 'pg\_%') THEN
             quote_ident(nspname)||'.'||quote_ident(c.relname)
             ELSE quote_ident(c.relname) END AS inherited_tables
-    FROM pg_inherits i
-    JOIN pg_class c ON c.oid = i.inhparent
-    JOIN pg_namespace n ON n.oid=c.relnamespace
+    FROM pg_catalog.pg_inherits i
+    JOIN pg_catalog.pg_class c ON c.oid = i.inhparent
+    JOIN pg_catalog.pg_namespace n ON n.oid=c.relnamespace
     WHERE i.inhrelid = rel.oid ORDER BY inhseqno)) AS coll_inherits,
   (SELECT count(*)
-		FROM pg_inherits i
-      JOIN pg_class c ON c.oid = i.inhparent
-      JOIN pg_namespace n ON n.oid=c.relnamespace
+		FROM pg_catalog.pg_inherits i
+      JOIN pg_catalog.pg_class c ON c.oid = i.inhparent
+      JOIN pg_catalog.pg_namespace n ON n.oid=c.relnamespace
 		WHERE i.inhrelid = rel.oid) AS inherited_tables_cnt,
 	(CASE WHEN rel.relpersistence = 'u' THEN true ELSE false END) AS relpersistence,
-	substring(array_to_string(rel.reloptions, ',') FROM 'fillfactor=([0-9]*)') AS fillfactor,
-	(substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS autovacuum_enabled,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS autovacuum_vacuum_threshold,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_vacuum_scale_factor,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS autovacuum_analyze_threshold,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_analyze_scale_factor,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS autovacuum_vacuum_cost_delay,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS autovacuum_vacuum_cost_limit,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS autovacuum_freeze_min_age,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS autovacuum_freeze_max_age,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS autovacuum_freeze_table_age,
-	(substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS toast_autovacuum_enabled,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS toast_autovacuum_vacuum_threshold,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_vacuum_scale_factor,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS toast_autovacuum_analyze_threshold,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_analyze_scale_factor,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS toast_autovacuum_vacuum_cost_delay,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS toast_autovacuum_vacuum_cost_limit,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS toast_autovacuum_freeze_min_age,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS toast_autovacuum_freeze_max_age,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS toast_autovacuum_freeze_table_age,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'fillfactor=([0-9]*)') AS fillfactor,
+	(substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS autovacuum_enabled,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS autovacuum_vacuum_threshold,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_vacuum_scale_factor,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS autovacuum_analyze_threshold,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_analyze_scale_factor,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS autovacuum_vacuum_cost_delay,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS autovacuum_vacuum_cost_limit,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS autovacuum_freeze_min_age,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS autovacuum_freeze_max_age,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS autovacuum_freeze_table_age,
+	(substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS toast_autovacuum_enabled,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS toast_autovacuum_vacuum_threshold,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_vacuum_scale_factor,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS toast_autovacuum_analyze_threshold,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_analyze_scale_factor,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS toast_autovacuum_vacuum_cost_delay,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS toast_autovacuum_vacuum_cost_limit,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS toast_autovacuum_freeze_min_age,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS toast_autovacuum_freeze_max_age,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS toast_autovacuum_freeze_table_age,
 	rel.reloptions AS reloptions, tst.reloptions AS toast_reloptions, rel.reloftype, typ.typname,
 	typ.typrelid AS typoid,
 	(CASE WHEN rel.reltoastrelid = 0 THEN false ELSE true END) AS hastoasttable,
-	(SELECT array_agg(provider || '=' || label) FROM pg_seclabels sl1 WHERE sl1.objoid=rel.oid AND sl1.objsubid=0) AS seclabels,
+	(SELECT array_agg(provider || '=' || label) FROM pg_catalog.pg_seclabels sl1 WHERE sl1.objoid=rel.oid AND sl1.objsubid=0) AS seclabels,
 	(CASE WHEN rel.oid <= {{ datlastsysoid}}::oid THEN true ElSE false END) AS is_sys_table,
 	-- Added for partition table
 	(CASE WHEN rel.relkind = 'p' THEN true ELSE false END) AS is_partitioned,
 	(CASE WHEN rel.relkind = 'p' THEN pg_get_partkeydef(rel.oid::oid) ELSE '' END) AS partition_scheme,
 	{% if ptid %}
 	  (CASE WHEN rel.relispartition THEN pg_get_expr(rel.relpartbound, {{ ptid }}::oid) ELSE '' END) AS partition_value,
-	  (SELECT relname FROM pg_class WHERE oid = {{ tid }}::oid) AS partitioned_table_name
+	  (SELECT relname FROM pg_catalog.pg_class WHERE oid = {{ tid }}::oid) AS partitioned_table_name
 	{% else %}
 	  pg_get_expr(rel.relpartbound, rel.oid) AS partition_value
 	{% endif %}
 
-FROM pg_class rel
-  LEFT OUTER JOIN pg_tablespace spc on spc.oid=rel.reltablespace
-  LEFT OUTER JOIN pg_description des ON (des.objoid=rel.oid AND des.objsubid=0 AND des.classoid='pg_class'::regclass)
-  LEFT OUTER JOIN pg_constraint con ON con.conrelid=rel.oid AND con.contype='p'
-  LEFT OUTER JOIN pg_class tst ON tst.oid = rel.reltoastrelid
-  LEFT JOIN pg_type typ ON rel.reloftype=typ.oid
-  LEFT JOIN pg_inherits inh ON inh.inhrelid = rel.oid
-  LEFT JOIN pg_namespace nsp ON rel.relnamespace = nsp.oid
+FROM pg_catalog.pg_class rel
+  LEFT OUTER JOIN pg_catalog.pg_tablespace spc on spc.oid=rel.reltablespace
+  LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=rel.oid AND des.objsubid=0 AND des.classoid='pg_class'::regclass)
+  LEFT OUTER JOIN pg_catalog.pg_constraint con ON con.conrelid=rel.oid AND con.contype='p'
+  LEFT OUTER JOIN pg_catalog.pg_class tst ON tst.oid = rel.reltoastrelid
+  LEFT JOIN pg_catalog.pg_type typ ON rel.reloftype=typ.oid
+  LEFT JOIN pg_catalog.pg_inherits inh ON inh.inhrelid = rel.oid
+  LEFT JOIN pg_catalog.pg_namespace nsp ON rel.relnamespace = nsp.oid
 WHERE rel.relispartition AND inh.inhparent = {{ tid }}::oid
 {% if ptid %}  AND rel.oid = {{ ptid }}::oid {% endif %}
 ORDER BY rel.relname;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/ppas/12_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/ppas/12_plus/properties.sql
index 9de83f353..641564a91 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/ppas/12_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/partitions/sql/ppas/12_plus/properties.sql
@@ -1,75 +1,75 @@
 SELECT rel.oid, rel.relname AS name, rel.reltablespace AS spcoid,rel.relacl AS relacl_str,
   (CASE WHEN length(spc.spcname::text) > 0 OR rel.relkind = 'p' THEN spc.spcname ELSE
-    (SELECT sp.spcname FROM pg_database dtb
-    JOIN pg_tablespace sp ON dtb.dattablespace=sp.oid
+    (SELECT sp.spcname FROM pg_catalog.pg_database dtb
+    JOIN pg_catalog.pg_tablespace sp ON dtb.dattablespace=sp.oid
     WHERE dtb.oid = {{ did }}::oid)
   END) as spcname,
-  (select nspname FROM pg_namespace WHERE oid = {{scid}}::oid ) as parent_schema,
+  (select nspname FROM pg_catalog.pg_namespace WHERE oid = {{scid}}::oid ) as parent_schema,
   nsp.nspname as schema,
   pg_get_userbyid(rel.relowner) AS relowner, rel.relispartition,
   rel.relhassubclass, rel.reltuples::bigint, des.description, con.conname, con.conkey,
-	EXISTS(select 1 FROM pg_trigger
-			JOIN pg_proc pt ON pt.oid=tgfoid AND pt.proname='logtrigger'
-			JOIN pg_proc pc ON pc.pronamespace=pt.pronamespace AND pc.proname='slonyversion'
+	EXISTS(select 1 FROM pg_catalog.pg_trigger
+			JOIN pg_catalog.pg_proc pt ON pt.oid=tgfoid AND pt.proname='logtrigger'
+			JOIN pg_catalog.pg_proc pc ON pc.pronamespace=pt.pronamespace AND pc.proname='slonyversion'
 			WHERE tgrelid=rel.oid) AS isrepl,
-	(SELECT count(*) FROM pg_trigger WHERE tgrelid=rel.oid AND tgisinternal = FALSE) AS triggercount,
+	(SELECT count(*) FROM pg_catalog.pg_trigger WHERE tgrelid=rel.oid AND tgisinternal = FALSE) AS triggercount,
 	(SELECT ARRAY(SELECT CASE WHEN (nspname NOT LIKE 'pg\_%') THEN
-            quote_ident(nspname)||'.'||quote_ident(c.relname)
-            ELSE quote_ident(c.relname) END AS inherited_tables
-    FROM pg_inherits i
-    JOIN pg_class c ON c.oid = i.inhparent
-    JOIN pg_namespace n ON n.oid=c.relnamespace
+            pg_catalog.quote_ident(nspname)||'.'||pg_catalog.quote_ident(c.relname)
+            ELSE pg_catalog.quote_ident(c.relname) END AS inherited_tables
+    FROM pg_catalog.pg_inherits i
+    JOIN pg_catalog.pg_class c ON c.oid = i.inhparent
+    JOIN pg_catalog.pg_namespace n ON n.oid=c.relnamespace
     WHERE i.inhrelid = rel.oid ORDER BY inhseqno)) AS coll_inherits,
   (SELECT count(*)
-		FROM pg_inherits i
-      JOIN pg_class c ON c.oid = i.inhparent
-      JOIN pg_namespace n ON n.oid=c.relnamespace
+		FROM pg_catalog.pg_inherits i
+      JOIN pg_catalog.pg_class c ON c.oid = i.inhparent
+      JOIN pg_catalog.pg_namespace n ON n.oid=c.relnamespace
 		WHERE i.inhrelid = rel.oid) AS inherited_tables_cnt,
 	(CASE WHEN rel.relpersistence = 'u' THEN true ELSE false END) AS relpersistence,
-	substring(array_to_string(rel.reloptions, ',') FROM 'fillfactor=([0-9]*)') AS fillfactor,
-	(substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS autovacuum_enabled,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS autovacuum_vacuum_threshold,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_vacuum_scale_factor,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS autovacuum_analyze_threshold,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_analyze_scale_factor,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS autovacuum_vacuum_cost_delay,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS autovacuum_vacuum_cost_limit,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS autovacuum_freeze_min_age,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS autovacuum_freeze_max_age,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS autovacuum_freeze_table_age,
-	(substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS toast_autovacuum_enabled,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS toast_autovacuum_vacuum_threshold,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_vacuum_scale_factor,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS toast_autovacuum_analyze_threshold,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_analyze_scale_factor,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS toast_autovacuum_vacuum_cost_delay,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS toast_autovacuum_vacuum_cost_limit,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS toast_autovacuum_freeze_min_age,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS toast_autovacuum_freeze_max_age,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS toast_autovacuum_freeze_table_age,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'fillfactor=([0-9]*)') AS fillfactor,
+	(substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS autovacuum_enabled,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS autovacuum_vacuum_threshold,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_vacuum_scale_factor,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS autovacuum_analyze_threshold,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_analyze_scale_factor,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS autovacuum_vacuum_cost_delay,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS autovacuum_vacuum_cost_limit,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS autovacuum_freeze_min_age,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS autovacuum_freeze_max_age,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS autovacuum_freeze_table_age,
+	(substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS toast_autovacuum_enabled,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS toast_autovacuum_vacuum_threshold,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_vacuum_scale_factor,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS toast_autovacuum_analyze_threshold,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_analyze_scale_factor,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS toast_autovacuum_vacuum_cost_delay,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS toast_autovacuum_vacuum_cost_limit,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS toast_autovacuum_freeze_min_age,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS toast_autovacuum_freeze_max_age,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS toast_autovacuum_freeze_table_age,
 	rel.reloptions AS reloptions, tst.reloptions AS toast_reloptions, rel.reloftype, typ.typname,
 	typ.typrelid AS typoid,
 	(CASE WHEN rel.reltoastrelid = 0 THEN false ELSE true END) AS hastoasttable,
-	(SELECT array_agg(provider || '=' || label) FROM pg_seclabels sl1 WHERE sl1.objoid=rel.oid AND sl1.objsubid=0) AS seclabels,
+	(SELECT pg_catalog.array_agg(provider || '=' || label) FROM pg_catalog.pg_seclabels sl1 WHERE sl1.objoid=rel.oid AND sl1.objsubid=0) AS seclabels,
 	(CASE WHEN rel.oid <= {{ datlastsysoid}}::oid THEN true ElSE false END) AS is_sys_table,
 	-- Added for partition table
 	(CASE WHEN rel.relkind = 'p' THEN true ELSE false END) AS is_partitioned,
-	(CASE WHEN rel.relkind = 'p' THEN pg_get_partkeydef(rel.oid::oid) ELSE '' END) AS partition_scheme,
+	(CASE WHEN rel.relkind = 'p' THEN pg_catalog.pg_get_partkeydef(rel.oid::oid) ELSE '' END) AS partition_scheme,
 	{% if ptid %}
-	  (CASE WHEN rel.relispartition THEN pg_get_expr(rel.relpartbound, {{ ptid }}::oid) ELSE '' END) AS partition_value,
-	  (SELECT relname FROM pg_class WHERE oid = {{ tid }}::oid) AS partitioned_table_name
+	  (CASE WHEN rel.relispartition THEN pg_catalog.pg_get_expr(rel.relpartbound, {{ ptid }}::oid) ELSE '' END) AS partition_value,
+	  (SELECT relname FROM pg_catalog.pg_class WHERE oid = {{ tid }}::oid) AS partitioned_table_name
 	{% else %}
-	  pg_get_expr(rel.relpartbound, rel.oid) AS partition_value
+	  pg_catalog.pg_get_expr(rel.relpartbound, rel.oid) AS partition_value
 	{% endif %}
 
-FROM pg_class rel
-  LEFT OUTER JOIN pg_tablespace spc on spc.oid=rel.reltablespace
-  LEFT OUTER JOIN pg_description des ON (des.objoid=rel.oid AND des.objsubid=0 AND des.classoid='pg_class'::regclass)
-  LEFT OUTER JOIN pg_constraint con ON con.conrelid=rel.oid AND con.contype='p'
-  LEFT OUTER JOIN pg_class tst ON tst.oid = rel.reltoastrelid
-  LEFT JOIN pg_type typ ON rel.reloftype=typ.oid
-  LEFT JOIN pg_inherits inh ON inh.inhrelid = rel.oid
-  LEFT JOIN pg_namespace nsp ON rel.relnamespace = nsp.oid
+FROM pg_catalog.pg_class rel
+  LEFT OUTER JOIN pg_catalog.pg_tablespace spc on spc.oid=rel.reltablespace
+  LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=rel.oid AND des.objsubid=0 AND des.classoid='pg_class'::regclass)
+  LEFT OUTER JOIN pg_catalog.pg_constraint con ON con.conrelid=rel.oid AND con.contype='p'
+  LEFT OUTER JOIN pg_catalog.pg_class tst ON tst.oid = rel.reltoastrelid
+  LEFT JOIN pg_catalog.pg_type typ ON rel.reloftype=typ.oid
+  LEFT JOIN pg_catalog.pg_inherits inh ON inh.inhrelid = rel.oid
+  LEFT JOIN pg_catalog.pg_namespace nsp ON rel.relnamespace = nsp.oid
 WHERE rel.relispartition AND inh.inhparent = {{ tid }}::oid
 {% if ptid %}  AND rel.oid = {{ ptid }}::oid {% endif %}
 ORDER BY rel.relname;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/row_security_policies/sql/10_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/row_security_policies/sql/10_plus/properties.sql
index 2674c9fdc..8a672967c 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/row_security_policies/sql/10_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/row_security_policies/sql/10_plus/properties.sql
@@ -8,12 +8,12 @@ SELECT
     rw.with_check AS withcheck,
     rw.with_check AS withcheck_orig,
 
-    array_to_string(rw.roles::name[], ', ') AS policyowner
+    pg_catalog.array_to_string(rw.roles::name[], ', ') AS policyowner
 FROM
-    pg_policy pl
-JOIN pg_policies rw ON pl.polname=rw.policyname
-JOIN pg_namespace n ON n.nspname=rw.schemaname
-JOIN pg_class rel on rel.relname=rw.tablename
+    pg_catalog.pg_policy pl
+JOIN pg_catalog.pg_policies rw ON pl.polname=rw.policyname
+JOIN pg_catalog.pg_namespace n ON n.nspname=rw.schemaname
+JOIN pg_catalog.pg_class rel on rel.relname=rw.tablename
 WHERE
 {% if plid %}
       pl.oid = {{ plid }} and n.oid = {{ scid }} and rel.oid = {{ policy_table_id }};
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/row_security_policies/sql/9.5_plus/get_parent.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/row_security_policies/sql/9.5_plus/get_parent.sql
index aad3fa523..0c46d743c 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/row_security_policies/sql/9.5_plus/get_parent.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/row_security_policies/sql/9.5_plus/get_parent.sql
@@ -1,5 +1,5 @@
 SELECT nsp.nspname AS schema ,rel.relname AS table
-FROM pg_class rel
-    JOIN pg_namespace nsp
+FROM pg_catalog.pg_class rel
+    JOIN pg_catalog.pg_namespace nsp
     ON rel.relnamespace = nsp.oid::oid
     WHERE rel.oid = {{tid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/row_security_policies/sql/9.5_plus/get_policy_name.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/row_security_policies/sql/9.5_plus/get_policy_name.sql
index 82bcb51ec..90fe16bd2 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/row_security_policies/sql/9.5_plus/get_policy_name.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/row_security_policies/sql/9.5_plus/get_policy_name.sql
@@ -3,7 +3,7 @@ SELECT
     pl.oid AS oid,
     pl.polname AS name
 FROM
-    pg_policy pl
+    pg_catalog.pg_policy pl
 WHERE
       pl.oid = {{ plid }}
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/row_security_policies/sql/9.5_plus/get_position.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/row_security_policies/sql/9.5_plus/get_position.sql
index 0d67b1107..851d504d9 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/row_security_policies/sql/9.5_plus/get_position.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/row_security_policies/sql/9.5_plus/get_position.sql
@@ -1,2 +1,2 @@
-SELECT pl.oid FROM pg_policy pl
+SELECT pl.oid FROM pg_catalog.pg_policy pl
 WHERE pl.polrelid = {{tid}}::oid AND pl.polname = {{data.name|qtLiteral}};
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/row_security_policies/sql/9.5_plus/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/row_security_policies/sql/9.5_plus/nodes.sql
index 083c01605..47cd9a140 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/row_security_policies/sql/9.5_plus/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/row_security_policies/sql/9.5_plus/nodes.sql
@@ -2,7 +2,7 @@ SELECT
     pl.oid AS oid,
     pl.polname AS name
 FROM
-    pg_policy pl
+    pg_catalog.pg_policy pl
 WHERE
 {% if tid %}
     pl.polrelid	 = {{ tid }}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/row_security_policies/sql/9.5_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/row_security_policies/sql/9.5_plus/properties.sql
index fde4eeda2..3098b5c83 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/row_security_policies/sql/9.5_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/row_security_policies/sql/9.5_plus/properties.sql
@@ -7,12 +7,12 @@ SELECT
     rw.with_check AS withcheck,
     rw.with_check AS withcheck_orig,
 
-    array_to_string(rw.roles::name[], ', ') AS policyowner
+    pg_catalog.array_to_string(rw.roles::name[], ', ') AS policyowner
 FROM
-    pg_policy pl
-JOIN pg_policies rw ON pl.polname=rw.policyname
-JOIN pg_namespace n ON n.nspname=rw.schemaname
-JOIN pg_class rel on rel.relname=rw.tablename
+    pg_catalog.pg_policy pl
+JOIN pg_catalog.pg_policies rw ON pl.polname=rw.policyname
+JOIN pg_catalog.pg_namespace n ON n.nspname=rw.schemaname
+JOIN pg_catalog.pg_class rel on rel.relname=rw.tablename
 WHERE
 {% if plid %}
       pl.oid = {{ plid }} and n.oid = {{ scid }} and rel.oid = {{ policy_table_id }};
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/row_security_policies/sql/default/get_parent.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/row_security_policies/sql/default/get_parent.sql
index aad3fa523..0c46d743c 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/row_security_policies/sql/default/get_parent.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/row_security_policies/sql/default/get_parent.sql
@@ -1,5 +1,5 @@
 SELECT nsp.nspname AS schema ,rel.relname AS table
-FROM pg_class rel
-    JOIN pg_namespace nsp
+FROM pg_catalog.pg_class rel
+    JOIN pg_catalog.pg_namespace nsp
     ON rel.relnamespace = nsp.oid::oid
     WHERE rel.oid = {{tid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/row_security_policies/sql/default/get_policy_name.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/row_security_policies/sql/default/get_policy_name.sql
index 82bcb51ec..90fe16bd2 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/row_security_policies/sql/default/get_policy_name.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/row_security_policies/sql/default/get_policy_name.sql
@@ -3,7 +3,7 @@ SELECT
     pl.oid AS oid,
     pl.polname AS name
 FROM
-    pg_policy pl
+    pg_catalog.pg_policy pl
 WHERE
       pl.oid = {{ plid }}
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/row_security_policies/sql/default/get_position.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/row_security_policies/sql/default/get_position.sql
index 0d67b1107..851d504d9 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/row_security_policies/sql/default/get_position.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/row_security_policies/sql/default/get_position.sql
@@ -1,2 +1,2 @@
-SELECT pl.oid FROM pg_policy pl
+SELECT pl.oid FROM pg_catalog.pg_policy pl
 WHERE pl.polrelid = {{tid}}::oid AND pl.polname = {{data.name|qtLiteral}};
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/row_security_policies/sql/default/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/row_security_policies/sql/default/nodes.sql
index 083c01605..47cd9a140 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/row_security_policies/sql/default/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/row_security_policies/sql/default/nodes.sql
@@ -2,7 +2,7 @@ SELECT
     pl.oid AS oid,
     pl.polname AS name
 FROM
-    pg_policy pl
+    pg_catalog.pg_policy pl
 WHERE
 {% if tid %}
     pl.polrelid	 = {{ tid }}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/row_security_policies/sql/default/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/row_security_policies/sql/default/properties.sql
index fde4eeda2..3098b5c83 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/row_security_policies/sql/default/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/row_security_policies/sql/default/properties.sql
@@ -7,12 +7,12 @@ SELECT
     rw.with_check AS withcheck,
     rw.with_check AS withcheck_orig,
 
-    array_to_string(rw.roles::name[], ', ') AS policyowner
+    pg_catalog.array_to_string(rw.roles::name[], ', ') AS policyowner
 FROM
-    pg_policy pl
-JOIN pg_policies rw ON pl.polname=rw.policyname
-JOIN pg_namespace n ON n.nspname=rw.schemaname
-JOIN pg_class rel on rel.relname=rw.tablename
+    pg_catalog.pg_policy pl
+JOIN pg_catalog.pg_policies rw ON pl.polname=rw.policyname
+JOIN pg_catalog.pg_namespace n ON n.nspname=rw.schemaname
+JOIN pg_catalog.pg_class rel on rel.relname=rw.tablename
 WHERE
 {% if plid %}
       pl.oid = {{ plid }} and n.oid = {{ scid }} and rel.oid = {{ policy_table_id }};
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/rules/sql/backend_support.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/rules/sql/backend_support.sql
index bb5e8d803..4b9b6b9af 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/rules/sql/backend_support.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/rules/sql/backend_support.sql
@@ -3,7 +3,7 @@
 SELECT
     CASE WHEN c.relkind = 'm' THEN False ELSE True END As m_view
 FROM
-    pg_class c
+    pg_catalog.pg_class c
 WHERE
     c.oid = {{ vid }}::oid
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/rules/sql/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/rules/sql/delete.sql
index cf18913b8..227d84a10 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/rules/sql/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/rules/sql/delete.sql
@@ -5,9 +5,9 @@ SELECT
     cl.relname,
     nsp.nspname
 FROM
-    pg_rewrite rw
-JOIN pg_class cl ON cl.oid=rw.ev_class
-JOIN pg_namespace nsp ON nsp.oid=cl.relnamespace
+    pg_catalog.pg_rewrite rw
+JOIN pg_catalog.pg_class cl ON cl.oid=rw.ev_class
+JOIN pg_catalog.pg_namespace nsp ON nsp.oid=cl.relnamespace
 WHERE
     rw.oid={{ rid }};
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/rules/sql/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/rules/sql/nodes.sql
index ff11fc8f0..67ddae002 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/rules/sql/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/rules/sql/nodes.sql
@@ -2,7 +2,7 @@ SELECT
     rw.oid AS oid,
     rw.rulename AS name
 FROM
-    pg_rewrite rw
+    pg_catalog.pg_rewrite rw
 WHERE
 {% if tid %}
     rw.ev_class = {{ tid }}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/rules/sql/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/rules/sql/properties.sql
index 6cb159939..c983896b0 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/rules/sql/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/rules/sql/properties.sql
@@ -12,12 +12,12 @@ SELECT
     {# ===== Check whether it is system rule or not ===== #}
     CASE WHEN rw.rulename = '_RETURN' THEN True ELSE False END AS system_rule,
     CASE WHEN rw.ev_enabled != 'D' THEN True ELSE False END AS enabled,
-    pg_get_ruledef(rw.oid) AS definition
+    pg_catalog.pg_get_ruledef(rw.oid) AS definition
 FROM
-    pg_rewrite rw
-JOIN pg_class cl ON cl.oid=rw.ev_class
-JOIN pg_namespace nsp ON nsp.oid=cl.relnamespace
-LEFT OUTER JOIN pg_description des ON (des.objoid=rw.oid AND des.classoid='pg_rewrite'::regclass)
+    pg_catalog.pg_rewrite rw
+JOIN pg_catalog.pg_class cl ON cl.oid=rw.ev_class
+JOIN pg_catalog.pg_namespace nsp ON nsp.oid=cl.relnamespace
+LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=rw.oid AND des.classoid='pg_rewrite'::regclass)
 WHERE
   {% if tid %}
       ev_class = {{ tid }}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/rules/sql/rule_id.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/rules/sql/rule_id.sql
index 3dc6dbabf..b528fa2e5 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/rules/sql/rule_id.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/rules/sql/rule_id.sql
@@ -3,7 +3,7 @@
 SELECT
     rw.oid
 FROM
-    pg_rewrite rw
+    pg_catalog.pg_rewrite rw
 WHERE
     rw.rulename={{ rule_name|qtLiteral }}
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/10_plus/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/10_plus/acl.sql
index abdff820b..7c2e6d9d3 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/10_plus/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/10_plus/acl.sql
@@ -1,6 +1,6 @@
 {### SQL to fetch privileges for tablespace ###}
 SELECT 'relacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor,
-    array_agg(privilege_type) as privileges, array_agg(is_grantable) as grantable
+    pg_catalog.array_agg(privilege_type) as privileges, pg_catalog.array_agg(is_grantable) as grantable
 FROM
   (SELECT
     d.grantee, d.grantor, d.is_grantable,
@@ -21,22 +21,22 @@ FROM
 	END AS privilege_type
   FROM
     (SELECT rel.relacl
-        FROM pg_class rel
-          LEFT OUTER JOIN pg_tablespace spc on spc.oid=rel.reltablespace
-          LEFT OUTER JOIN pg_constraint con ON con.conrelid=rel.oid AND con.contype='p'
-          LEFT OUTER JOIN pg_class tst ON tst.oid = rel.reltoastrelid
-          LEFT JOIN pg_type typ ON rel.reloftype=typ.oid
+        FROM pg_catalog.pg_class rel
+          LEFT OUTER JOIN pg_catalog.pg_tablespace spc on spc.oid=rel.reltablespace
+          LEFT OUTER JOIN pg_catalog.pg_constraint con ON con.conrelid=rel.oid AND con.contype='p'
+          LEFT OUTER JOIN pg_catalog.pg_class tst ON tst.oid = rel.reltoastrelid
+          LEFT JOIN pg_catalog.pg_type typ ON rel.reloftype=typ.oid
         WHERE rel.relkind IN ('r','s','t','p') AND rel.relnamespace = {{ scid }}::oid
             AND rel.oid = {{ tid }}::oid
     ) acl,
     (SELECT (d).grantee AS grantee, (d).grantor AS grantor, (d).is_grantable
         AS is_grantable, (d).privilege_type AS privilege_type FROM (SELECT
         aclexplode(rel.relacl) as d
-        FROM pg_class rel
-          LEFT OUTER JOIN pg_tablespace spc on spc.oid=rel.reltablespace
-          LEFT OUTER JOIN pg_constraint con ON con.conrelid=rel.oid AND con.contype='p'
-          LEFT OUTER JOIN pg_class tst ON tst.oid = rel.reltoastrelid
-          LEFT JOIN pg_type typ ON rel.reloftype=typ.oid
+        FROM pg_catalog.pg_class rel
+          LEFT OUTER JOIN pg_catalog.pg_tablespace spc on spc.oid=rel.reltablespace
+          LEFT OUTER JOIN pg_catalog.pg_constraint con ON con.conrelid=rel.oid AND con.contype='p'
+          LEFT OUTER JOIN pg_catalog.pg_class tst ON tst.oid = rel.reltoastrelid
+          LEFT JOIN pg_catalog.pg_type typ ON rel.reloftype=typ.oid
         WHERE rel.relkind IN ('r','s','t','p') AND rel.relnamespace = {{ scid }}::oid
             AND rel.oid = {{ tid }}::oid
         ) a ORDER BY privilege_type) d
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/10_plus/get_columns_for_table.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/10_plus/get_columns_for_table.sql
index f5ae9942d..bd4bd8414 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/10_plus/get_columns_for_table.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/10_plus/get_columns_for_table.sql
@@ -1,13 +1,13 @@
 SELECT
-    a.attname AS name, format_type(a.atttypid, NULL) AS cltype, a.attidentity as clidentity,
-    quote_ident(n.nspname)||'.'||quote_ident(c.relname) as inheritedfrom,
+    a.attname AS name, pg_catalog.format_type(a.atttypid, NULL) AS cltype, a.attidentity as clidentity,
+    pg_catalog.quote_ident(n.nspname)||'.'||pg_catalog.quote_ident(c.relname) as inheritedfrom,
     c.oid as inheritedid
 FROM
-    pg_class c
+    pg_catalog.pg_class c
 JOIN
-    pg_namespace n ON c.relnamespace=n.oid
+    pg_catalog.pg_namespace n ON c.relnamespace=n.oid
 JOIN
-    pg_attribute a ON a.attrelid = c.oid AND NOT a.attisdropped AND a.attnum > 0
+    pg_catalog.pg_attribute a ON a.attrelid = c.oid AND NOT a.attisdropped AND a.attnum > 0
 WHERE
 {% if tid %}
     c.oid = {{tid}}::OID
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/10_plus/get_inherits.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/10_plus/get_inherits.sql
index b89102422..2e5df5f8f 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/10_plus/get_inherits.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/10_plus/get_inherits.sql
@@ -1,11 +1,11 @@
 {% import 'tables/sql/macros/db_catalogs.macro' as CATALOG %}
 SELECT c.oid, c.relname , nspname,
 CASE WHEN nspname NOT LIKE 'pg\_%' THEN
- quote_ident(nspname)||'.'||quote_ident(c.relname)
-ELSE quote_ident(c.relname)
+ pg_catalog.quote_ident(nspname)||'.'||pg_catalog.quote_ident(c.relname)
+ELSE pg_catalog.quote_ident(c.relname)
 END AS inherits
-FROM pg_class c
-JOIN pg_namespace n
+FROM pg_catalog.pg_class c
+JOIN pg_catalog.pg_namespace n
 ON n.oid=c.relnamespace
 WHERE relkind='r' AND NOT relispartition
 {% if not show_system_objects %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/10_plus/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/10_plus/get_oid.sql
index f63069814..97ab5fef5 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/10_plus/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/10_plus/get_oid.sql
@@ -1,5 +1,5 @@
 SELECT rel.oid as tid
-FROM pg_class rel
+FROM pg_catalog.pg_class rel
 WHERE rel.relkind IN ('r','s','t','p')
 AND rel.relnamespace = {{ scid }}::oid
-AND rel.relname = {{data.name|qtLiteral}}
\ No newline at end of file
+AND rel.relname = {{data.name|qtLiteral}}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/10_plus/get_table.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/10_plus/get_table.sql
index 6952c8d85..df88c4791 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/10_plus/get_table.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/10_plus/get_table.sql
@@ -1,8 +1,8 @@
 SELECT
     rel.relname AS name
 FROM
-    pg_class rel
+    pg_catalog.pg_class rel
 WHERE
     rel.relkind IN ('r','s','t','p')
     AND rel.relnamespace = {{ scid }}::oid
-    AND rel.oid = {{ tid }}::oid;
\ No newline at end of file
+    AND rel.oid = {{ tid }}::oid;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/10_plus/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/10_plus/nodes.sql
index cd688f1ea..ef0d379c3 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/10_plus/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/10_plus/nodes.sql
@@ -1,10 +1,10 @@
 SELECT rel.oid, rel.relname AS name,
-    (SELECT count(*) FROM pg_trigger WHERE tgrelid=rel.oid AND tgisinternal = FALSE) AS triggercount,
-    (SELECT count(*) FROM pg_trigger WHERE tgrelid=rel.oid AND tgisinternal = FALSE AND tgenabled = 'O') AS has_enable_triggers,
+    (SELECT count(*) FROM pg_catalog.pg_trigger WHERE tgrelid=rel.oid AND tgisinternal = FALSE) AS triggercount,
+    (SELECT count(*) FROM pg_catalog.pg_trigger WHERE tgrelid=rel.oid AND tgisinternal = FALSE AND tgenabled = 'O') AS has_enable_triggers,
     (CASE WHEN rel.relkind = 'p' THEN true ELSE false END) AS is_partitioned,
-    (SELECT count(1) FROM pg_inherits WHERE inhrelid=rel.oid LIMIT 1) as is_inherits,
-    (SELECT count(1) FROM pg_inherits WHERE inhparent=rel.oid LIMIT 1) as is_inherited
-FROM pg_class rel
+    (SELECT count(1) FROM pg_catalog.pg_inherits WHERE inhrelid=rel.oid LIMIT 1) as is_inherits,
+    (SELECT count(1) FROM pg_catalog.pg_inherits WHERE inhparent=rel.oid LIMIT 1) as is_inherited
+FROM pg_catalog.pg_class rel
     WHERE rel.relkind IN ('r','s','t','p') AND rel.relnamespace = {{ scid }}::oid
     AND NOT rel.relispartition
     {% if tid %} AND rel.oid = {{tid}}::OID {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/10_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/10_plus/properties.sql
index cb4d47c94..47e9a75dc 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/10_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/10_plus/properties.sql
@@ -1,7 +1,7 @@
 SELECT rel.oid, rel.relname AS name, rel.reltablespace AS spcoid,rel.relacl AS relacl_str,
   (CASE WHEN length(spc.spcname::text) > 0 THEN spc.spcname ELSE
-    (SELECT sp.spcname FROM pg_database dtb
-    JOIN pg_tablespace sp ON dtb.dattablespace=sp.oid
+    (SELECT sp.spcname FROM pg_catalog.pg_database dtb
+    JOIN pg_catalog.pg_tablespace sp ON dtb.dattablespace=sp.oid
     WHERE dtb.oid = {{ did }}::oid)
   END) as spcname,
   (CASE rel.relreplident
@@ -10,64 +10,64 @@ SELECT rel.oid, rel.relname AS name, rel.reltablespace AS spcoid,rel.relacl AS r
           WHEN 'f' THEN 'full'
           WHEN 'i' THEN 'index'
   END) as replica_identity,
-  (select nspname FROM pg_namespace WHERE oid = {{scid}}::oid ) as schema,
-  pg_get_userbyid(rel.relowner) AS relowner, rel.relhasoids, rel.relkind,
+  (select nspname FROM pg_catalog.pg_namespace WHERE oid = {{scid}}::oid ) as schema,
+  pg_catalog.pg_get_userbyid(rel.relowner) AS relowner, rel.relhasoids, rel.relkind,
   (CASE WHEN rel.relkind = 'p' THEN true ELSE false END) AS is_partitioned,
   rel.relhassubclass, rel.reltuples::bigint, des.description, con.conname, con.conkey,
-	EXISTS(select 1 FROM pg_trigger
-			JOIN pg_proc pt ON pt.oid=tgfoid AND pt.proname='logtrigger'
-			JOIN pg_proc pc ON pc.pronamespace=pt.pronamespace AND pc.proname='slonyversion'
+	EXISTS(select 1 FROM pg_catalog.pg_trigger
+			JOIN pg_catalog.pg_proc pt ON pt.oid=tgfoid AND pt.proname='logtrigger'
+			JOIN pg_catalog.pg_proc pc ON pc.pronamespace=pt.pronamespace AND pc.proname='slonyversion'
 			WHERE tgrelid=rel.oid) AS isrepl,
-	(SELECT count(*) FROM pg_trigger WHERE tgrelid=rel.oid AND tgisinternal = FALSE) AS triggercount,
+	(SELECT count(*) FROM pg_catalog.pg_trigger WHERE tgrelid=rel.oid AND tgisinternal = FALSE) AS triggercount,
 	(SELECT ARRAY(SELECT CASE WHEN (nspname NOT LIKE 'pg\_%') THEN
-            quote_ident(nspname)||'.'||quote_ident(c.relname)
-            ELSE quote_ident(c.relname) END AS inherited_tables
-    FROM pg_inherits i
-    JOIN pg_class c ON c.oid = i.inhparent
-    JOIN pg_namespace n ON n.oid=c.relnamespace
+            pg_catalog.quote_ident(nspname)||'.'||pg_catalog.quote_ident(c.relname)
+            ELSE pg_catalog.quote_ident(c.relname) END AS inherited_tables
+    FROM pg_catalog.pg_inherits i
+    JOIN pg_catalog.pg_class c ON c.oid = i.inhparent
+    JOIN pg_catalog.pg_namespace n ON n.oid=c.relnamespace
     WHERE i.inhrelid = rel.oid ORDER BY inhseqno)) AS coll_inherits,
   (SELECT count(*)
-		FROM pg_inherits i
-      JOIN pg_class c ON c.oid = i.inhparent
-      JOIN pg_namespace n ON n.oid=c.relnamespace
+		FROM pg_catalog.pg_inherits i
+      JOIN pg_catalog.pg_class c ON c.oid = i.inhparent
+      JOIN pg_catalog.pg_namespace n ON n.oid=c.relnamespace
 		WHERE i.inhrelid = rel.oid) AS inherited_tables_cnt,
 	(CASE WHEN rel.relpersistence = 'u' THEN true ELSE false END) AS relpersistence,
-	substring(array_to_string(rel.reloptions, ',') FROM 'fillfactor=([0-9]*)') AS fillfactor,
-	substring(array_to_string(rel.reloptions, ',') FROM 'parallel_workers=([0-9]*)') AS parallel_workers,
-	(substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS autovacuum_enabled,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS autovacuum_vacuum_threshold,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_vacuum_scale_factor,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS autovacuum_analyze_threshold,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_analyze_scale_factor,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS autovacuum_vacuum_cost_delay,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS autovacuum_vacuum_cost_limit,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS autovacuum_freeze_min_age,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS autovacuum_freeze_max_age,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS autovacuum_freeze_table_age,
-	(substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS toast_autovacuum_enabled,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS toast_autovacuum_vacuum_threshold,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_vacuum_scale_factor,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS toast_autovacuum_analyze_threshold,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_analyze_scale_factor,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS toast_autovacuum_vacuum_cost_delay,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS toast_autovacuum_vacuum_cost_limit,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS toast_autovacuum_freeze_min_age,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS toast_autovacuum_freeze_max_age,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS toast_autovacuum_freeze_table_age,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'fillfactor=([0-9]*)') AS fillfactor,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'parallel_workers=([0-9]*)') AS parallel_workers,
+	(substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS autovacuum_enabled,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS autovacuum_vacuum_threshold,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_vacuum_scale_factor,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS autovacuum_analyze_threshold,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_analyze_scale_factor,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS autovacuum_vacuum_cost_delay,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS autovacuum_vacuum_cost_limit,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS autovacuum_freeze_min_age,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS autovacuum_freeze_max_age,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS autovacuum_freeze_table_age,
+	(substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS toast_autovacuum_enabled,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS toast_autovacuum_vacuum_threshold,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_vacuum_scale_factor,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS toast_autovacuum_analyze_threshold,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_analyze_scale_factor,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS toast_autovacuum_vacuum_cost_delay,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS toast_autovacuum_vacuum_cost_limit,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS toast_autovacuum_freeze_min_age,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS toast_autovacuum_freeze_max_age,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS toast_autovacuum_freeze_table_age,
 	rel.reloptions AS reloptions, tst.reloptions AS toast_reloptions, rel.reloftype,
-	CASE WHEN typ.typname IS NOT NULL THEN (select quote_ident(nspname) FROM pg_namespace WHERE oid = {{scid}}::oid )||'.'||quote_ident(typ.typname) ELSE typ.typname END AS typname,
+	CASE WHEN typ.typname IS NOT NULL THEN (select pg_catalog.quote_ident(nspname) FROM pg_catalog.pg_namespace WHERE oid = {{scid}}::oid )||'.'||pg_catalog.quote_ident(typ.typname) ELSE typ.typname END AS typname,
 	typ.typrelid AS typoid, rel.relrowsecurity as rlspolicy, rel.relforcerowsecurity as forcerlspolicy,
 	(CASE WHEN rel.reltoastrelid = 0 THEN false ELSE true END) AS hastoasttable,
-	(SELECT array_agg(provider || '=' || label) FROM pg_seclabels sl1 WHERE sl1.objoid=rel.oid AND sl1.objsubid=0) AS seclabels,
+	(SELECT pg_catalog.array_agg(provider || '=' || label) FROM pg_catalog.pg_seclabels sl1 WHERE sl1.objoid=rel.oid AND sl1.objsubid=0) AS seclabels,
 	(CASE WHEN rel.oid <= {{ datlastsysoid}}::oid THEN true ElSE false END) AS is_sys_table
 	-- Added for partition table
-    {% if tid %}, (CASE WHEN rel.relkind = 'p' THEN pg_get_partkeydef({{ tid }}::oid) ELSE '' END) AS partition_scheme {% endif %}
-FROM pg_class rel
-  LEFT OUTER JOIN pg_tablespace spc on spc.oid=rel.reltablespace
-  LEFT OUTER JOIN pg_description des ON (des.objoid=rel.oid AND des.objsubid=0 AND des.classoid='pg_class'::regclass)
-  LEFT OUTER JOIN pg_constraint con ON con.conrelid=rel.oid AND con.contype='p'
-  LEFT OUTER JOIN pg_class tst ON tst.oid = rel.reltoastrelid
-  LEFT JOIN pg_type typ ON rel.reloftype=typ.oid
+    {% if tid %}, (CASE WHEN rel.relkind = 'p' THEN pg_catalog.pg_get_partkeydef({{ tid }}::oid) ELSE '' END) AS partition_scheme {% endif %}
+FROM pg_catalog.pg_class rel
+  LEFT OUTER JOIN pg_catalog.pg_tablespace spc on spc.oid=rel.reltablespace
+  LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=rel.oid AND des.objsubid=0 AND des.classoid='pg_class'::regclass)
+  LEFT OUTER JOIN pg_catalog.pg_constraint con ON con.conrelid=rel.oid AND con.contype='p'
+  LEFT OUTER JOIN pg_catalog.pg_class tst ON tst.oid = rel.reltoastrelid
+  LEFT JOIN pg_catalog.pg_type typ ON rel.reloftype=typ.oid
 WHERE rel.relkind IN ('r','s','t','p') AND rel.relnamespace = {{ scid }}::oid
 AND NOT rel.relispartition
 {% if tid %}  AND rel.oid = {{ tid }}::oid {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/11_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/11_plus/properties.sql
index fea316289..151bd9be6 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/11_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/11_plus/properties.sql
@@ -1,7 +1,7 @@
 SELECT rel.oid, rel.relname AS name, rel.reltablespace AS spcoid,rel.relacl AS relacl_str,
   (CASE WHEN length(spc.spcname::text) > 0 THEN spc.spcname ELSE
-    (SELECT sp.spcname FROM pg_database dtb
-    JOIN pg_tablespace sp ON dtb.dattablespace=sp.oid
+    (SELECT sp.spcname FROM pg_catalog.pg_database dtb
+    JOIN pg_catalog.pg_tablespace sp ON dtb.dattablespace=sp.oid
     WHERE dtb.oid = {{ did }}::oid)
   END) as spcname,
   (CASE rel.relreplident
@@ -10,65 +10,65 @@ SELECT rel.oid, rel.relname AS name, rel.reltablespace AS spcoid,rel.relacl AS r
           WHEN 'f' THEN 'full'
           WHEN 'i' THEN 'index'
   END) as replica_identity,
-  (select nspname FROM pg_namespace WHERE oid = {{scid}}::oid ) as schema,
-  pg_get_userbyid(rel.relowner) AS relowner, rel.relhasoids, rel.relkind,
+  (select nspname FROM pg_catalog.pg_namespace WHERE oid = {{scid}}::oid ) as schema,
+  pg_catalog.pg_get_userbyid(rel.relowner) AS relowner, rel.relhasoids, rel.relkind,
   (CASE WHEN rel.relkind = 'p' THEN true ELSE false END) AS is_partitioned,
   rel.relhassubclass, rel.reltuples::bigint, des.description, con.conname, con.conkey,
-	EXISTS(select 1 FROM pg_trigger
-			JOIN pg_proc pt ON pt.oid=tgfoid AND pt.proname='logtrigger'
-			JOIN pg_proc pc ON pc.pronamespace=pt.pronamespace AND pc.proname='slonyversion'
+	EXISTS(select 1 FROM pg_catalog.pg_trigger
+			JOIN pg_catalog.pg_proc pt ON pt.oid=tgfoid AND pt.proname='logtrigger'
+			JOIN pg_catalog.pg_proc pc ON pc.pronamespace=pt.pronamespace AND pc.proname='slonyversion'
 			WHERE tgrelid=rel.oid) AS isrepl,
-	(SELECT count(*) FROM pg_trigger WHERE tgrelid=rel.oid AND tgisinternal = FALSE) AS triggercount,
+	(SELECT count(*) FROM pg_catalog.pg_trigger WHERE tgrelid=rel.oid AND tgisinternal = FALSE) AS triggercount,
 	(SELECT ARRAY(SELECT CASE WHEN (nspname NOT LIKE 'pg\_%') THEN
-            quote_ident(nspname)||'.'||quote_ident(c.relname)
-            ELSE quote_ident(c.relname) END AS inherited_tables
-    FROM pg_inherits i
-    JOIN pg_class c ON c.oid = i.inhparent
-    JOIN pg_namespace n ON n.oid=c.relnamespace
+            pg_catalog.quote_ident(nspname)||'.'||pg_catalog.quote_ident(c.relname)
+            ELSE pg_catalog.quote_ident(c.relname) END AS inherited_tables
+    FROM pg_catalog.pg_inherits i
+    JOIN pg_catalog.pg_class c ON c.oid = i.inhparent
+    JOIN pg_catalog.pg_namespace n ON n.oid=c.relnamespace
     WHERE i.inhrelid = rel.oid ORDER BY inhseqno)) AS coll_inherits,
   (SELECT count(*)
-		FROM pg_inherits i
-      JOIN pg_class c ON c.oid = i.inhparent
-      JOIN pg_namespace n ON n.oid=c.relnamespace
+		FROM pg_catalog.pg_inherits i
+      JOIN pg_catalog.pg_class c ON c.oid = i.inhparent
+      JOIN pg_catalog.pg_namespace n ON n.oid=c.relnamespace
 		WHERE i.inhrelid = rel.oid) AS inherited_tables_cnt,
 	(CASE WHEN rel.relpersistence = 'u' THEN true ELSE false END) AS relpersistence,
-	substring(array_to_string(rel.reloptions, ',') FROM 'fillfactor=([0-9]*)') AS fillfactor,
-	substring(array_to_string(rel.reloptions, ',') FROM 'parallel_workers=([0-9]*)') AS parallel_workers,
-	substring(array_to_string(rel.reloptions, ',') FROM 'toast_tuple_target=([0-9]*)') AS toast_tuple_target,
-	(substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS autovacuum_enabled,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS autovacuum_vacuum_threshold,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_vacuum_scale_factor,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS autovacuum_analyze_threshold,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_analyze_scale_factor,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS autovacuum_vacuum_cost_delay,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS autovacuum_vacuum_cost_limit,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS autovacuum_freeze_min_age,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS autovacuum_freeze_max_age,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS autovacuum_freeze_table_age,
-	(substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS toast_autovacuum_enabled,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS toast_autovacuum_vacuum_threshold,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_vacuum_scale_factor,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS toast_autovacuum_analyze_threshold,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_analyze_scale_factor,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS toast_autovacuum_vacuum_cost_delay,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS toast_autovacuum_vacuum_cost_limit,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS toast_autovacuum_freeze_min_age,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS toast_autovacuum_freeze_max_age,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS toast_autovacuum_freeze_table_age,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'fillfactor=([0-9]*)') AS fillfactor,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'parallel_workers=([0-9]*)') AS parallel_workers,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'toast_tuple_target=([0-9]*)') AS toast_tuple_target,
+	(substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS autovacuum_enabled,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS autovacuum_vacuum_threshold,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_vacuum_scale_factor,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS autovacuum_analyze_threshold,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_analyze_scale_factor,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS autovacuum_vacuum_cost_delay,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS autovacuum_vacuum_cost_limit,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS autovacuum_freeze_min_age,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS autovacuum_freeze_max_age,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS autovacuum_freeze_table_age,
+	(substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS toast_autovacuum_enabled,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS toast_autovacuum_vacuum_threshold,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_vacuum_scale_factor,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS toast_autovacuum_analyze_threshold,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_analyze_scale_factor,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS toast_autovacuum_vacuum_cost_delay,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS toast_autovacuum_vacuum_cost_limit,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS toast_autovacuum_freeze_min_age,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS toast_autovacuum_freeze_max_age,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS toast_autovacuum_freeze_table_age,
 	rel.reloptions AS reloptions, tst.reloptions AS toast_reloptions, rel.reloftype,
-	CASE WHEN typ.typname IS NOT NULL THEN (select quote_ident(nspname) FROM pg_namespace WHERE oid = {{scid}}::oid )||'.'||quote_ident(typ.typname) ELSE typ.typname END AS typname,
+	CASE WHEN typ.typname IS NOT NULL THEN (select pg_catalog.quote_ident(nspname) FROM pg_catalog.pg_namespace WHERE oid = {{scid}}::oid )||'.'||pg_catalog.quote_ident(typ.typname) ELSE typ.typname END AS typname,
 	typ.typrelid AS typoid, rel.relrowsecurity as rlspolicy, rel.relforcerowsecurity as forcerlspolicy,
 	(CASE WHEN rel.reltoastrelid = 0 THEN false ELSE true END) AS hastoasttable,
-	(SELECT array_agg(provider || '=' || label) FROM pg_seclabels sl1 WHERE sl1.objoid=rel.oid AND sl1.objsubid=0) AS seclabels,
+	(SELECT pg_catalog.array_agg(provider || '=' || label) FROM pg_catalog.pg_seclabels sl1 WHERE sl1.objoid=rel.oid AND sl1.objsubid=0) AS seclabels,
 	(CASE WHEN rel.oid <= {{ datlastsysoid}}::oid THEN true ElSE false END) AS is_sys_table
 	-- Added for partition table
-    {% if tid %}, (CASE WHEN rel.relkind = 'p' THEN pg_get_partkeydef({{ tid }}::oid) ELSE '' END) AS partition_scheme {% endif %}
-FROM pg_class rel
-  LEFT OUTER JOIN pg_tablespace spc on spc.oid=rel.reltablespace
-  LEFT OUTER JOIN pg_description des ON (des.objoid=rel.oid AND des.objsubid=0 AND des.classoid='pg_class'::regclass)
-  LEFT OUTER JOIN pg_constraint con ON con.conrelid=rel.oid AND con.contype='p'
-  LEFT OUTER JOIN pg_class tst ON tst.oid = rel.reltoastrelid
-  LEFT JOIN pg_type typ ON rel.reloftype=typ.oid
+    {% if tid %}, (CASE WHEN rel.relkind = 'p' THEN pg_catalog.pg_get_partkeydef({{ tid }}::oid) ELSE '' END) AS partition_scheme {% endif %}
+FROM pg_catalog.pg_class rel
+  LEFT OUTER JOIN pg_catalog.pg_tablespace spc on spc.oid=rel.reltablespace
+  LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=rel.oid AND des.objsubid=0 AND des.classoid='pg_class'::regclass)
+  LEFT OUTER JOIN pg_catalog.pg_constraint con ON con.conrelid=rel.oid AND con.contype='p'
+  LEFT OUTER JOIN pg_catalog.pg_class tst ON tst.oid = rel.reltoastrelid
+  LEFT JOIN pg_catalog.pg_type typ ON rel.reloftype=typ.oid
 WHERE rel.relkind IN ('r','s','t','p') AND rel.relnamespace = {{ scid }}::oid
 AND NOT rel.relispartition
 {% if tid %}  AND rel.oid = {{ tid }}::oid {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/12_plus/get_tables_for_constraints.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/12_plus/get_tables_for_constraints.sql
index 99089a12f..594a00a70 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/12_plus/get_tables_for_constraints.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/12_plus/get_tables_for_constraints.sql
@@ -1,5 +1,5 @@
-SELECT cl.oid as value, quote_ident(nspname)||'.'||quote_ident(relname) AS label
-FROM pg_namespace nsp, pg_class cl
+SELECT cl.oid as value, pg_catalog.quote_ident(nspname)||'.'||pg_catalog.quote_ident(relname) AS label
+FROM pg_catalog.pg_namespace nsp, pg_class cl
 WHERE relnamespace=nsp.oid AND relkind in ('r', 'p')
    AND nsp.nspname NOT LIKE E'pg\_temp\_%'
    {% if not show_sysobj %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/12_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/12_plus/properties.sql
index 2c725b6bf..a98d5b69b 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/12_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/12_plus/properties.sql
@@ -1,7 +1,7 @@
 SELECT rel.oid, rel.relname AS name, rel.reltablespace AS spcoid,rel.relacl AS relacl_str,
   (CASE WHEN length(spc.spcname::text) > 0 OR rel.relkind = 'p' THEN spc.spcname ELSE
-    (SELECT sp.spcname FROM pg_database dtb
-    JOIN pg_tablespace sp ON dtb.dattablespace=sp.oid
+    (SELECT sp.spcname FROM pg_catalog.pg_database dtb
+    JOIN pg_catalog.pg_tablespace sp ON dtb.dattablespace=sp.oid
     WHERE dtb.oid = {{ did }}::oid)
   END) as spcname,
   (CASE rel.relreplident
@@ -10,65 +10,65 @@ SELECT rel.oid, rel.relname AS name, rel.reltablespace AS spcoid,rel.relacl AS r
           WHEN 'f' THEN 'full'
           WHEN 'i' THEN 'index'
   END) as replica_identity,
-  (select nspname FROM pg_namespace WHERE oid = {{scid}}::oid ) as schema,
-  pg_get_userbyid(rel.relowner) AS relowner, rel.relkind,
+  (select nspname FROM pg_catalog.pg_namespace WHERE oid = {{scid}}::oid ) as schema,
+  pg_catalog.pg_get_userbyid(rel.relowner) AS relowner, rel.relkind,
   (CASE WHEN rel.relkind = 'p' THEN true ELSE false END) AS is_partitioned,
   rel.relhassubclass, rel.reltuples::bigint, des.description, con.conname, con.conkey,
-	EXISTS(select 1 FROM pg_trigger
-			JOIN pg_proc pt ON pt.oid=tgfoid AND pt.proname='logtrigger'
-			JOIN pg_proc pc ON pc.pronamespace=pt.pronamespace AND pc.proname='slonyversion'
+	EXISTS(select 1 FROM pg_catalog.pg_trigger
+			JOIN pg_catalog.pg_proc pt ON pt.oid=tgfoid AND pt.proname='logtrigger'
+			JOIN pg_catalog.pg_proc pc ON pc.pronamespace=pt.pronamespace AND pc.proname='slonyversion'
 			WHERE tgrelid=rel.oid) AS isrepl,
-	(SELECT count(*) FROM pg_trigger WHERE tgrelid=rel.oid AND tgisinternal = FALSE) AS triggercount,
+	(SELECT count(*) FROM pg_catalog.pg_trigger WHERE tgrelid=rel.oid AND tgisinternal = FALSE) AS triggercount,
 	(SELECT ARRAY(SELECT CASE WHEN (nspname NOT LIKE 'pg\_%') THEN
-            quote_ident(nspname)||'.'||quote_ident(c.relname)
-            ELSE quote_ident(c.relname) END AS inherited_tables
-    FROM pg_inherits i
-    JOIN pg_class c ON c.oid = i.inhparent
-    JOIN pg_namespace n ON n.oid=c.relnamespace
+            pg_catalog.quote_ident(nspname)||'.'||pg_catalog.quote_ident(c.relname)
+            ELSE pg_catalog.quote_ident(c.relname) END AS inherited_tables
+    FROM pg_catalog.pg_inherits i
+    JOIN pg_catalog.pg_class c ON c.oid = i.inhparent
+    JOIN pg_catalog.pg_namespace n ON n.oid=c.relnamespace
     WHERE i.inhrelid = rel.oid ORDER BY inhseqno)) AS coll_inherits,
   (SELECT count(*)
-		FROM pg_inherits i
-      JOIN pg_class c ON c.oid = i.inhparent
-      JOIN pg_namespace n ON n.oid=c.relnamespace
+		FROM pg_catalog.pg_inherits i
+      JOIN pg_catalog.pg_class c ON c.oid = i.inhparent
+      JOIN pg_catalog.pg_namespace n ON n.oid=c.relnamespace
 		WHERE i.inhrelid = rel.oid) AS inherited_tables_cnt,
 	(CASE WHEN rel.relpersistence = 'u' THEN true ELSE false END) AS relpersistence,
-	substring(array_to_string(rel.reloptions, ',') FROM 'fillfactor=([0-9]*)') AS fillfactor,
-	substring(array_to_string(rel.reloptions, ',') FROM 'parallel_workers=([0-9]*)') AS parallel_workers,
-	substring(array_to_string(rel.reloptions, ',') FROM 'toast_tuple_target=([0-9]*)') AS toast_tuple_target,
-	(substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS autovacuum_enabled,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS autovacuum_vacuum_threshold,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_vacuum_scale_factor,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS autovacuum_analyze_threshold,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_analyze_scale_factor,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS autovacuum_vacuum_cost_delay,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS autovacuum_vacuum_cost_limit,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS autovacuum_freeze_min_age,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS autovacuum_freeze_max_age,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS autovacuum_freeze_table_age,
-	(substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS toast_autovacuum_enabled,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS toast_autovacuum_vacuum_threshold,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_vacuum_scale_factor,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS toast_autovacuum_analyze_threshold,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_analyze_scale_factor,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS toast_autovacuum_vacuum_cost_delay,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS toast_autovacuum_vacuum_cost_limit,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS toast_autovacuum_freeze_min_age,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS toast_autovacuum_freeze_max_age,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS toast_autovacuum_freeze_table_age,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'fillfactor=([0-9]*)') AS fillfactor,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'parallel_workers=([0-9]*)') AS parallel_workers,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'toast_tuple_target=([0-9]*)') AS toast_tuple_target,
+	(substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS autovacuum_enabled,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS autovacuum_vacuum_threshold,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_vacuum_scale_factor,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS autovacuum_analyze_threshold,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_analyze_scale_factor,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS autovacuum_vacuum_cost_delay,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS autovacuum_vacuum_cost_limit,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS autovacuum_freeze_min_age,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS autovacuum_freeze_max_age,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS autovacuum_freeze_table_age,
+	(substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS toast_autovacuum_enabled,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS toast_autovacuum_vacuum_threshold,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_vacuum_scale_factor,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS toast_autovacuum_analyze_threshold,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_analyze_scale_factor,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS toast_autovacuum_vacuum_cost_delay,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS toast_autovacuum_vacuum_cost_limit,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS toast_autovacuum_freeze_min_age,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS toast_autovacuum_freeze_max_age,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS toast_autovacuum_freeze_table_age,
 	rel.reloptions AS reloptions, tst.reloptions AS toast_reloptions, rel.reloftype,
-	CASE WHEN typ.typname IS NOT NULL THEN (select quote_ident(nspname) FROM pg_namespace WHERE oid = {{scid}}::oid )||'.'||quote_ident(typ.typname) ELSE typ.typname END AS typname,
+	CASE WHEN typ.typname IS NOT NULL THEN (select pg_catalog.quote_ident(nspname) FROM pg_catalog.pg_namespace WHERE oid = {{scid}}::oid )||'.'||pg_catalog.quote_ident(typ.typname) ELSE typ.typname END AS typname,
 	typ.typrelid AS typoid, rel.relrowsecurity as rlspolicy, rel.relforcerowsecurity as forcerlspolicy,
 	(CASE WHEN rel.reltoastrelid = 0 THEN false ELSE true END) AS hastoasttable,
-	(SELECT array_agg(provider || '=' || label) FROM pg_seclabels sl1 WHERE sl1.objoid=rel.oid AND sl1.objsubid=0) AS seclabels,
+	(SELECT pg_catalog.array_agg(provider || '=' || label) FROM pg_catalog.pg_seclabels sl1 WHERE sl1.objoid=rel.oid AND sl1.objsubid=0) AS seclabels,
 	(CASE WHEN rel.oid <= {{ datlastsysoid}}::oid THEN true ElSE false END) AS is_sys_table
 	-- Added for partition table
-    {% if tid %}, (CASE WHEN rel.relkind = 'p' THEN pg_get_partkeydef({{ tid }}::oid) ELSE '' END) AS partition_scheme {% endif %}
-FROM pg_class rel
-  LEFT OUTER JOIN pg_tablespace spc on spc.oid=rel.reltablespace
-  LEFT OUTER JOIN pg_description des ON (des.objoid=rel.oid AND des.objsubid=0 AND des.classoid='pg_class'::regclass)
-  LEFT OUTER JOIN pg_constraint con ON con.conrelid=rel.oid AND con.contype='p'
-  LEFT OUTER JOIN pg_class tst ON tst.oid = rel.reltoastrelid
-  LEFT JOIN pg_type typ ON rel.reloftype=typ.oid
+    {% if tid %}, (CASE WHEN rel.relkind = 'p' THEN pg_catalog.pg_get_partkeydef({{ tid }}::oid) ELSE '' END) AS partition_scheme {% endif %}
+FROM pg_catalog.pg_class rel
+  LEFT OUTER JOIN pg_catalog.pg_tablespace spc on spc.oid=rel.reltablespace
+  LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=rel.oid AND des.objsubid=0 AND des.classoid='pg_class'::regclass)
+  LEFT OUTER JOIN pg_catalog.pg_constraint con ON con.conrelid=rel.oid AND con.contype='p'
+  LEFT OUTER JOIN pg_catalog.pg_class tst ON tst.oid = rel.reltoastrelid
+  LEFT JOIN pg_catalog.pg_type typ ON rel.reloftype=typ.oid
 WHERE rel.relkind IN ('r','s','t','p') AND rel.relnamespace = {{ scid }}::oid
 AND NOT rel.relispartition
 {% if tid %}  AND rel.oid = {{ tid }}::oid {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.1_plus/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.1_plus/acl.sql
index e48e44d91..a79ee500c 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.1_plus/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.1_plus/acl.sql
@@ -1,6 +1,6 @@
 {### SQL to fetch privileges for tablespace ###}
 SELECT 'relacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor,
-    array_agg(privilege_type) as privileges, array_agg(is_grantable) as grantable
+    pg_catalog.array_agg(privilege_type) as privileges, pg_catalog.array_agg(is_grantable) as grantable
 FROM
   (SELECT
     d.grantee, d.grantor, d.is_grantable,
@@ -21,22 +21,22 @@ FROM
 	END AS privilege_type
   FROM
     (SELECT rel.relacl
-        FROM pg_class rel
-          LEFT OUTER JOIN pg_tablespace spc on spc.oid=rel.reltablespace
-          LEFT OUTER JOIN pg_constraint con ON con.conrelid=rel.oid AND con.contype='p'
-          LEFT OUTER JOIN pg_class tst ON tst.oid = rel.reltoastrelid
-          LEFT JOIN pg_type typ ON rel.reloftype=typ.oid
+        FROM pg_catalog.pg_class rel
+          LEFT OUTER JOIN pg_catalog.pg_tablespace spc on spc.oid=rel.reltablespace
+          LEFT OUTER JOIN pg_catalog.pg_constraint con ON con.conrelid=rel.oid AND con.contype='p'
+          LEFT OUTER JOIN pg_catalog.pg_class tst ON tst.oid = rel.reltoastrelid
+          LEFT JOIN pg_catalog.pg_type typ ON rel.reloftype=typ.oid
         WHERE rel.relkind IN ('r','s','t') AND rel.relnamespace = {{ scid }}::oid
             AND rel.oid = {{ tid }}::oid
     ) acl,
     (SELECT (d).grantee AS grantee, (d).grantor AS grantor, (d).is_grantable
         AS is_grantable, (d).privilege_type AS privilege_type FROM (SELECT
-        aclexplode(rel.relacl) as d
-        FROM pg_class rel
-          LEFT OUTER JOIN pg_tablespace spc on spc.oid=rel.reltablespace
-          LEFT OUTER JOIN pg_constraint con ON con.conrelid=rel.oid AND con.contype='p'
-          LEFT OUTER JOIN pg_class tst ON tst.oid = rel.reltoastrelid
-          LEFT JOIN pg_type typ ON rel.reloftype=typ.oid
+        pg_catalog.aclexplode(rel.relacl) as d
+        FROM pg_catalog.pg_class rel
+          LEFT OUTER JOIN pg_catalog.pg_tablespace spc on spc.oid=rel.reltablespace
+          LEFT OUTER JOIN pg_catalog.pg_constraint con ON con.conrelid=rel.oid AND con.contype='p'
+          LEFT OUTER JOIN pg_catalog.pg_class tst ON tst.oid = rel.reltoastrelid
+          LEFT JOIN pg_catalog.pg_type typ ON rel.reloftype=typ.oid
         WHERE rel.relkind IN ('r','s','t') AND rel.relnamespace = {{ scid }}::oid
             AND rel.oid = {{ tid }}::oid
         ) a ORDER BY privilege_type) d
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.1_plus/get_inherits.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.1_plus/get_inherits.sql
index 178861395..00ef9faaf 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.1_plus/get_inherits.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.1_plus/get_inherits.sql
@@ -1,11 +1,11 @@
 {% import 'tables/sql/macros/db_catalogs.macro' as CATALOG %}
 SELECT c.oid, c.relname , nspname,
 CASE WHEN nspname NOT LIKE 'pg\_%' THEN
- quote_ident(nspname)||'.'||quote_ident(c.relname)
-ELSE quote_ident(c.relname)
+ pg_catalog.quote_ident(nspname)||'.'||pg_catalog.quote_ident(c.relname)
+ELSE pg_catalog.quote_ident(c.relname)
 END AS inherits
-FROM pg_class c
-JOIN pg_namespace n
+FROM pg_catalog.pg_class c
+JOIN pg_catalog.pg_namespace n
 ON n.oid=c.relnamespace
 WHERE relkind='r'
 {% if not show_system_objects %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.1_plus/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.1_plus/nodes.sql
index 5a7da3296..54228fc4c 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.1_plus/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.1_plus/nodes.sql
@@ -1,9 +1,9 @@
 SELECT rel.oid, rel.relname AS name,
-    (SELECT count(*) FROM pg_trigger WHERE tgrelid=rel.oid AND tgisinternal = FALSE) AS triggercount,
-    (SELECT count(*) FROM pg_trigger WHERE tgrelid=rel.oid AND tgisinternal = FALSE AND tgenabled = 'O') AS has_enable_triggers,
-    (SELECT count(1) FROM pg_inherits WHERE inhrelid=rel.oid LIMIT 1) as is_inherits,
-    (SELECT count(1) FROM pg_inherits WHERE inhparent=rel.oid LIMIT 1) as is_inherited
-FROM pg_class rel
+    (SELECT count(*) FROM pg_catalog.pg_trigger WHERE tgrelid=rel.oid AND tgisinternal = FALSE) AS triggercount,
+    (SELECT count(*) FROM pg_catalog.pg_trigger WHERE tgrelid=rel.oid AND tgisinternal = FALSE AND tgenabled = 'O') AS has_enable_triggers,
+    (SELECT count(1) FROM pg_catalog.pg_inherits WHERE inhrelid=rel.oid LIMIT 1) as is_inherits,
+    (SELECT count(1) FROM pg_catalog.pg_inherits WHERE inhparent=rel.oid LIMIT 1) as is_inherited
+FROM pg_catalog.pg_class rel
     WHERE rel.relkind IN ('r','s','t') AND rel.relnamespace = {{ scid }}::oid
     {% if tid %} AND rel.oid = {{tid}}::OID {% endif %}
     ORDER BY rel.relname;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.1_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.1_plus/properties.sql
index ef3bcfd9a..2c5d559b7 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.1_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.1_plus/properties.sql
@@ -1,63 +1,63 @@
 SELECT rel.oid, rel.relname AS name, rel.reltablespace AS spcoid,rel.relacl AS relacl_str,
   (CASE WHEN length(spc.spcname::text) > 0 THEN spc.spcname ELSE
-    (SELECT sp.spcname FROM pg_database dtb
-    JOIN pg_tablespace sp ON dtb.dattablespace=sp.oid
+    (SELECT sp.spcname FROM pg_catalog.pg_database dtb
+    JOIN pg_catalog.pg_tablespace sp ON dtb.dattablespace=sp.oid
     WHERE dtb.oid = {{ did }}::oid)
   END) as spcname,
-  (select nspname FROM pg_namespace WHERE oid = {{scid}}::oid ) as schema,
-  pg_get_userbyid(rel.relowner) AS relowner, rel.relhasoids,
+  (select nspname FROM pg_catalog.pg_namespace WHERE oid = {{scid}}::oid ) as schema,
+  pg_catalog.pg_get_userbyid(rel.relowner) AS relowner, rel.relhasoids,
   rel.relhassubclass, rel.reltuples::bigint, des.description, con.conname, con.conkey,
-	EXISTS(select 1 FROM pg_trigger
-			JOIN pg_proc pt ON pt.oid=tgfoid AND pt.proname='logtrigger'
-			JOIN pg_proc pc ON pc.pronamespace=pt.pronamespace AND pc.proname='slonyversion'
+	EXISTS(select 1 FROM pg_catalog.pg_trigger
+			JOIN pg_catalog.pg_proc pt ON pt.oid=tgfoid AND pt.proname='logtrigger'
+			JOIN pg_catalog.pg_proc pc ON pc.pronamespace=pt.pronamespace AND pc.proname='slonyversion'
 			WHERE tgrelid=rel.oid) AS isrepl,
-	(SELECT count(*) FROM pg_trigger WHERE tgrelid=rel.oid AND tgisinternal = FALSE) AS triggercount,
+	(SELECT count(*) FROM pg_catalog.pg_trigger WHERE tgrelid=rel.oid AND tgisinternal = FALSE) AS triggercount,
 	(SELECT ARRAY(SELECT CASE WHEN (nspname NOT LIKE 'pg\_%') THEN
-            quote_ident(nspname)||'.'||quote_ident(c.relname)
-            ELSE quote_ident(c.relname) END AS inherited_tables
-    FROM pg_inherits i
-    JOIN pg_class c ON c.oid = i.inhparent
-    JOIN pg_namespace n ON n.oid=c.relnamespace
+            pg_catalog.quote_ident(nspname)||'.'||pg_catalog.quote_ident(c.relname)
+            ELSE pg_catalog.quote_ident(c.relname) END AS inherited_tables
+    FROM pg_catalog.pg_inherits i
+    JOIN pg_catalog.pg_class c ON c.oid = i.inhparent
+    JOIN pg_catalog.pg_namespace n ON n.oid=c.relnamespace
     WHERE i.inhrelid = rel.oid ORDER BY inhseqno)) AS coll_inherits,
   (SELECT count(*)
-		FROM pg_inherits i
-      JOIN pg_class c ON c.oid = i.inhparent
-      JOIN pg_namespace n ON n.oid=c.relnamespace
+		FROM pg_catalog.pg_inherits i
+      JOIN pg_catalog.pg_class c ON c.oid = i.inhparent
+      JOIN pg_catalog.pg_namespace n ON n.oid=c.relnamespace
 		WHERE i.inhrelid = rel.oid) AS inherited_tables_cnt,
 	(CASE WHEN rel.relpersistence = 'u' THEN true ELSE false END) AS relpersistence,
-	substring(array_to_string(rel.reloptions, ',') FROM 'fillfactor=([0-9]*)') AS fillfactor,
-	(substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS autovacuum_enabled,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS autovacuum_vacuum_threshold,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_vacuum_scale_factor,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS autovacuum_analyze_threshold,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_analyze_scale_factor,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS autovacuum_vacuum_cost_delay,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS autovacuum_vacuum_cost_limit,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS autovacuum_freeze_min_age,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS autovacuum_freeze_max_age,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS autovacuum_freeze_table_age,
-	(substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS toast_autovacuum_enabled,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS toast_autovacuum_vacuum_threshold,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_vacuum_scale_factor,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS toast_autovacuum_analyze_threshold,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_analyze_scale_factor,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS toast_autovacuum_vacuum_cost_delay,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS toast_autovacuum_vacuum_cost_limit,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS toast_autovacuum_freeze_min_age,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS toast_autovacuum_freeze_max_age,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS toast_autovacuum_freeze_table_age,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'fillfactor=([0-9]*)') AS fillfactor,
+	(substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS autovacuum_enabled,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS autovacuum_vacuum_threshold,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_vacuum_scale_factor,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS autovacuum_analyze_threshold,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_analyze_scale_factor,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS autovacuum_vacuum_cost_delay,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS autovacuum_vacuum_cost_limit,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS autovacuum_freeze_min_age,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS autovacuum_freeze_max_age,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS autovacuum_freeze_table_age,
+	(substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS toast_autovacuum_enabled,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS toast_autovacuum_vacuum_threshold,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_vacuum_scale_factor,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS toast_autovacuum_analyze_threshold,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_analyze_scale_factor,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS toast_autovacuum_vacuum_cost_delay,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS toast_autovacuum_vacuum_cost_limit,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS toast_autovacuum_freeze_min_age,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS toast_autovacuum_freeze_max_age,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS toast_autovacuum_freeze_table_age,
 	rel.reloptions AS reloptions, tst.reloptions AS toast_reloptions, rel.reloftype,
-	CASE WHEN typ.typname IS NOT NULL THEN (select quote_ident(nspname) FROM pg_namespace WHERE oid = {{scid}}::oid )||'.'||quote_ident(typ.typname) ELSE typ.typname END AS typname,
+	CASE WHEN typ.typname IS NOT NULL THEN (select pg_catalog.quote_ident(nspname) FROM pg_catalog.pg_namespace WHERE oid = {{scid}}::oid )||'.'||pg_catalog.quote_ident(typ.typname) ELSE typ.typname END AS typname,
 	typ.typrelid AS typoid,
 	(CASE WHEN rel.reltoastrelid = 0 THEN false ELSE true END) AS hastoasttable,
-	(SELECT array_agg(provider || '=' || label) FROM pg_seclabels sl1 WHERE sl1.objoid=rel.oid AND sl1.objsubid=0) AS seclabels,
+	(SELECT pg_catalog.array_agg(provider || '=' || label) FROM pg_catalog.pg_seclabels sl1 WHERE sl1.objoid=rel.oid AND sl1.objsubid=0) AS seclabels,
 	(CASE WHEN rel.oid <= {{ datlastsysoid}}::oid THEN true ElSE false END) AS is_sys_table
-FROM pg_class rel
-  LEFT OUTER JOIN pg_tablespace spc on spc.oid=rel.reltablespace
-  LEFT OUTER JOIN pg_description des ON (des.objoid=rel.oid AND des.objsubid=0 AND des.classoid='pg_class'::regclass)
-  LEFT OUTER JOIN pg_constraint con ON con.conrelid=rel.oid AND con.contype='p'
-  LEFT OUTER JOIN pg_class tst ON tst.oid = rel.reltoastrelid
-  LEFT JOIN pg_type typ ON rel.reloftype=typ.oid
+FROM pg_catalog.pg_class rel
+  LEFT OUTER JOIN pg_catalog.pg_tablespace spc on spc.oid=rel.reltablespace
+  LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=rel.oid AND des.objsubid=0 AND des.classoid='pg_class'::regclass)
+  LEFT OUTER JOIN pg_catalog.pg_constraint con ON con.conrelid=rel.oid AND con.contype='p'
+  LEFT OUTER JOIN pg_catalog.pg_class tst ON tst.oid = rel.reltoastrelid
+  LEFT JOIN pg_catalog.pg_type typ ON rel.reloftype=typ.oid
 WHERE rel.relkind IN ('r','s','t') AND rel.relnamespace = {{ scid }}::oid
 {% if tid %}  AND rel.oid = {{ tid }}::oid {% endif %}
 ORDER BY rel.relname;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.1_plus/stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.1_plus/stats.sql
index ea428ccf2..e643f1bcf 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.1_plus/stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.1_plus/stats.sql
@@ -21,17 +21,17 @@ SELECT
     last_autovacuum AS {{ conn|qtIdent(_('Last autovacuum')) }},
     last_analyze AS {{ conn|qtIdent(_('Last analyze')) }},
     last_autoanalyze AS {{ conn|qtIdent(_('Last autoanalyze')) }},
-    pg_stat_get_vacuum_count({{ tid }}::oid) AS {{ conn|qtIdent(_('Vacuum counter')) }},
-    pg_stat_get_autovacuum_count({{ tid }}::oid) AS {{ conn|qtIdent(_('Autovacuum counter')) }},
-    pg_stat_get_analyze_count({{ tid }}::oid) AS {{ conn|qtIdent(_('Analyze counter')) }},
-    pg_stat_get_autoanalyze_count({{ tid }}::oid) AS {{ conn|qtIdent(_('Autoanalyze counter')) }},
-    pg_relation_size(stat.relid) AS {{ conn|qtIdent(_('Table size')) }},
-    CASE WHEN cl.reltoastrelid = 0 THEN NULL ELSE pg_size_pretty(pg_relation_size(cl.reltoastrelid)
-        + COALESCE((SELECT SUM(pg_relation_size(indexrelid))
-                        FROM pg_index WHERE indrelid=cl.reltoastrelid)::int8, 0))
+    pg_catalog.pg_stat_get_vacuum_count({{ tid }}::oid) AS {{ conn|qtIdent(_('Vacuum counter')) }},
+    pg_catalog.pg_stat_get_autovacuum_count({{ tid }}::oid) AS {{ conn|qtIdent(_('Autovacuum counter')) }},
+    pg_catalog.pg_stat_get_analyze_count({{ tid }}::oid) AS {{ conn|qtIdent(_('Analyze counter')) }},
+    pg_catalog.pg_stat_get_autoanalyze_count({{ tid }}::oid) AS {{ conn|qtIdent(_('Autoanalyze counter')) }},
+    pg_catalog.pg_relation_size(stat.relid) AS {{ conn|qtIdent(_('Table size')) }},
+    CASE WHEN cl.reltoastrelid = 0 THEN NULL ELSE pg_catalog.pg_size_pretty(pg_relation_size(cl.reltoastrelid)
+        + COALESCE((SELECT SUM(pg_catalog.pg_relation_size(indexrelid))
+                        FROM pg_catalog.pg_index WHERE indrelid=cl.reltoastrelid)::int8, 0))
         END AS {{ conn|qtIdent(_('Toast table size')) }},
-    COALESCE((SELECT SUM(pg_relation_size(indexrelid))
-                                FROM pg_index WHERE indrelid=stat.relid)::int8, 0)
+    COALESCE((SELECT SUM(pg_catalog.pg_relation_size(indexrelid))
+                                FROM pg_catalog.pg_index WHERE indrelid=stat.relid)::int8, 0)
         AS {{ conn|qtIdent(_('Indexes size')) }}
 {% if is_pgstattuple %}
 {#== EXTENDED STATS ==#}
@@ -44,14 +44,14 @@ SELECT
     free_space AS {{ conn|qtIdent(_('Free space')) }},
     free_percent AS {{ conn|qtIdent(_('Free percent')) }}
 FROM
-    pgstattuple('{{schema_name}}.{{table_name}}'), pg_stat_all_tables stat
+    pgstattuple('{{schema_name}}.{{table_name}}'), pg_catalog.pg_stat_all_tables stat
 {% else %}
 FROM
-    pg_stat_all_tables stat
+    pg_catalog.pg_stat_all_tables stat
 {% endif %}
 JOIN
-    pg_statio_all_tables statio ON stat.relid = statio.relid
+    pg_catalog.pg_statio_all_tables statio ON stat.relid = statio.relid
 JOIN
-    pg_class cl ON cl.oid=stat.relid
+    pg_catalog.pg_class cl ON cl.oid=stat.relid
 WHERE
     stat.relid = {{ tid }}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.2_plus/stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.2_plus/stats.sql
index dc038aee2..a3117a158 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.2_plus/stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.2_plus/stats.sql
@@ -25,13 +25,13 @@ SELECT
     autovacuum_count AS {{ conn|qtIdent(_('Autovacuum counter')) }},
     analyze_count AS {{ conn|qtIdent(_('Analyze counter')) }},
     autoanalyze_count AS {{ conn|qtIdent(_('Autoanalyze counter')) }},
-    pg_relation_size(stat.relid) AS {{ conn|qtIdent(_('Table size')) }},
-    CASE WHEN cl.reltoastrelid = 0 THEN NULL ELSE pg_size_pretty(pg_relation_size(cl.reltoastrelid)
-        + COALESCE((SELECT SUM(pg_relation_size(indexrelid))
-                        FROM pg_index WHERE indrelid=cl.reltoastrelid)::int8, 0))
+    pg_catalog.pg_relation_size(stat.relid) AS {{ conn|qtIdent(_('Table size')) }},
+    CASE WHEN cl.reltoastrelid = 0 THEN NULL ELSE pg_catalog.pg_size_pretty(pg_catalog.pg_relation_size(cl.reltoastrelid)
+        + COALESCE((SELECT SUM(pg_catalog.pg_relation_size(indexrelid))
+                        FROM pg_catalog.pg_index WHERE indrelid=cl.reltoastrelid)::int8, 0))
         END AS {{ conn|qtIdent(_('Toast table size')) }},
-    COALESCE((SELECT SUM(pg_relation_size(indexrelid))
-                                FROM pg_index WHERE indrelid=stat.relid)::int8, 0)
+    COALESCE((SELECT SUM(pg_catalog.pg_relation_size(indexrelid))
+                                FROM pg_catalog.pg_index WHERE indrelid=stat.relid)::int8, 0)
         AS {{ conn|qtIdent(_('Indexes size')) }}
 {% if is_pgstattuple %}
 {#== EXTENDED STATS ==#}
@@ -44,14 +44,14 @@ SELECT
     free_space AS {{ conn|qtIdent(_('Free space')) }},
     free_percent AS {{ conn|qtIdent(_('Free percent')) }}
 FROM
-    pgstattuple('{{schema_name}}.{{table_name}}'), pg_stat_all_tables stat
+    pgstattuple('{{schema_name}}.{{table_name}}'), pg_catalog.pg_stat_all_tables stat
 {% else %}
 FROM
-    pg_stat_all_tables stat
+    pg_catalog.pg_stat_all_tables stat
 {% endif %}
 JOIN
-    pg_statio_all_tables statio ON stat.relid = statio.relid
+    pg_catalog.pg_statio_all_tables statio ON stat.relid = statio.relid
 JOIN
-    pg_class cl ON cl.oid=stat.relid
+    pg_catalog.pg_class cl ON cl.oid=stat.relid
 WHERE
     stat.relid = {{ tid }}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.6_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.6_plus/properties.sql
index e4ac4544c..dfcfebbbf 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.6_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/9.6_plus/properties.sql
@@ -1,64 +1,64 @@
 SELECT rel.oid, rel.relname AS name, rel.reltablespace AS spcoid,rel.relacl AS relacl_str,
   (CASE WHEN length(spc.spcname::text) > 0 THEN spc.spcname ELSE
-    (SELECT sp.spcname FROM pg_database dtb
-    JOIN pg_tablespace sp ON dtb.dattablespace=sp.oid
+    (SELECT sp.spcname FROM pg_catalog.pg_database dtb
+    JOIN pg_catalog.pg_tablespace sp ON dtb.dattablespace=sp.oid
     WHERE dtb.oid = {{ did }}::oid)
   END) as spcname,
-  (select nspname FROM pg_namespace WHERE oid = {{scid}}::oid ) as schema,
-  pg_get_userbyid(rel.relowner) AS relowner, rel.relhasoids,
+  (select nspname FROM pg_catalog.pg_namespace WHERE oid = {{scid}}::oid ) as schema,
+  pg_catalog.pg_get_userbyid(rel.relowner) AS relowner, rel.relhasoids,
   rel.relhassubclass, rel.reltuples::bigint, des.description, con.conname, con.conkey,
-	EXISTS(select 1 FROM pg_trigger
-			JOIN pg_proc pt ON pt.oid=tgfoid AND pt.proname='logtrigger'
-			JOIN pg_proc pc ON pc.pronamespace=pt.pronamespace AND pc.proname='slonyversion'
+	EXISTS(select 1 FROM pg_catalog.pg_trigger
+			JOIN pg_catalog.pg_proc pt ON pt.oid=tgfoid AND pt.proname='logtrigger'
+			JOIN pg_catalog.pg_proc pc ON pc.pronamespace=pt.pronamespace AND pc.proname='slonyversion'
 			WHERE tgrelid=rel.oid) AS isrepl,
-	(SELECT count(*) FROM pg_trigger WHERE tgrelid=rel.oid AND tgisinternal = FALSE) AS triggercount,
+	(SELECT count(*) FROM pg_catalog.pg_trigger WHERE tgrelid=rel.oid AND tgisinternal = FALSE) AS triggercount,
 	(SELECT ARRAY(SELECT CASE WHEN (nspname NOT LIKE 'pg\_%') THEN
-            quote_ident(nspname)||'.'||quote_ident(c.relname)
-            ELSE quote_ident(c.relname) END AS inherited_tables
-    FROM pg_inherits i
-    JOIN pg_class c ON c.oid = i.inhparent
-    JOIN pg_namespace n ON n.oid=c.relnamespace
+            pg_catalog.quote_ident(nspname)||'.'||pg_catalog.quote_ident(c.relname)
+            ELSE pg_catalog.quote_ident(c.relname) END AS inherited_tables
+    FROM pg_catalog.pg_inherits i
+    JOIN pg_catalog.pg_class c ON c.oid = i.inhparent
+    JOIN pg_catalog.pg_namespace n ON n.oid=c.relnamespace
     WHERE i.inhrelid = rel.oid ORDER BY inhseqno)) AS coll_inherits,
   (SELECT count(*)
-		FROM pg_inherits i
-      JOIN pg_class c ON c.oid = i.inhparent
-      JOIN pg_namespace n ON n.oid=c.relnamespace
+		FROM pg_catalog.pg_inherits i
+      JOIN pg_catalog.pg_class c ON c.oid = i.inhparent
+      JOIN pg_catalog.pg_namespace n ON n.oid=c.relnamespace
 		WHERE i.inhrelid = rel.oid) AS inherited_tables_cnt,
 	(CASE WHEN rel.relpersistence = 'u' THEN true ELSE false END) AS relpersistence,
-	substring(array_to_string(rel.reloptions, ',') FROM 'fillfactor=([0-9]*)') AS fillfactor,
-	substring(array_to_string(rel.reloptions, ',') FROM 'parallel_workers=([0-9]*)') AS parallel_workers,
-	(substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS autovacuum_enabled,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS autovacuum_vacuum_threshold,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_vacuum_scale_factor,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS autovacuum_analyze_threshold,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_analyze_scale_factor,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS autovacuum_vacuum_cost_delay,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS autovacuum_vacuum_cost_limit,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS autovacuum_freeze_min_age,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS autovacuum_freeze_max_age,
-	substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS autovacuum_freeze_table_age,
-	(substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS toast_autovacuum_enabled,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS toast_autovacuum_vacuum_threshold,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_vacuum_scale_factor,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS toast_autovacuum_analyze_threshold,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_analyze_scale_factor,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS toast_autovacuum_vacuum_cost_delay,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS toast_autovacuum_vacuum_cost_limit,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS toast_autovacuum_freeze_min_age,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS toast_autovacuum_freeze_max_age,
-	substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS toast_autovacuum_freeze_table_age,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'fillfactor=([0-9]*)') AS fillfactor,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'parallel_workers=([0-9]*)') AS parallel_workers,
+	(substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS autovacuum_enabled,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS autovacuum_vacuum_threshold,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_vacuum_scale_factor,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS autovacuum_analyze_threshold,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_analyze_scale_factor,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS autovacuum_vacuum_cost_delay,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS autovacuum_vacuum_cost_limit,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS autovacuum_freeze_min_age,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS autovacuum_freeze_max_age,
+	substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS autovacuum_freeze_table_age,
+	(substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS toast_autovacuum_enabled,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS toast_autovacuum_vacuum_threshold,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_vacuum_scale_factor,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS toast_autovacuum_analyze_threshold,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_analyze_scale_factor,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS toast_autovacuum_vacuum_cost_delay,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS toast_autovacuum_vacuum_cost_limit,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS toast_autovacuum_freeze_min_age,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS toast_autovacuum_freeze_max_age,
+	substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS toast_autovacuum_freeze_table_age,
 	rel.reloptions AS reloptions, tst.reloptions AS toast_reloptions, rel.reloftype,
-	CASE WHEN typ.typname IS NOT NULL THEN (select quote_ident(nspname) FROM pg_namespace WHERE oid = {{scid}}::oid )||'.'||quote_ident(typ.typname) ELSE typ.typname END AS typname,
+	CASE WHEN typ.typname IS NOT NULL THEN (select pg_catalog.quote_ident(nspname) FROM pg_catalog.pg_namespace WHERE oid = {{scid}}::oid )||'.'||pg_catalog.quote_ident(typ.typname) ELSE typ.typname END AS typname,
 	typ.typrelid AS typoid,rel.relrowsecurity as rlspolicy, rel.relforcerowsecurity as forcerlspolicy,
 	(CASE WHEN rel.reltoastrelid = 0 THEN false ELSE true END) AS hastoasttable,
-	(SELECT array_agg(provider || '=' || label) FROM pg_seclabels sl1 WHERE sl1.objoid=rel.oid AND sl1.objsubid=0) AS seclabels,
+	(SELECT array_agg(provider || '=' || label) FROM pg_catalog.pg_seclabels sl1 WHERE sl1.objoid=rel.oid AND sl1.objsubid=0) AS seclabels,
 	(CASE WHEN rel.oid <= {{ datlastsysoid}}::oid THEN true ElSE false END) AS is_sys_table
-FROM pg_class rel
-  LEFT OUTER JOIN pg_tablespace spc on spc.oid=rel.reltablespace
-  LEFT OUTER JOIN pg_description des ON (des.objoid=rel.oid AND des.objsubid=0 AND des.classoid='pg_class'::regclass)
-  LEFT OUTER JOIN pg_constraint con ON con.conrelid=rel.oid AND con.contype='p'
-  LEFT OUTER JOIN pg_class tst ON tst.oid = rel.reltoastrelid
-  LEFT JOIN pg_type typ ON rel.reloftype=typ.oid
+FROM pg_catalog.pg_class rel
+  LEFT OUTER JOIN pg_catalog.pg_tablespace spc on spc.oid=rel.reltablespace
+  LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=rel.oid AND des.objsubid=0 AND des.classoid='pg_class'::regclass)
+  LEFT OUTER JOIN pg_catalog.pg_constraint con ON con.conrelid=rel.oid AND con.contype='p'
+  LEFT OUTER JOIN pg_catalog.pg_class tst ON tst.oid = rel.reltoastrelid
+  LEFT JOIN pg_catalog.pg_type typ ON rel.reloftype=typ.oid
 WHERE rel.relkind IN ('r','s','t') AND rel.relnamespace = {{ scid }}::oid
 {% if tid %}  AND rel.oid = {{ tid }}::oid {% endif %}
 ORDER BY rel.relname;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/acl.sql
index eb3d6e7c5..8cb9d5728 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/acl.sql
@@ -1,5 +1,5 @@
 SELECT 'relacl' as deftype, COALESCE(privileges_information.grantee, 'PUBLIC') grantee, privileges_information.grantor,
-    array_agg(privilege_type) as privileges, array_agg(is_grantable) as grantable
+    pg_catalog.array_agg(privilege_type) as privileges, pg_catalog.array_agg(is_grantable) as grantable
 from (
   SELECT
       acls.grantee, acls.grantor, CASE WHEN acls.is_grantable = 'YES' THEN TRUE ELSE FALSE END as is_grantable,
@@ -20,10 +20,10 @@ from (
     END AS privilege_type
     FROM
       (SELECT rel.relacl, rel.relname
-          FROM pg_class rel
-            LEFT OUTER JOIN pg_tablespace spc on spc.oid=rel.reltablespace
-            LEFT OUTER JOIN pg_constraint con ON con.conrelid=rel.oid AND con.contype='p'
-            LEFT OUTER JOIN pg_class tst ON tst.oid = rel.reltoastrelid
+          FROM pg_catalog.pg_class rel
+            LEFT OUTER JOIN pg_catalog.pg_tablespace spc on spc.oid=rel.reltablespace
+            LEFT OUTER JOIN pg_catalog.pg_constraint con ON con.conrelid=rel.oid AND con.contype='p'
+            LEFT OUTER JOIN pg_catalog.pg_class tst ON tst.oid = rel.reltoastrelid
           WHERE rel.relkind IN ('r','s','t') AND rel.relnamespace = {{ scid }}::oid
                 AND rel.oid = {{ tid }}::OID
       ) rel
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/backend_support.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/backend_support.sql
index a86088101..19eff1a50 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/backend_support.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/backend_support.sql
@@ -1,18 +1,18 @@
 SELECT
  CASE WHEN nsp.nspname IN ('sys', 'dbo', 'information_schema') THEN true ELSE false END AS dbSupport
-FROM pg_namespace nsp
+FROM pg_catalog.pg_namespace nsp
 WHERE nsp.oid={{scid}}::oid
 AND (
 	(nspname = 'pg_catalog' AND EXISTS
-	                               (SELECT 1 FROM pg_class WHERE relname = 'pg_class' AND relnamespace = nsp.oid LIMIT 1))
+	                               (SELECT 1 FROM pg_catalog.pg_class WHERE relname = 'pg_class' AND relnamespace = nsp.oid LIMIT 1))
 	OR (nspname = 'pgagent' AND EXISTS
-	                               (SELECT 1 FROM pg_class WHERE relname = 'pga_job' AND relnamespace = nsp.oid LIMIT 1))
+	                               (SELECT 1 FROM pg_catalog.pg_class WHERE relname = 'pga_job' AND relnamespace = nsp.oid LIMIT 1))
 	OR (nspname = 'information_schema' AND EXISTS
-	                               (SELECT 1 FROM pg_class WHERE relname = 'tables' AND relnamespace = nsp.oid LIMIT 1))
+	                               (SELECT 1 FROM pg_catalog.pg_class WHERE relname = 'tables' AND relnamespace = nsp.oid LIMIT 1))
 	OR (nspname LIKE '_%' AND EXISTS
-	                               (SELECT 1 FROM pg_proc WHERE proname='slonyversion' AND pronamespace = nsp.oid LIMIT 1))
+	                               (SELECT 1 FROM pg_catalog.pg_proc WHERE proname='slonyversion' AND pronamespace = nsp.oid LIMIT 1))
 )
 AND
  nspname NOT LIKE E'pg\\temp\\%'
 AND
- nspname NOT LIKE E'pg\\toast_temp\\%'
\ No newline at end of file
+ nspname NOT LIKE E'pg\\toast_temp\\%'
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/coll_table_stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/coll_table_stats.sql
index 63a682625..4cd65f7cb 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/coll_table_stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/coll_table_stats.sql
@@ -14,16 +14,16 @@ SELECT
     autovacuum_count AS {{ conn|qtIdent(_('Autovacuum counter')) }},
     analyze_count AS {{ conn|qtIdent(_('Analyze counter')) }},
     autoanalyze_count AS {{ conn|qtIdent(_('Autoanalyze counter')) }},
-    pg_relation_size(st.relid)
-        + CASE WHEN cl.reltoastrelid = 0 THEN 0 ELSE pg_relation_size(cl.reltoastrelid)
-        + COALESCE((SELECT SUM(pg_relation_size(indexrelid))
-                        FROM pg_index WHERE indrelid=cl.reltoastrelid)::int8, 0) END
-        + COALESCE((SELECT SUM(pg_relation_size(indexrelid))
-                        FROM pg_index WHERE indrelid=st.relid)::int8, 0) AS {{ conn|qtIdent(_('Size')) }}
+    pg_catalog.pg_relation_size(st.relid)
+        + CASE WHEN cl.reltoastrelid = 0 THEN 0 ELSE pg_catalog.pg_relation_size(cl.reltoastrelid)
+        + COALESCE((SELECT SUM(pg_catalog.pg_relation_size(indexrelid))
+                        FROM pg_catalog.pg_index WHERE indrelid=cl.reltoastrelid)::int8, 0) END
+        + COALESCE((SELECT SUM(pg_catalog.pg_relation_size(indexrelid))
+                        FROM pg_catalog.pg_index WHERE indrelid=st.relid)::int8, 0) AS {{ conn|qtIdent(_('Size')) }}
 FROM
-    pg_stat_all_tables st
+    pg_catalog.pg_stat_all_tables st
 JOIN
-    pg_class cl on cl.oid=st.relid
+    pg_catalog.pg_class cl on cl.oid=st.relid
 WHERE
     schemaname = {{schema_name|qtLiteral}}
 ORDER BY st.relname;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/depend.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/depend.sql
index f5f39e7d0..0371561fc 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/depend.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/depend.sql
@@ -1,9 +1,9 @@
 SELECT
     ref.relname AS refname, d2.refclassid, dep.deptype AS deptype
-FROM pg_depend dep
-    LEFT JOIN pg_depend d2 ON dep.objid=d2.objid AND dep.refobjid != d2.refobjid
-    LEFT JOIN pg_class ref ON ref.oid=d2.refobjid
-    LEFT JOIN pg_attribute att ON d2.refclassid=att.attrelid AND d2.refobjsubid=att.attnum
+FROM pg_catalog.pg_depend dep
+    LEFT JOIN pg_catalog.pg_depend d2 ON dep.objid=d2.objid AND dep.refobjid != d2.refobjid
+    LEFT JOIN pg_catalog.pg_class ref ON ref.oid=d2.refobjid
+    LEFT JOIN pg_catalog.pg_attribute att ON d2.refclassid=att.attrelid AND d2.refobjsubid=att.attnum
     {{ where }} AND
-    dep.classid=(SELECT oid FROM pg_class WHERE relname='pg_attrdef') AND
-    dep.refobjid NOT IN (SELECT d3.refobjid FROM pg_depend d3 WHERE d3.objid=d2.refobjid)
\ No newline at end of file
+    dep.classid=(SELECT oid FROM pg_catalog.pg_class WHERE relname='pg_attrdef') AND
+    dep.refobjid NOT IN (SELECT d3.refobjid FROM pg_catalog.pg_depend d3 WHERE d3.objid=d2.refobjid)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/get_columns_for_table.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/get_columns_for_table.sql
index 3d6bbb7d2..8676c09c5 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/get_columns_for_table.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/get_columns_for_table.sql
@@ -1,16 +1,16 @@
 SELECT
-    a.attname AS name, format_type(a.atttypid, NULL) AS cltype,
-    quote_ident(n.nspname)||'.'||quote_ident(c.relname) as inheritedfrom,
+    a.attname AS name, pg_catalog.format_type(a.atttypid, NULL) AS cltype,
+    pg_catalog.quote_ident(n.nspname)||'.'||pg_catalog.quote_ident(c.relname) as inheritedfrom,
     c.oid as inheritedid
 FROM
-    pg_class c
+    pg_catalog.pg_class c
 JOIN
-    pg_namespace n ON c.relnamespace=n.oid
+    pg_catalog.pg_namespace n ON c.relnamespace=n.oid
 JOIN
-    pg_attribute a ON a.attrelid = c.oid AND NOT a.attisdropped AND a.attnum > 0
+    pg_catalog.pg_attribute a ON a.attrelid = c.oid AND NOT a.attisdropped AND a.attnum > 0
 WHERE
 {% if tid %}
     c.oid = {{tid}}::OID
 {% else %}
     c.relname = {{tname|qtLiteral}}
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/get_inherits.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/get_inherits.sql
index 943994be6..664406340 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/get_inherits.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/get_inherits.sql
@@ -1,11 +1,11 @@
 {% import 'tables/sql/macros/db_catalogs.macro' as CATALOG %}
 SELECT c.oid, c.relname , nspname,
 CASE WHEN nspname NOT LIKE 'pg\_%' THEN
- quote_ident(nspname)||'.'||quote_ident(c.relname)
-ELSE quote_ident(c.relname)
+ pg_catalog.quote_ident(nspname)||'.'||pg_catalog.quote_ident(c.relname)
+ELSE pg_catalog.quote_ident(c.relname)
 END AS inherits
-FROM pg_class c
-JOIN pg_namespace n
+FROM pg_catalog.pg_class c
+JOIN pg_catalog.pg_namespace n
 ON n.oid=c.relnamespace
 WHERE relkind='r'
 {% if not show_system_objects %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/get_oftype.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/get_oftype.sql
index 1cca0f663..a1e05cda4 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/get_oftype.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/get_oftype.sql
@@ -1,7 +1,7 @@
 {% import 'tables/sql/macros/db_catalogs.macro' as CATALOG %}
 SELECT c.oid,
-  quote_ident(n.nspname)||'.'||quote_ident(c.relname) AS typname
-  FROM pg_namespace n, pg_class c
+  pg_catalog.quote_ident(n.nspname)||'.'||pg_catalog.quote_ident(c.relname) AS typname
+  FROM pg_catalog.pg_namespace n, pg_catalog.pg_class c
 WHERE c.relkind = 'c' AND c.relnamespace=n.oid
 {% if not show_system_objects %}
 {{ CATALOG.VALID_CATALOGS(server_type) }}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/get_oid.sql
index e9dc7729c..2477a5f00 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/get_oid.sql
@@ -1,5 +1,5 @@
 SELECT rel.oid as tid
-FROM pg_class rel
+FROM pg_catalog.pg_class rel
 WHERE rel.relkind IN ('r','s','t')
 AND rel.relnamespace = {{ scid }}::oid
-AND rel.relname = {{data.name|qtLiteral}}
\ No newline at end of file
+AND rel.relname = {{data.name|qtLiteral}}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/get_relations.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/get_relations.sql
index ceb1e7a4f..d730176a1 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/get_relations.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/get_relations.sql
@@ -1,6 +1,6 @@
 {% import 'tables/sql/macros/db_catalogs.macro' as CATALOG %}
-SELECT c.oid, quote_ident(n.nspname)||'.'||quote_ident(c.relname) AS like_relation
-FROM pg_class c, pg_namespace n
+SELECT c.oid, pg_catalog.quote_ident(n.nspname)||'.'||pg_catalog.quote_ident(c.relname) AS like_relation
+FROM pg_catalog.pg_class c, pg_catalog.pg_namespace n
 WHERE c.relnamespace=n.oid
     AND c.relkind IN ('r', 'v', 'f')
 {% if not show_sys_objects %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/get_schema.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/get_schema.sql
index 3c5187dcf..be20542b7 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/get_schema.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/get_schema.sql
@@ -1 +1 @@
-SELECT nsp.nspname FROM pg_namespace nsp WHERE nsp.oid = {{ scid|qtLiteral }};
+SELECT nsp.nspname FROM pg_catalog.pg_namespace nsp WHERE nsp.oid = {{ scid|qtLiteral }};
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/get_schema_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/get_schema_oid.sql
index 8df84b578..ea6aee3ab 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/get_schema_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/get_schema_oid.sql
@@ -2,8 +2,8 @@
 SELECT
     c.relnamespace as scid, nsp.nspname as nspname
 FROM
-    pg_class c
-LEFT JOIN pg_namespace nsp ON nsp.oid = c.relnamespace
+    pg_catalog.pg_class c
+LEFT JOIN pg_catalog.pg_namespace nsp ON nsp.oid = c.relnamespace
 WHERE
 {% if tid %}
     c.oid = {{tid}}::oid;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/get_table.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/get_table.sql
index fdb10fb88..4b91526f4 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/get_table.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/get_table.sql
@@ -1,8 +1,8 @@
 SELECT
     rel.relname AS name
 FROM
-    pg_class rel
+    pg_catalog.pg_class rel
 WHERE
     rel.relkind IN ('r','s','t')
     AND rel.relnamespace = {{ scid }}::oid
-    AND rel.oid = {{ tid }}::oid;
\ No newline at end of file
+    AND rel.oid = {{ tid }}::oid;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/get_tables_for_constraints.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/get_tables_for_constraints.sql
index f053fa077..fa56197e8 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/get_tables_for_constraints.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/get_tables_for_constraints.sql
@@ -1,5 +1,5 @@
 SELECT cl.oid as value, quote_ident(nspname)||'.'||quote_ident(relname) AS label
-FROM pg_namespace nsp, pg_class cl
+FROM pg_catalog.pg_namespace nsp, pg_class cl
 WHERE relnamespace=nsp.oid AND relkind='r'
    AND nsp.nspname NOT LIKE E'pg\_temp\_%'
    {% if not show_sysobj %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/get_types_where_condition.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/get_types_where_condition.sql
index fadfc9918..aa6aca84c 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/get_types_where_condition.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/get_types_where_condition.sql
@@ -1,10 +1,10 @@
 {### Additional where condition for get_types route for column node ###}
 typisdefined AND typtype IN ('b', 'c', 'd', 'e', 'r')
-AND NOT EXISTS (SELECT 1 FROM pg_class WHERE relnamespace=typnamespace
+AND NOT EXISTS (SELECT 1 FROM pg_catalog.pg_class WHERE relnamespace=typnamespace
 AND relname = typname AND relkind != 'c') AND
-(typname NOT LIKE '_%' OR NOT EXISTS (SELECT 1 FROM pg_class WHERE
+(typname NOT LIKE '_%' OR NOT EXISTS (SELECT 1 FROM pg_catalog.pg_class WHERE
 relnamespace=typnamespace AND relname = substring(typname FROM 2)::name
 AND relkind != 'c'))
 {% if not show_system_objects %}
 AND nsp.nspname != 'information_schema'
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/nodes.sql
index 95705c97f..6c20a8fa5 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/nodes.sql
@@ -1,9 +1,9 @@
 SELECT rel.oid, rel.relname AS name,
-    (SELECT count(*) FROM pg_trigger WHERE tgrelid=rel.oid) AS triggercount,
-    (SELECT count(*) FROM pg_trigger WHERE tgrelid=rel.oid AND tgenabled = 'O') AS has_enable_triggers,
-    (SELECT count(1) FROM pg_inherits WHERE inhrelid=rel.oid LIMIT 1) as is_inherits,
-    (SELECT count(1) FROM pg_inherits WHERE inhparent=rel.oid LIMIT 1) as is_inherited
-FROM pg_class rel
+    (SELECT count(*) FROM pg_catalog.pg_trigger WHERE tgrelid=rel.oid) AS triggercount,
+    (SELECT count(*) FROM pg_catalog.pg_trigger WHERE tgrelid=rel.oid AND tgenabled = 'O') AS has_enable_triggers,
+    (SELECT count(1) FROM pg_catalog.pg_inherits WHERE inhrelid=rel.oid LIMIT 1) as is_inherits,
+    (SELECT count(1) FROM pg_catalog.pg_inherits WHERE inhparent=rel.oid LIMIT 1) as is_inherited
+FROM pg_catalog.pg_class rel
     WHERE rel.relkind IN ('r','s','t') AND rel.relnamespace = {{ scid }}::oid
     {% if tid %} AND rel.oid = {{tid}}::OID {% endif %}
     ORDER BY rel.relname;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/properties.sql
index f7f35870f..25c4e84c9 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/properties.sql
@@ -3,63 +3,63 @@ SELECT *,
 FROM (
 	SELECT rel.oid, rel.relname AS name, rel.reltablespace AS spcoid,rel.relacl AS relacl_str,
 		(CASE WHEN length(spc.spcname::text) > 0 THEN spc.spcname ELSE
-			(SELECT sp.spcname FROM pg_database dtb
-			JOIN pg_tablespace sp ON dtb.dattablespace=sp.oid
+			(SELECT sp.spcname FROM pg_catalog.pg_database dtb
+			JOIN pg_catalog.pg_tablespace sp ON dtb.dattablespace=sp.oid
 			WHERE dtb.oid = {{ did }}::oid)
 		END) as spcname,
-		(select nspname FROM pg_namespace WHERE oid = {{scid}}::oid ) as schema,
-		pg_get_userbyid(rel.relowner) AS relowner, rel.relhasoids,
+		(select nspname FROM pg_catalog.pg_namespace WHERE oid = {{scid}}::oid ) as schema,
+		pg_catalog.pg_get_userbyid(rel.relowner) AS relowner, rel.relhasoids,
 		rel.relhassubclass, rel.reltuples::bigint, des.description, con.conname, con.conkey,
-		EXISTS(select 1 FROM pg_trigger
-				JOIN pg_proc pt ON pt.oid=tgfoid AND pt.proname='logtrigger'
-				JOIN pg_proc pc ON pc.pronamespace=pt.pronamespace AND pc.proname='slonyversion'
+		EXISTS(select 1 FROM pg_catalog.pg_trigger
+				JOIN pg_catalog.pg_proc pt ON pt.oid=tgfoid AND pt.proname='logtrigger'
+				JOIN pg_catalog.pg_proc pc ON pc.pronamespace=pt.pronamespace AND pc.proname='slonyversion'
 				WHERE tgrelid=rel.oid) AS isrepl,
-		(SELECT count(*) FROM pg_trigger WHERE tgrelid=rel.oid) AS triggercount,
+		(SELECT count(*) FROM pg_catalog.pg_trigger WHERE tgrelid=rel.oid) AS triggercount,
 		(SELECT ARRAY(SELECT CASE WHEN (nspname NOT LIKE 'pg\_%') THEN
-							quote_ident(nspname)||'.'||quote_ident(c.relname)
-							ELSE quote_ident(c.relname) END AS inherited_tables
-			FROM pg_inherits i
-			JOIN pg_class c ON c.oid = i.inhparent
-			JOIN pg_namespace n ON n.oid=c.relnamespace
+							pg_catalog.quote_ident(nspname)||'.'||pg_catalog.quote_ident(c.relname)
+							ELSE pg_catalog.quote_ident(c.relname) END AS inherited_tables
+			FROM pg_catalog.pg_inherits i
+			JOIN pg_catalog.pg_class c ON c.oid = i.inhparent
+			JOIN pg_catalog.pg_namespace n ON n.oid=c.relnamespace
 			WHERE i.inhrelid = rel.oid ORDER BY inhseqno)) AS pre_coll_inherits,
 		(SELECT count(*)
-			FROM pg_inherits i
-				JOIN pg_class c ON c.oid = i.inhparent
-				JOIN pg_namespace n ON n.oid=c.relnamespace
+			FROM pg_catalog.pg_inherits i
+				JOIN pg_catalog.pg_class c ON c.oid = i.inhparent
+				JOIN pg_catalog.pg_namespace n ON n.oid=c.relnamespace
 			WHERE i.inhrelid = rel.oid) AS inherited_tables_cnt,
 		false AS relpersistence,
-		substring(array_to_string(rel.reloptions, ',') FROM 'fillfactor=([0-9]*)') AS fillfactor,
-		(substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS autovacuum_enabled,
-		substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS autovacuum_vacuum_threshold,
-		substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_vacuum_scale_factor,
-		substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS autovacuum_analyze_threshold,
-		substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_analyze_scale_factor,
-		substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS autovacuum_vacuum_cost_delay,
-		substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS autovacuum_vacuum_cost_limit,
-		substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS autovacuum_freeze_min_age,
-		substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS autovacuum_freeze_max_age,
-		substring(array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS autovacuum_freeze_table_age,
-		(substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS toast_autovacuum_enabled,
-		substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS toast_autovacuum_vacuum_threshold,
-		substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_vacuum_scale_factor,
-		substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS toast_autovacuum_analyze_threshold,
-		substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_analyze_scale_factor,
-		substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS toast_autovacuum_vacuum_cost_delay,
-		substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS toast_autovacuum_vacuum_cost_limit,
-		substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS toast_autovacuum_freeze_min_age,
-		substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS toast_autovacuum_freeze_max_age,
-		substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS toast_autovacuum_freeze_table_age,
+		substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'fillfactor=([0-9]*)') AS fillfactor,
+		(substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS autovacuum_enabled,
+		substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS autovacuum_vacuum_threshold,
+		substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_vacuum_scale_factor,
+		substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS autovacuum_analyze_threshold,
+		substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_analyze_scale_factor,
+		substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS autovacuum_vacuum_cost_delay,
+		substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS autovacuum_vacuum_cost_limit,
+		substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS autovacuum_freeze_min_age,
+		substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS autovacuum_freeze_max_age,
+		substring(pg_catalog.array_to_string(rel.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS autovacuum_freeze_table_age,
+		(substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS toast_autovacuum_enabled,
+		substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS toast_autovacuum_vacuum_threshold,
+		substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_vacuum_scale_factor,
+		substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_threshold=([0-9]*)') AS toast_autovacuum_analyze_threshold,
+		substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_analyze_scale_factor,
+		substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS toast_autovacuum_vacuum_cost_delay,
+		substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS toast_autovacuum_vacuum_cost_limit,
+		substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_min_age=([0-9]*)') AS toast_autovacuum_freeze_min_age,
+		substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_max_age=([0-9]*)') AS toast_autovacuum_freeze_max_age,
+		substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_freeze_table_age=([0-9]*)') AS toast_autovacuum_freeze_table_age,
 		rel.reloptions AS reloptions, tst.reloptions AS toast_reloptions, NULL AS reloftype, NULL AS typname,
 		typ.typrelid AS typoid, rel.relrowsecurity as rlspolicy, rel.relforcerowsecurity as forcerlspolicy,
 		(CASE WHEN rel.reltoastrelid = 0 THEN false ELSE true END) AS hastoasttable,
 		ARRAY[]::varchar[] AS seclabels,
 		(CASE WHEN rel.oid <= {{ datlastsysoid}}::oid THEN true ElSE false END) AS is_sys_table
 
-	FROM pg_class rel
-		LEFT OUTER JOIN pg_tablespace spc on spc.oid=rel.reltablespace
-		LEFT OUTER JOIN pg_description des ON (des.objoid=rel.oid AND des.objsubid=0 AND des.classoid='pg_class'::regclass)
-		LEFT OUTER JOIN pg_constraint con ON con.conrelid=rel.oid AND con.contype='p'
-		LEFT OUTER JOIN pg_class tst ON tst.oid = rel.reltoastrelid
+	FROM pg_catalog.pg_class rel
+		LEFT OUTER JOIN pg_catalog.pg_tablespace spc on spc.oid=rel.reltablespace
+		LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=rel.oid AND des.objsubid=0 AND des.classoid='pg_class'::regclass)
+		LEFT OUTER JOIN pg_catalog.pg_constraint con ON con.conrelid=rel.oid AND con.contype='p'
+		LEFT OUTER JOIN pg_catalog.pg_class tst ON tst.oid = rel.reltoastrelid
 
 	 WHERE rel.relkind IN ('r','s','t') AND rel.relnamespace = {{ scid }}
 	{% if tid %}  AND rel.oid = {{ tid }}::oid {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/reset_stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/reset_stats.sql
index 36eca0d20..4c71d9fdb 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/reset_stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/reset_stats.sql
@@ -1 +1 @@
-SELECT pg_stat_reset_single_table_counters({{tid}})
\ No newline at end of file
+SELECT pg_catalog.pg_stat_reset_single_table_counters({{tid}})
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/stats.sql
index 59c52a352..e2b77c383 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/tables/sql/default/stats.sql
@@ -21,13 +21,13 @@ SELECT
     last_autovacuum AS {{ conn|qtIdent(_('Last autovacuum')) }},
     last_analyze AS {{ conn|qtIdent(_('Last analyze')) }},
     last_autoanalyze AS {{ conn|qtIdent(_('Last autoanalyze')) }},
-    pg_relation_size(stat.relid) AS {{ conn|qtIdent(_('Table size')) }},
-    CASE WHEN cl.reltoastrelid = 0 THEN NULL ELSE pg_size_pretty(pg_relation_size(cl.reltoastrelid)
-        + COALESCE((SELECT SUM(pg_relation_size(indexrelid))
-                        FROM pg_index WHERE indrelid=cl.reltoastrelid)::int8, 0))
+    pg_catalog.pg_relation_size(stat.relid) AS {{ conn|qtIdent(_('Table size')) }},
+    CASE WHEN cl.reltoastrelid = 0 THEN NULL ELSE pg_catalog.pg_size_pretty(pg_catalog.pg_relation_size(cl.reltoastrelid)
+        + COALESCE((SELECT SUM(pg_catalog.pg_relation_size(indexrelid))
+                        FROM pg_catalog.pg_index WHERE indrelid=cl.reltoastrelid)::int8, 0))
         END AS {{ conn|qtIdent(_('Toast table size')) }},
-    COALESCE((SELECT SUM(pg_relation_size(indexrelid))
-                                FROM pg_index WHERE indrelid=stat.relid)::int8, 0)
+    COALESCE((SELECT SUM(pg_catalog.pg_relation_size(indexrelid))
+                                FROM pg_catalog.pg_index WHERE indrelid=stat.relid)::int8, 0)
         AS {{ conn|qtIdent(_('Indexes size')) }}
 {% if is_pgstattuple %}
 {#== EXTENDED STATS ==#}
@@ -40,14 +40,14 @@ SELECT
     free_space AS {{ conn|qtIdent(_('Free space')) }},
     free_percent AS {{ conn|qtIdent(_('Free percent')) }}
 FROM
-    pgstattuple('{{schema_name}}.{{table_name}}'), pg_stat_all_tables stat
+    pgstattuple('{{schema_name}}.{{table_name}}'), pg_catalog.pg_stat_all_tables stat
 {% else %}
 FROM
-    pg_stat_all_tables stat
+    pg_catalog.pg_stat_all_tables stat
 {% endif %}
 JOIN
-    pg_statio_all_tables statio ON stat.relid = statio.relid
+    pg_catalog.pg_statio_all_tables statio ON stat.relid = statio.relid
 JOIN
-    pg_class cl ON cl.oid=stat.relid
+    pg_catalog.pg_class cl ON cl.oid=stat.relid
 WHERE
     stat.relid = {{ tid }}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/pg/10_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/pg/10_plus/properties.sql
index f17df7dfa..a15802d84 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/pg/10_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/pg/10_plus/properties.sql
@@ -1,21 +1,21 @@
 SELECT t.oid,t.tgname AS name, t.xmin, t.tgenabled AS is_enable_trigger, t.*, relname, CASE WHEN relkind = 'r' THEN TRUE ELSE FALSE END AS parentistable,
     nspname, des.description, l.lanname, p.prosrc, p.proname AS tfunction,
-    COALESCE(substring(pg_get_triggerdef(t.oid, true), 'WHEN (.*) EXECUTE (PROCEDURE|FUNCTION)'),
-    substring(pg_get_triggerdef(t.oid, true), 'WHEN (.*)  \$trigger')) AS whenclause,
+    COALESCE(substring(pg_catalog.pg_get_triggerdef(t.oid, true), 'WHEN (.*) EXECUTE (PROCEDURE|FUNCTION)'),
+    substring(pg_catalog.pg_get_triggerdef(t.oid, true), 'WHEN (.*)  \$trigger')) AS whenclause,
     -- We need to convert tgargs column bytea datatype to array datatype
-    (string_to_array(encode(tgargs, 'escape'), E'\\000')::text[])[1:tgnargs] AS custom_tgargs,
+    (pg_catalog.string_to_array(encode(tgargs, 'escape'), E'\\000')::text[])[1:tgnargs] AS custom_tgargs,
 {% if datlastsysoid %}
     (CASE WHEN t.oid <= {{ datlastsysoid}}::oid THEN true ElSE false END) AS is_sys_trigger,
 {% endif %}
     (CASE WHEN tgconstraint != 0::OID THEN true ElSE false END) AS is_constraint_trigger,
     tgoldtable,
     tgnewtable
-FROM pg_trigger t
-    JOIN pg_class cl ON cl.oid=tgrelid
-    JOIN pg_namespace na ON na.oid=relnamespace
-    LEFT OUTER JOIN pg_description des ON (des.objoid=t.oid AND des.classoid='pg_trigger'::regclass)
-    LEFT OUTER JOIN pg_proc p ON p.oid=t.tgfoid
-    LEFT OUTER JOIN pg_language l ON l.oid=p.prolang
+FROM pg_catalog.pg_trigger t
+    JOIN pg_catalog.pg_class cl ON cl.oid=tgrelid
+    JOIN pg_catalog.pg_namespace na ON na.oid=relnamespace
+    LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=t.oid AND des.classoid='pg_trigger'::regclass)
+    LEFT OUTER JOIN pg_catalog.pg_proc p ON p.oid=t.tgfoid
+    LEFT OUTER JOIN pg_catalog.pg_language l ON l.oid=p.prolang
 WHERE NOT tgisinternal
     AND tgrelid = {{tid}}::OID
 {% if trid %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/pg/9.1_plus/get_function_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/pg/9.1_plus/get_function_oid.sql
index cf9e79339..8a7ae1755 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/pg/9.1_plus/get_function_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/pg/9.1_plus/get_function_oid.sql
@@ -1,9 +1,9 @@
 SELECT p.oid AS tfuncoid, p.proname AS tfunction,
     p.pronamespace AS tfuncschoid, n.nspname AS tfuncschema, l.lanname
-FROM pg_trigger t
-    LEFT OUTER JOIN pg_proc p ON p.oid=t.tgfoid
-	LEFT OUTER JOIN pg_namespace n ON n.oid = p.pronamespace
-	LEFT OUTER JOIN pg_language l ON l.oid=p.prolang
+FROM pg_catalog.pg_trigger t
+    LEFT OUTER JOIN pg_catalog.pg_proc p ON p.oid=t.tgfoid
+	LEFT OUTER JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace
+	LEFT OUTER JOIN pg_catalog.pg_language l ON l.oid=p.prolang
 WHERE NOT tgisinternal
     AND tgrelid = {{tid}}::OID
     AND t.oid = {{trid}}::OID
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/pg/9.1_plus/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/pg/9.1_plus/get_oid.sql
index cf30257bb..fcaddc964 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/pg/9.1_plus/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/pg/9.1_plus/get_oid.sql
@@ -1,5 +1,5 @@
 SELECT t.oid
-FROM pg_trigger t
+FROM pg_catalog.pg_trigger t
     WHERE NOT tgisinternal
     AND tgrelid = {{tid}}::OID
-    AND tgname = {{data.name|qtLiteral}};
\ No newline at end of file
+    AND tgname = {{data.name|qtLiteral}};
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/pg/9.1_plus/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/pg/9.1_plus/nodes.sql
index ef06054e0..908411995 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/pg/9.1_plus/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/pg/9.1_plus/nodes.sql
@@ -1,5 +1,5 @@
 SELECT t.oid, t.tgname as name, t.tgenabled AS is_enable_trigger
-FROM pg_trigger t
+FROM pg_catalog.pg_trigger t
     WHERE NOT tgisinternal
     AND tgrelid = {{tid}}::OID
 {% if trid %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/pg/9.1_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/pg/9.1_plus/properties.sql
index a73669e63..bc1fd50a4 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/pg/9.1_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/pg/9.1_plus/properties.sql
@@ -1,19 +1,19 @@
 SELECT t.oid,t.tgname AS name, t.xmin, t.tgenabled AS is_enable_trigger, t.*, relname, CASE WHEN relkind = 'r' THEN TRUE ELSE FALSE END AS parentistable,
     nspname, des.description, l.lanname, p.prosrc, p.proname AS tfunction,
-    COALESCE(substring(pg_get_triggerdef(t.oid, true), 'WHEN (.*) EXECUTE PROCEDURE'),
-    substring(pg_get_triggerdef(t.oid, true), 'WHEN (.*)  \$trigger')) AS whenclause,
+    COALESCE(substring(pg_catalog.pg_get_triggerdef(t.oid, true), 'WHEN (.*) EXECUTE PROCEDURE'),
+    substring(pg_catalog.pg_get_triggerdef(t.oid, true), 'WHEN (.*)  \$trigger')) AS whenclause,
     -- We need to convert tgargs column bytea datatype to array datatype
-    (string_to_array(encode(tgargs, 'escape'), E'\\000')::text[])[1:tgnargs] AS custom_tgargs,
+    (pg_catalog.string_to_array(encode(tgargs, 'escape'), E'\\000')::text[])[1:tgnargs] AS custom_tgargs,
 {% if datlastsysoid %}
     (CASE WHEN t.oid <= {{ datlastsysoid}}::oid THEN true ElSE false END) AS is_sys_trigger,
 {% endif %}
     (CASE WHEN tgconstraint != 0::OID THEN true ElSE false END) AS is_constraint_trigger
-FROM pg_trigger t
-    JOIN pg_class cl ON cl.oid=tgrelid
-    JOIN pg_namespace na ON na.oid=relnamespace
-    LEFT OUTER JOIN pg_description des ON (des.objoid=t.oid AND des.classoid='pg_trigger'::regclass)
-    LEFT OUTER JOIN pg_proc p ON p.oid=t.tgfoid
-    LEFT OUTER JOIN pg_language l ON l.oid=p.prolang
+FROM pg_catalog.pg_trigger t
+    JOIN pg_catalog.pg_class cl ON cl.oid=tgrelid
+    JOIN pg_catalog.pg_namespace na ON na.oid=relnamespace
+    LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=t.oid AND des.classoid='pg_trigger'::regclass)
+    LEFT OUTER JOIN pg_catalog.pg_proc p ON p.oid=t.tgfoid
+    LEFT OUTER JOIN pg_catalog.pg_language l ON l.oid=p.prolang
 WHERE NOT tgisinternal
     AND tgrelid = {{tid}}::OID
 {% if trid %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/pg/default/backend_support.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/pg/default/backend_support.sql
index bb5e8d803..4b9b6b9af 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/pg/default/backend_support.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/pg/default/backend_support.sql
@@ -3,7 +3,7 @@
 SELECT
     CASE WHEN c.relkind = 'm' THEN False ELSE True END As m_view
 FROM
-    pg_class c
+    pg_catalog.pg_class c
 WHERE
     c.oid = {{ vid }}::oid
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/pg/default/get_columns.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/pg/default/get_columns.sql
index c74c68b6a..d9c734114 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/pg/default/get_columns.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/pg/default/get_columns.sql
@@ -1,6 +1,6 @@
 SELECT att.attname as name
-FROM pg_attribute att
+FROM pg_catalog.pg_attribute att
     WHERE att.attrelid = {{tid}}::oid
     AND att.attnum IN ({{ clist }})
     AND att.attisdropped IS FALSE
-    ORDER BY att.attnum
\ No newline at end of file
+    ORDER BY att.attnum
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/pg/default/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/pg/default/get_oid.sql
index ff2638590..ff66a7f27 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/pg/default/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/pg/default/get_oid.sql
@@ -1,4 +1,4 @@
 SELECT t.oid
-FROM pg_trigger t
+FROM pg_catalog.pg_trigger t
     WHERE tgrelid = {{tid}}::OID
-    AND tgname = {{data.name|qtLiteral}};
\ No newline at end of file
+    AND tgname = {{data.name|qtLiteral}};
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/pg/default/get_parent.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/pg/default/get_parent.sql
index f595cdc81..0c46d743c 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/pg/default/get_parent.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/pg/default/get_parent.sql
@@ -1,5 +1,5 @@
 SELECT nsp.nspname AS schema ,rel.relname AS table
-FROM pg_class rel
-    JOIN pg_namespace nsp
+FROM pg_catalog.pg_class rel
+    JOIN pg_catalog.pg_namespace nsp
     ON rel.relnamespace = nsp.oid::oid
-    WHERE rel.oid = {{tid}}::oid
\ No newline at end of file
+    WHERE rel.oid = {{tid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/pg/default/get_triggerfunctions.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/pg/default/get_triggerfunctions.sql
index 403d5d91e..81bab0748 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/pg/default/get_triggerfunctions.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/pg/default/get_triggerfunctions.sql
@@ -1,5 +1,5 @@
-SELECT quote_ident(nspname) || '.' || quote_ident(proname) AS tfunctions
-FROM pg_proc p, pg_namespace n, pg_language l
+SELECT pg_catalog.quote_ident(nspname) || '.' || pg_catalog.quote_ident(proname) AS tfunctions
+FROM pg_catalog.pg_proc p, pg_catalog.pg_namespace n, pg_catalog.pg_language l
     WHERE p.pronamespace = n.oid
     AND p.prolang = l.oid
     -- PGOID_TYPE_TRIGGER = 2279
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/pg/default/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/pg/default/nodes.sql
index 03610acb6..7bfa00834 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/pg/default/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/pg/default/nodes.sql
@@ -1,5 +1,5 @@
 SELECT t.oid, t.tgname as name, t.tgenabled AS is_enable_trigger
-FROM pg_trigger t
+FROM pg_catalog.pg_trigger t
     WHERE tgrelid = {{tid}}::OID
 {% if trid %}
     AND t.oid = {{trid}}::OID
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/10_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/10_plus/properties.sql
index f17df7dfa..a15802d84 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/10_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/10_plus/properties.sql
@@ -1,21 +1,21 @@
 SELECT t.oid,t.tgname AS name, t.xmin, t.tgenabled AS is_enable_trigger, t.*, relname, CASE WHEN relkind = 'r' THEN TRUE ELSE FALSE END AS parentistable,
     nspname, des.description, l.lanname, p.prosrc, p.proname AS tfunction,
-    COALESCE(substring(pg_get_triggerdef(t.oid, true), 'WHEN (.*) EXECUTE (PROCEDURE|FUNCTION)'),
-    substring(pg_get_triggerdef(t.oid, true), 'WHEN (.*)  \$trigger')) AS whenclause,
+    COALESCE(substring(pg_catalog.pg_get_triggerdef(t.oid, true), 'WHEN (.*) EXECUTE (PROCEDURE|FUNCTION)'),
+    substring(pg_catalog.pg_get_triggerdef(t.oid, true), 'WHEN (.*)  \$trigger')) AS whenclause,
     -- We need to convert tgargs column bytea datatype to array datatype
-    (string_to_array(encode(tgargs, 'escape'), E'\\000')::text[])[1:tgnargs] AS custom_tgargs,
+    (pg_catalog.string_to_array(encode(tgargs, 'escape'), E'\\000')::text[])[1:tgnargs] AS custom_tgargs,
 {% if datlastsysoid %}
     (CASE WHEN t.oid <= {{ datlastsysoid}}::oid THEN true ElSE false END) AS is_sys_trigger,
 {% endif %}
     (CASE WHEN tgconstraint != 0::OID THEN true ElSE false END) AS is_constraint_trigger,
     tgoldtable,
     tgnewtable
-FROM pg_trigger t
-    JOIN pg_class cl ON cl.oid=tgrelid
-    JOIN pg_namespace na ON na.oid=relnamespace
-    LEFT OUTER JOIN pg_description des ON (des.objoid=t.oid AND des.classoid='pg_trigger'::regclass)
-    LEFT OUTER JOIN pg_proc p ON p.oid=t.tgfoid
-    LEFT OUTER JOIN pg_language l ON l.oid=p.prolang
+FROM pg_catalog.pg_trigger t
+    JOIN pg_catalog.pg_class cl ON cl.oid=tgrelid
+    JOIN pg_catalog.pg_namespace na ON na.oid=relnamespace
+    LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=t.oid AND des.classoid='pg_trigger'::regclass)
+    LEFT OUTER JOIN pg_catalog.pg_proc p ON p.oid=t.tgfoid
+    LEFT OUTER JOIN pg_catalog.pg_language l ON l.oid=p.prolang
 WHERE NOT tgisinternal
     AND tgrelid = {{tid}}::OID
 {% if trid %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/12_plus/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/12_plus/nodes.sql
index b37909214..0db41c70d 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/12_plus/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/12_plus/nodes.sql
@@ -1,5 +1,5 @@
 SELECT t.oid, t.tgname as name, t.tgenabled AS is_enable_trigger
-FROM pg_trigger t
+FROM pg_catalog.pg_trigger t
     WHERE NOT tgisinternal
     AND tgrelid = {{tid}}::OID
     AND tgpackageoid = 0
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/12_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/12_plus/properties.sql
index ab56cd260..6ba35dc53 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/12_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/12_plus/properties.sql
@@ -1,21 +1,21 @@
 SELECT t.oid,t.tgname AS name, t.xmin, t.tgenabled AS is_enable_trigger, t.*, relname, CASE WHEN relkind = 'r' THEN TRUE ELSE FALSE END AS parentistable,
     nspname, des.description, l.lanname, p.prosrc, p.proname AS tfunction,
-    COALESCE(substring(pg_get_triggerdef(t.oid, true), 'WHEN (.*) EXECUTE (PROCEDURE|FUNCTION)'),
-    substring(pg_get_triggerdef(t.oid, true), 'WHEN (.*)  \$trigger')) AS whenclause,
+    COALESCE(substring(pg_catalog.pg_get_triggerdef(t.oid, true), 'WHEN (.*) EXECUTE (PROCEDURE|FUNCTION)'),
+    substring(pg_catalog.pg_get_triggerdef(t.oid, true), 'WHEN (.*)  \$trigger')) AS whenclause,
     -- We need to convert tgargs column bytea datatype to array datatype
-    (string_to_array(encode(tgargs, 'escape'), E'\\000')::text[])[1:tgnargs] AS custom_tgargs,
+    (pg_catalog.string_to_array(encode(tgargs, 'escape'), E'\\000')::text[])[1:tgnargs] AS custom_tgargs,
 {% if datlastsysoid %}
     (CASE WHEN t.oid <= {{ datlastsysoid}}::oid THEN true ElSE false END) AS is_sys_trigger,
 {% endif %}
     (CASE WHEN tgconstraint != 0::OID THEN true ElSE false END) AS is_constraint_trigger,
     tgoldtable,
     tgnewtable
-FROM pg_trigger t
-    JOIN pg_class cl ON cl.oid=tgrelid
-    JOIN pg_namespace na ON na.oid=relnamespace
-    LEFT OUTER JOIN pg_description des ON (des.objoid=t.oid AND des.classoid='pg_trigger'::regclass)
-    LEFT OUTER JOIN pg_proc p ON p.oid=t.tgfoid
-    LEFT OUTER JOIN pg_language l ON l.oid=p.prolang
+FROM pg_catalog.pg_trigger t
+    JOIN pg_catalog.pg_class cl ON cl.oid=tgrelid
+    JOIN pg_catalog.pg_namespace na ON na.oid=relnamespace
+    LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=t.oid AND des.classoid='pg_trigger'::regclass)
+    LEFT OUTER JOIN pg_catalog.pg_proc p ON p.oid=t.tgfoid
+    LEFT OUTER JOIN pg_catalog.pg_language l ON l.oid=p.prolang
 WHERE NOT tgisinternal
     AND tgrelid = {{tid}}::OID
     AND tgpackageoid = 0
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/9.1_plus/get_function_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/9.1_plus/get_function_oid.sql
index cf9e79339..8a7ae1755 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/9.1_plus/get_function_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/9.1_plus/get_function_oid.sql
@@ -1,9 +1,9 @@
 SELECT p.oid AS tfuncoid, p.proname AS tfunction,
     p.pronamespace AS tfuncschoid, n.nspname AS tfuncschema, l.lanname
-FROM pg_trigger t
-    LEFT OUTER JOIN pg_proc p ON p.oid=t.tgfoid
-	LEFT OUTER JOIN pg_namespace n ON n.oid = p.pronamespace
-	LEFT OUTER JOIN pg_language l ON l.oid=p.prolang
+FROM pg_catalog.pg_trigger t
+    LEFT OUTER JOIN pg_catalog.pg_proc p ON p.oid=t.tgfoid
+	LEFT OUTER JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace
+	LEFT OUTER JOIN pg_catalog.pg_language l ON l.oid=p.prolang
 WHERE NOT tgisinternal
     AND tgrelid = {{tid}}::OID
     AND t.oid = {{trid}}::OID
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/9.1_plus/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/9.1_plus/get_oid.sql
index cf30257bb..fcaddc964 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/9.1_plus/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/9.1_plus/get_oid.sql
@@ -1,5 +1,5 @@
 SELECT t.oid
-FROM pg_trigger t
+FROM pg_catalog.pg_trigger t
     WHERE NOT tgisinternal
     AND tgrelid = {{tid}}::OID
-    AND tgname = {{data.name|qtLiteral}};
\ No newline at end of file
+    AND tgname = {{data.name|qtLiteral}};
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/9.1_plus/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/9.1_plus/nodes.sql
index ef06054e0..908411995 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/9.1_plus/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/9.1_plus/nodes.sql
@@ -1,5 +1,5 @@
 SELECT t.oid, t.tgname as name, t.tgenabled AS is_enable_trigger
-FROM pg_trigger t
+FROM pg_catalog.pg_trigger t
     WHERE NOT tgisinternal
     AND tgrelid = {{tid}}::OID
 {% if trid %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/9.1_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/9.1_plus/properties.sql
index a73669e63..bc1fd50a4 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/9.1_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/9.1_plus/properties.sql
@@ -1,19 +1,19 @@
 SELECT t.oid,t.tgname AS name, t.xmin, t.tgenabled AS is_enable_trigger, t.*, relname, CASE WHEN relkind = 'r' THEN TRUE ELSE FALSE END AS parentistable,
     nspname, des.description, l.lanname, p.prosrc, p.proname AS tfunction,
-    COALESCE(substring(pg_get_triggerdef(t.oid, true), 'WHEN (.*) EXECUTE PROCEDURE'),
-    substring(pg_get_triggerdef(t.oid, true), 'WHEN (.*)  \$trigger')) AS whenclause,
+    COALESCE(substring(pg_catalog.pg_get_triggerdef(t.oid, true), 'WHEN (.*) EXECUTE PROCEDURE'),
+    substring(pg_catalog.pg_get_triggerdef(t.oid, true), 'WHEN (.*)  \$trigger')) AS whenclause,
     -- We need to convert tgargs column bytea datatype to array datatype
-    (string_to_array(encode(tgargs, 'escape'), E'\\000')::text[])[1:tgnargs] AS custom_tgargs,
+    (pg_catalog.string_to_array(encode(tgargs, 'escape'), E'\\000')::text[])[1:tgnargs] AS custom_tgargs,
 {% if datlastsysoid %}
     (CASE WHEN t.oid <= {{ datlastsysoid}}::oid THEN true ElSE false END) AS is_sys_trigger,
 {% endif %}
     (CASE WHEN tgconstraint != 0::OID THEN true ElSE false END) AS is_constraint_trigger
-FROM pg_trigger t
-    JOIN pg_class cl ON cl.oid=tgrelid
-    JOIN pg_namespace na ON na.oid=relnamespace
-    LEFT OUTER JOIN pg_description des ON (des.objoid=t.oid AND des.classoid='pg_trigger'::regclass)
-    LEFT OUTER JOIN pg_proc p ON p.oid=t.tgfoid
-    LEFT OUTER JOIN pg_language l ON l.oid=p.prolang
+FROM pg_catalog.pg_trigger t
+    JOIN pg_catalog.pg_class cl ON cl.oid=tgrelid
+    JOIN pg_catalog.pg_namespace na ON na.oid=relnamespace
+    LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=t.oid AND des.classoid='pg_trigger'::regclass)
+    LEFT OUTER JOIN pg_catalog.pg_proc p ON p.oid=t.tgfoid
+    LEFT OUTER JOIN pg_catalog.pg_language l ON l.oid=p.prolang
 WHERE NOT tgisinternal
     AND tgrelid = {{tid}}::OID
 {% if trid %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/default/backend_support.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/default/backend_support.sql
index bb5e8d803..4b9b6b9af 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/default/backend_support.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/default/backend_support.sql
@@ -3,7 +3,7 @@
 SELECT
     CASE WHEN c.relkind = 'm' THEN False ELSE True END As m_view
 FROM
-    pg_class c
+    pg_catalog.pg_class c
 WHERE
     c.oid = {{ vid }}::oid
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/default/get_columns.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/default/get_columns.sql
index c74c68b6a..d9c734114 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/default/get_columns.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/default/get_columns.sql
@@ -1,6 +1,6 @@
 SELECT att.attname as name
-FROM pg_attribute att
+FROM pg_catalog.pg_attribute att
     WHERE att.attrelid = {{tid}}::oid
     AND att.attnum IN ({{ clist }})
     AND att.attisdropped IS FALSE
-    ORDER BY att.attnum
\ No newline at end of file
+    ORDER BY att.attnum
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/default/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/default/get_oid.sql
index ff2638590..ff66a7f27 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/default/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/default/get_oid.sql
@@ -1,4 +1,4 @@
 SELECT t.oid
-FROM pg_trigger t
+FROM pg_catalog.pg_trigger t
     WHERE tgrelid = {{tid}}::OID
-    AND tgname = {{data.name|qtLiteral}};
\ No newline at end of file
+    AND tgname = {{data.name|qtLiteral}};
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/default/get_parent.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/default/get_parent.sql
index f595cdc81..0c46d743c 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/default/get_parent.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/default/get_parent.sql
@@ -1,5 +1,5 @@
 SELECT nsp.nspname AS schema ,rel.relname AS table
-FROM pg_class rel
-    JOIN pg_namespace nsp
+FROM pg_catalog.pg_class rel
+    JOIN pg_catalog.pg_namespace nsp
     ON rel.relnamespace = nsp.oid::oid
-    WHERE rel.oid = {{tid}}::oid
\ No newline at end of file
+    WHERE rel.oid = {{tid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/default/get_triggerfunctions.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/default/get_triggerfunctions.sql
index 403d5d91e..81bab0748 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/default/get_triggerfunctions.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/default/get_triggerfunctions.sql
@@ -1,5 +1,5 @@
-SELECT quote_ident(nspname) || '.' || quote_ident(proname) AS tfunctions
-FROM pg_proc p, pg_namespace n, pg_language l
+SELECT pg_catalog.quote_ident(nspname) || '.' || pg_catalog.quote_ident(proname) AS tfunctions
+FROM pg_catalog.pg_proc p, pg_catalog.pg_namespace n, pg_catalog.pg_language l
     WHERE p.pronamespace = n.oid
     AND p.prolang = l.oid
     -- PGOID_TYPE_TRIGGER = 2279
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/default/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/default/nodes.sql
index 03610acb6..7bfa00834 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/default/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/triggers/sql/ppas/default/nodes.sql
@@ -1,5 +1,5 @@
 SELECT t.oid, t.tgname as name, t.tgenabled AS is_enable_trigger
-FROM pg_trigger t
+FROM pg_catalog.pg_trigger t
     WHERE tgrelid = {{tid}}::OID
 {% if trid %}
     AND t.oid = {{trid}}::OID
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/pg/9.1_plus/sql/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/pg/9.1_plus/sql/acl.sql
index e1e64be64..04b20a271 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/pg/9.1_plus/sql/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/pg/9.1_plus/sql/acl.sql
@@ -1,8 +1,8 @@
 {# Fetch privileges for schema #}
 SELECT
     'nspacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') AS grantee,
-    g.rolname AS grantor, array_agg(b.privilege_type) AS privileges,
-    array_agg(b.is_grantable) AS grantable
+    g.rolname AS grantor, pg_catalog.array_agg(b.privilege_type) AS privileges,
+    pg_catalog.array_agg(b.is_grantable) AS grantable
 FROM
     (SELECT
         (d).grantee AS grantee, (d).grantor AS grantor,
@@ -13,8 +13,8 @@ FROM
         ELSE 'UNKNOWN - ' || (d).privilege_type
         END AS privilege_type
     FROM
-        (SELECT aclexplode(nsp.nspacl) as d
-        FROM pg_namespace nsp
+        (SELECT pg_catalog.aclexplode(nsp.nspacl) as d
+        FROM pg_catalog.pg_namespace nsp
         WHERE nsp.oid = {{ scid|qtLiteral }}::OID
         ) a
     ) b
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/pg/9.1_plus/sql/get_name.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/pg/9.1_plus/sql/get_name.sql
index 3c5187dcf..be20542b7 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/pg/9.1_plus/sql/get_name.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/pg/9.1_plus/sql/get_name.sql
@@ -1 +1 @@
-SELECT nsp.nspname FROM pg_namespace nsp WHERE nsp.oid = {{ scid|qtLiteral }};
+SELECT nsp.nspname FROM pg_catalog.pg_namespace nsp WHERE nsp.oid = {{ scid|qtLiteral }};
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/pg/9.1_plus/sql/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/pg/9.1_plus/sql/nodes.sql
index 78bef8468..5de3ee5b4 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/pg/9.1_plus/sql/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/pg/9.1_plus/sql/nodes.sql
@@ -2,10 +2,10 @@
 SELECT
     nsp.oid,
 {{ CATALOGS.LABELS('nsp', _) }},
-    has_schema_privilege(nsp.oid, 'CREATE') as can_create,
-    has_schema_privilege(nsp.oid, 'USAGE') as has_usage
+    pg_catalog.has_schema_privilege(nsp.oid, 'CREATE') as can_create,
+    pg_catalog.has_schema_privilege(nsp.oid, 'USAGE') as has_usage
 FROM
-    pg_namespace nsp
+    pg_catalog.pg_namespace nsp
 WHERE
     {% if scid %}
     nsp.oid={{scid}}::oid AND
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/pg/9.1_plus/sql/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/pg/9.1_plus/sql/properties.sql
index 3b4ca1fce..759233d21 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/pg/9.1_plus/sql/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/pg/9.1_plus/sql/properties.sql
@@ -3,17 +3,17 @@ SELECT
     2 AS nsptyp,
     nsp.nspname AS name,
     nsp.oid,
-    array_to_string(nsp.nspacl::text[], ', ') as acl,
+    pg_catalog.array_to_string(nsp.nspacl::text[], ', ') as acl,
     r.rolname AS namespaceowner, description,
     has_schema_privilege(nsp.oid, 'CREATE') AS can_create,
-    (SELECT array_to_string(defaclacl::text[], ', ') FROM pg_default_acl WHERE defaclobjtype = 'r' AND defaclnamespace = nsp.oid) AS tblacl,
-    (SELECT array_to_string(defaclacl::text[], ', ') FROM pg_default_acl WHERE defaclobjtype = 'S' AND defaclnamespace = nsp.oid) AS seqacl,
-    (SELECT array_to_string(defaclacl::text[], ', ') FROM pg_default_acl WHERE defaclobjtype = 'f' AND defaclnamespace = nsp.oid) AS funcacl
+    (SELECT pg_catalog.array_to_string(defaclacl::text[], ', ') FROM pg_catalog.pg_default_acl WHERE defaclobjtype = 'r' AND defaclnamespace = nsp.oid) AS tblacl,
+    (SELECT pg_catalog.array_to_string(defaclacl::text[], ', ') FROM pg_catalog.pg_default_acl WHERE defaclobjtype = 'S' AND defaclnamespace = nsp.oid) AS seqacl,
+    (SELECT pg_catalog.array_to_string(defaclacl::text[], ', ') FROM pg_catalog.pg_default_acl WHERE defaclobjtype = 'f' AND defaclnamespace = nsp.oid) AS funcacl
 FROM
-    pg_namespace nsp
-    LEFT OUTER JOIN pg_description des ON
+    pg_catalog.pg_namespace nsp
+    LEFT OUTER JOIN pg_catalog.pg_description des ON
         (des.objoid=nsp.oid AND des.classoid='pg_namespace'::regclass)
-    LEFT JOIN pg_roles r ON (r.oid = nsp.nspowner)
+    LEFT JOIN pg_catalog.pg_roles r ON (r.oid = nsp.nspowner)
 WHERE
     {% if scid %}
     nsp.oid={{scid}}::oid AND
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/pg/9.2_plus/sql/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/pg/9.2_plus/sql/acl.sql
index e1e64be64..04b20a271 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/pg/9.2_plus/sql/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/pg/9.2_plus/sql/acl.sql
@@ -1,8 +1,8 @@
 {# Fetch privileges for schema #}
 SELECT
     'nspacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') AS grantee,
-    g.rolname AS grantor, array_agg(b.privilege_type) AS privileges,
-    array_agg(b.is_grantable) AS grantable
+    g.rolname AS grantor, pg_catalog.array_agg(b.privilege_type) AS privileges,
+    pg_catalog.array_agg(b.is_grantable) AS grantable
 FROM
     (SELECT
         (d).grantee AS grantee, (d).grantor AS grantor,
@@ -13,8 +13,8 @@ FROM
         ELSE 'UNKNOWN - ' || (d).privilege_type
         END AS privilege_type
     FROM
-        (SELECT aclexplode(nsp.nspacl) as d
-        FROM pg_namespace nsp
+        (SELECT pg_catalog.aclexplode(nsp.nspacl) as d
+        FROM pg_catalog.pg_namespace nsp
         WHERE nsp.oid = {{ scid|qtLiteral }}::OID
         ) a
     ) b
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/pg/9.2_plus/sql/get_name.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/pg/9.2_plus/sql/get_name.sql
index 3c5187dcf..be20542b7 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/pg/9.2_plus/sql/get_name.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/pg/9.2_plus/sql/get_name.sql
@@ -1 +1 @@
-SELECT nsp.nspname FROM pg_namespace nsp WHERE nsp.oid = {{ scid|qtLiteral }};
+SELECT nsp.nspname FROM pg_catalog.pg_namespace nsp WHERE nsp.oid = {{ scid|qtLiteral }};
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/pg/9.2_plus/sql/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/pg/9.2_plus/sql/nodes.sql
index 78bef8468..5de3ee5b4 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/pg/9.2_plus/sql/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/pg/9.2_plus/sql/nodes.sql
@@ -2,10 +2,10 @@
 SELECT
     nsp.oid,
 {{ CATALOGS.LABELS('nsp', _) }},
-    has_schema_privilege(nsp.oid, 'CREATE') as can_create,
-    has_schema_privilege(nsp.oid, 'USAGE') as has_usage
+    pg_catalog.has_schema_privilege(nsp.oid, 'CREATE') as can_create,
+    pg_catalog.has_schema_privilege(nsp.oid, 'USAGE') as has_usage
 FROM
-    pg_namespace nsp
+    pg_catalog.pg_namespace nsp
 WHERE
     {% if scid %}
     nsp.oid={{scid}}::oid AND
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/pg/9.2_plus/sql/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/pg/9.2_plus/sql/properties.sql
index 7a88e8b83..897e76254 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/pg/9.2_plus/sql/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/pg/9.2_plus/sql/properties.sql
@@ -3,18 +3,18 @@ SELECT
     2 AS nsptyp,
     nsp.nspname AS name,
     nsp.oid,
-    array_to_string(nsp.nspacl::text[], ', ') as acl,
+    pg_catalog.array_to_string(nsp.nspacl::text[], ', ') as acl,
     r.rolname AS namespaceowner, description,
-    has_schema_privilege(nsp.oid, 'CREATE') AS can_create,
-    (SELECT array_to_string(defaclacl::text[], ', ') FROM pg_default_acl WHERE defaclobjtype = 'r' AND defaclnamespace = nsp.oid) AS tblacl,
-    (SELECT array_to_string(defaclacl::text[], ', ') FROM pg_default_acl WHERE defaclobjtype = 'S' AND defaclnamespace = nsp.oid) AS seqacl,
-    (SELECT array_to_string(defaclacl::text[], ', ') FROM pg_default_acl WHERE defaclobjtype = 'f' AND defaclnamespace = nsp.oid) AS funcacl,
-    (SELECT array_to_string(defaclacl::text[], ', ') FROM pg_default_acl WHERE defaclobjtype = 'T' AND defaclnamespace = nsp.oid) AS typeacl
+    pg_catalog.has_schema_privilege(nsp.oid, 'CREATE') AS can_create,
+    (SELECT pg_catalog.array_to_string(defaclacl::text[], ', ') FROM pg_catalog.pg_default_acl WHERE defaclobjtype = 'r' AND defaclnamespace = nsp.oid) AS tblacl,
+    (SELECT pg_catalog.array_to_string(defaclacl::text[], ', ') FROM pg_catalog.pg_default_acl WHERE defaclobjtype = 'S' AND defaclnamespace = nsp.oid) AS seqacl,
+    (SELECT pg_catalog.array_to_string(defaclacl::text[], ', ') FROM pg_catalog.pg_default_acl WHERE defaclobjtype = 'f' AND defaclnamespace = nsp.oid) AS funcacl,
+    (SELECT pg_catalog.array_to_string(defaclacl::text[], ', ') FROM pg_catalog.pg_default_acl WHERE defaclobjtype = 'T' AND defaclnamespace = nsp.oid) AS typeacl
 FROM
-    pg_namespace nsp
-    LEFT OUTER JOIN pg_description des ON
+    pg_catalog.pg_namespace nsp
+    LEFT OUTER JOIN pg_catalog.pg_description des ON
         (des.objoid=nsp.oid AND des.classoid='pg_namespace'::regclass)
-    LEFT JOIN pg_roles r ON (r.oid = nsp.nspowner)
+    LEFT JOIN pg_catalog.pg_roles r ON (r.oid = nsp.nspowner)
 WHERE
     {% if scid %}
     nsp.oid={{scid}}::oid AND
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/9.1_plus/sql/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/9.1_plus/sql/acl.sql
index e1e64be64..04b20a271 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/9.1_plus/sql/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/9.1_plus/sql/acl.sql
@@ -1,8 +1,8 @@
 {# Fetch privileges for schema #}
 SELECT
     'nspacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') AS grantee,
-    g.rolname AS grantor, array_agg(b.privilege_type) AS privileges,
-    array_agg(b.is_grantable) AS grantable
+    g.rolname AS grantor, pg_catalog.array_agg(b.privilege_type) AS privileges,
+    pg_catalog.array_agg(b.is_grantable) AS grantable
 FROM
     (SELECT
         (d).grantee AS grantee, (d).grantor AS grantor,
@@ -13,8 +13,8 @@ FROM
         ELSE 'UNKNOWN - ' || (d).privilege_type
         END AS privilege_type
     FROM
-        (SELECT aclexplode(nsp.nspacl) as d
-        FROM pg_namespace nsp
+        (SELECT pg_catalog.aclexplode(nsp.nspacl) as d
+        FROM pg_catalog.pg_namespace nsp
         WHERE nsp.oid = {{ scid|qtLiteral }}::OID
         ) a
     ) b
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/9.1_plus/sql/get_name.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/9.1_plus/sql/get_name.sql
index 3c5187dcf..be20542b7 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/9.1_plus/sql/get_name.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/9.1_plus/sql/get_name.sql
@@ -1 +1 @@
-SELECT nsp.nspname FROM pg_namespace nsp WHERE nsp.oid = {{ scid|qtLiteral }};
+SELECT nsp.nspname FROM pg_catalog.pg_namespace nsp WHERE nsp.oid = {{ scid|qtLiteral }};
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/9.1_plus/sql/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/9.1_plus/sql/nodes.sql
index 786eca381..89c74ed3e 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/9.1_plus/sql/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/9.1_plus/sql/nodes.sql
@@ -2,10 +2,10 @@
 SELECT
     nsp.oid,
 {{ CATALOGS.LABELS('nsp', _) }},
-    has_schema_privilege(nsp.oid, 'CREATE') as can_create,
-    has_schema_privilege(nsp.oid, 'USAGE') as has_usage
+    pg_catalog.has_schema_privilege(nsp.oid, 'CREATE') as can_create,
+    pg_catalog.has_schema_privilege(nsp.oid, 'USAGE') as has_usage
 FROM
-    pg_namespace nsp
+    pg_catalog.pg_namespace nsp
 WHERE
     {% if scid %}
     nsp.oid={{scid}}::oid AND
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/9.1_plus/sql/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/9.1_plus/sql/properties.sql
index 65bf873fd..fcea8f0fa 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/9.1_plus/sql/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/9.1_plus/sql/properties.sql
@@ -3,18 +3,18 @@ SELECT
     2 AS nsptyp,
     nsp.nspname AS name,
     nsp.oid,
-    array_to_string(nsp.nspacl::text[], ', ') as acl,
+    pg_catalog.array_to_string(nsp.nspacl::text[], ', ') as acl,
     r.rolname AS namespaceowner, description,
-    has_schema_privilege(nsp.oid, 'CREATE') AS can_create,
-    (SELECT array_to_string(defaclacl::text[], ', ') FROM pg_default_acl WHERE defaclobjtype = 'r' AND defaclnamespace = nsp.oid) AS tblacl,
-    (SELECT array_to_string(defaclacl::text[], ', ') FROM pg_default_acl WHERE defaclobjtype = 'S' AND defaclnamespace = nsp.oid) AS seqacl,
-    (SELECT array_to_string(defaclacl::text[], ', ') FROM pg_default_acl WHERE defaclobjtype = 'f' AND defaclnamespace = nsp.oid) AS funcacl,
-    (SELECT array_agg(provider || '=' || label) FROM pg_seclabels sl1 WHERE sl1.objoid=nsp.oid) AS seclabels
+    pg_catalog.has_schema_privilege(nsp.oid, 'CREATE') AS can_create,
+    (SELECT pg_catalog.array_to_string(defaclacl::text[], ', ') FROM pg_catalog.pg_default_acl WHERE defaclobjtype = 'r' AND defaclnamespace = nsp.oid) AS tblacl,
+    (SELECT pg_catalog.array_to_string(defaclacl::text[], ', ') FROM pg_catalog.pg_default_acl WHERE defaclobjtype = 'S' AND defaclnamespace = nsp.oid) AS seqacl,
+    (SELECT pg_catalog.array_to_string(defaclacl::text[], ', ') FROM pg_catalog.pg_default_acl WHERE defaclobjtype = 'f' AND defaclnamespace = nsp.oid) AS funcacl,
+    (SELECT pg_catalog.array_agg(provider || '=' || label) FROM pg_catalog.pg_seclabels sl1 WHERE sl1.objoid=nsp.oid) AS seclabels
 FROM
     pg_namespace nsp
-    LEFT OUTER JOIN pg_description des ON
+    LEFT OUTER JOIN pg_catalog.pg_description des ON
         (des.objoid=nsp.oid AND des.classoid='pg_namespace'::regclass)
-    LEFT JOIN pg_roles r ON (r.oid = nsp.nspowner)
+    LEFT JOIN pg_catalog.pg_roles r ON (r.oid = nsp.nspowner)
 WHERE
     {% if scid %}
     nsp.oid={{scid}}::oid AND
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/9.2_plus/sql/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/9.2_plus/sql/acl.sql
index e1e64be64..04b20a271 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/9.2_plus/sql/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/9.2_plus/sql/acl.sql
@@ -1,8 +1,8 @@
 {# Fetch privileges for schema #}
 SELECT
     'nspacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') AS grantee,
-    g.rolname AS grantor, array_agg(b.privilege_type) AS privileges,
-    array_agg(b.is_grantable) AS grantable
+    g.rolname AS grantor, pg_catalog.array_agg(b.privilege_type) AS privileges,
+    pg_catalog.array_agg(b.is_grantable) AS grantable
 FROM
     (SELECT
         (d).grantee AS grantee, (d).grantor AS grantor,
@@ -13,8 +13,8 @@ FROM
         ELSE 'UNKNOWN - ' || (d).privilege_type
         END AS privilege_type
     FROM
-        (SELECT aclexplode(nsp.nspacl) as d
-        FROM pg_namespace nsp
+        (SELECT pg_catalog.aclexplode(nsp.nspacl) as d
+        FROM pg_catalog.pg_namespace nsp
         WHERE nsp.oid = {{ scid|qtLiteral }}::OID
         ) a
     ) b
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/9.2_plus/sql/get_name.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/9.2_plus/sql/get_name.sql
index 3c5187dcf..be20542b7 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/9.2_plus/sql/get_name.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/9.2_plus/sql/get_name.sql
@@ -1 +1 @@
-SELECT nsp.nspname FROM pg_namespace nsp WHERE nsp.oid = {{ scid|qtLiteral }};
+SELECT nsp.nspname FROM pg_catalog.pg_namespace nsp WHERE nsp.oid = {{ scid|qtLiteral }};
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/9.2_plus/sql/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/9.2_plus/sql/nodes.sql
index 467873427..83db58499 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/9.2_plus/sql/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/9.2_plus/sql/nodes.sql
@@ -2,10 +2,10 @@
 SELECT
     nsp.oid,
 {{ CATALOGS.LABELS('nsp', _)  }},
-    has_schema_privilege(nsp.oid, 'CREATE') as can_create,
-    has_schema_privilege(nsp.oid, 'USAGE') as has_usage
+    pg_catalog.has_schema_privilege(nsp.oid, 'CREATE') as can_create,
+    pg_catalog.has_schema_privilege(nsp.oid, 'USAGE') as has_usage
 FROM
-    pg_namespace nsp
+    pg_catalog.pg_namespace nsp
 WHERE
     {% if scid %}
     nsp.oid={{scid}}::oid AND
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/9.2_plus/sql/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/9.2_plus/sql/properties.sql
index bc7023b8d..2e1af5b06 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/9.2_plus/sql/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/catalog/ppas/9.2_plus/sql/properties.sql
@@ -3,19 +3,19 @@ SELECT
     2 AS nsptyp,
     nsp.nspname AS name,
     nsp.oid,
-    array_to_string(nsp.nspacl::text[], ', ') as acl,
+    pg_catalog.array_to_string(nsp.nspacl::text[], ', ') as acl,
     r.rolname AS namespaceowner, description,
-    has_schema_privilege(nsp.oid, 'CREATE') AS can_create,
-    (SELECT array_to_string(defaclacl::text[], ', ') FROM pg_default_acl WHERE defaclobjtype = 'r' AND defaclnamespace = nsp.oid) AS tblacl,
-    (SELECT array_to_string(defaclacl::text[], ', ') FROM pg_default_acl WHERE defaclobjtype = 'S' AND defaclnamespace = nsp.oid) AS seqacl,
-    (SELECT array_to_string(defaclacl::text[], ', ') FROM pg_default_acl WHERE defaclobjtype = 'f' AND defaclnamespace = nsp.oid) AS funcacl,
-    (SELECT array_to_string(defaclacl::text[], ', ') FROM pg_default_acl WHERE defaclobjtype = 'T' AND defaclnamespace = nsp.oid) AS typeacl,
-    (SELECT array_agg(provider || '=' || label) FROM pg_seclabels sl1 WHERE sl1.objoid=nsp.oid) AS seclabels
+    pg_catalog.has_schema_privilege(nsp.oid, 'CREATE') AS can_create,
+    (SELECT pg_catalog.array_to_string(defaclacl::text[], ', ') FROM pg_catalog.pg_default_acl WHERE defaclobjtype = 'r' AND defaclnamespace = nsp.oid) AS tblacl,
+    (SELECT pg_catalog.array_to_string(defaclacl::text[], ', ') FROM pg_catalog.pg_default_acl WHERE defaclobjtype = 'S' AND defaclnamespace = nsp.oid) AS seqacl,
+    (SELECT pg_catalog.array_to_string(defaclacl::text[], ', ') FROM pg_catalog.pg_default_acl WHERE defaclobjtype = 'f' AND defaclnamespace = nsp.oid) AS funcacl,
+    (SELECT pg_catalog.array_to_string(defaclacl::text[], ', ') FROM pg_catalog.pg_default_acl WHERE defaclobjtype = 'T' AND defaclnamespace = nsp.oid) AS typeacl,
+    (SELECT pg_catalog.array_agg(provider || '=' || label) FROM pg_catalog.pg_seclabels sl1 WHERE sl1.objoid=nsp.oid) AS seclabels
 FROM
-    pg_namespace nsp
-    LEFT OUTER JOIN pg_description des ON
+    pg_catalog.pg_namespace nsp
+    LEFT OUTER JOIN pg_catalog.pg_description des ON
         (des.objoid=nsp.oid AND des.classoid='pg_namespace'::regclass)
-    LEFT JOIN pg_roles r ON (r.oid = nsp.nspowner)
+    LEFT JOIN pg_catalog.pg_roles r ON (r.oid = nsp.nspowner)
 WHERE
     {% if scid %}
     nsp.oid={{scid}}::oid AND
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/datatype/sql/default/get_types.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/datatype/sql/default/get_types.sql
index 4f0409059..0bd2311c1 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/datatype/sql/default/get_types.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/datatype/sql/default/get_types.sql
@@ -2,15 +2,15 @@ SELECT
     *
 FROM
     (SELECT
-        format_type(t.oid,NULL) AS typname,
+        pg_catalog.format_type(t.oid,NULL) AS typname,
         CASE WHEN typelem > 0 THEN typelem ELSE t.oid END as elemoid,
         typlen, typtype, t.oid, nspname,
-        (SELECT COUNT(1) FROM pg_type t2 WHERE t2.typname = t.typname) > 1 AS isdup,
+        (SELECT COUNT(1) FROM pg_catalog.pg_type t2 WHERE t2.typname = t.typname) > 1 AS isdup,
         CASE WHEN t.typcollation != 0 THEN TRUE ELSE FALSE END AS is_collatable
     FROM
-        pg_type t
+        pg_catalog.pg_type t
     JOIN
-        pg_namespace nsp ON typnamespace=nsp.oid
+        pg_catalog.pg_namespace nsp ON typnamespace=nsp.oid
     WHERE
         (NOT (typname = 'unknown' AND nspname = 'pg_catalog'))
     AND
@@ -22,4 +22,4 @@ FROM
     UNION SELECT 'serial', 0, 4, 'b', 0, 'pg_catalog', false, false
 {% endif %}
     ) AS dummy
-ORDER BY nspname <> 'pg_catalog', nspname <> 'public', nspname, 1
\ No newline at end of file
+ORDER BY nspname <> 'pg_catalog', nspname <> 'public', nspname, 1
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/9.2_plus/sql/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/9.2_plus/sql/acl.sql
index e8fbfd01f..58d0aff55 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/9.2_plus/sql/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/9.2_plus/sql/acl.sql
@@ -1,8 +1,8 @@
 {# Fetch privileges for schema #}
 SELECT
     'nspacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') AS grantee,
-    g.rolname AS grantor, array_agg(b.privilege_type) AS privileges,
-    array_agg(b.is_grantable) AS grantable
+    g.rolname AS grantor, pg_catalog.array_agg(b.privilege_type) AS privileges,
+    pg_catalog.array_agg(b.is_grantable) AS grantable
 FROM
     (SELECT
         (d).grantee AS grantee, (d).grantor AS grantor,
@@ -13,8 +13,8 @@ FROM
         ELSE 'UNKNOWN - ' || (d).privilege_type
         END AS privilege_type
     FROM
-        (SELECT aclexplode(nsp.nspacl) as d
-        FROM pg_namespace nsp
+        (SELECT pg_catalog.aclexplode(nsp.nspacl) as d
+        FROM pg_catalog.pg_namespace nsp
         WHERE nsp.oid = {{ scid|qtLiteral }}::OID
         ) a
     ) b
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/9.2_plus/sql/defacl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/9.2_plus/sql/defacl.sql
index 91c3085db..b221c4c9f 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/9.2_plus/sql/defacl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/9.2_plus/sql/defacl.sql
@@ -6,7 +6,7 @@ SELECT
     WHEN 'T' THEN 'deftypeacl'
     ELSE 'UNKNOWN - ' || a.deftype
     END AS deftype,
-    COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor, array_agg(a.privilege_type) as privileges, array_agg(a.is_grantable) as grantable
+    COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor, pg_catalog.array_agg(a.privilege_type) as privileges, pg_catalog.array_agg(a.is_grantable) as grantable
 FROM
     (SELECT
         (acl).grantee as grantee, (acl).grantor AS grantor, (acl).is_grantable AS is_grantable,
@@ -27,9 +27,9 @@ FROM
         END AS privilege_type,
         defaclobjtype as deftype
     FROM
-        (SELECT defaclobjtype, aclexplode(defaclacl) as acl
+        (SELECT defaclobjtype, pg_catalog.aclexplode(defaclacl) as acl
             FROM
-                pg_namespace nsp
+                pg_catalog.pg_namespace nsp
                 LEFT OUTER JOIN pg_catalog.pg_default_acl dacl ON (dacl.defaclnamespace = nsp.oid)
             WHERE
                 nsp.oid={{scid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/9.2_plus/sql/get_name.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/9.2_plus/sql/get_name.sql
index 3c5187dcf..be20542b7 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/9.2_plus/sql/get_name.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/9.2_plus/sql/get_name.sql
@@ -1 +1 @@
-SELECT nsp.nspname FROM pg_namespace nsp WHERE nsp.oid = {{ scid|qtLiteral }};
+SELECT nsp.nspname FROM pg_catalog.pg_namespace nsp WHERE nsp.oid = {{ scid|qtLiteral }};
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/9.2_plus/sql/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/9.2_plus/sql/nodes.sql
index 78c4f1dde..ca557164e 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/9.2_plus/sql/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/9.2_plus/sql/nodes.sql
@@ -2,10 +2,10 @@
 SELECT
     nsp.oid,
     nsp.nspname as name,
-    has_schema_privilege(nsp.oid, 'CREATE') as can_create,
-    has_schema_privilege(nsp.oid, 'USAGE') as has_usage
+    pg_catalog.has_schema_privilege(nsp.oid, 'CREATE') as can_create,
+    pg_catalog.has_schema_privilege(nsp.oid, 'USAGE') as has_usage
 FROM
-    pg_namespace nsp
+    pg_catalog.pg_namespace nsp
 WHERE
     {% if scid %}
     nsp.oid={{scid}}::oid AND
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/9.2_plus/sql/oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/9.2_plus/sql/oid.sql
index c5329b390..9528a26fe 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/9.2_plus/sql/oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/9.2_plus/sql/oid.sql
@@ -1 +1 @@
-SELECT nsp.oid FROM pg_namespace nsp WHERE nsp.nspname = {{ schema|qtLiteral }};
+SELECT nsp.oid FROM pg_catalog.pg_namespace nsp WHERE nsp.nspname = {{ schema|qtLiteral }};
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/9.2_plus/sql/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/9.2_plus/sql/properties.sql
index f340623fb..eacc48fa9 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/9.2_plus/sql/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/9.2_plus/sql/properties.sql
@@ -6,39 +6,39 @@ SELECT
     ELSE 3 END AS nsptyp,
     nsp.nspname AS name,
     nsp.oid,
-    array_to_string(nsp.nspacl::text[], ', ') as acl,
+    pg_catalog.array_to_string(nsp.nspacl::text[], ', ') as acl,
     r.rolname AS namespaceowner, description,
-    has_schema_privilege(nsp.oid, 'CREATE') AS can_create,
+    pg_catalog.has_schema_privilege(nsp.oid, 'CREATE') AS can_create,
     {### Default ACL for Tables ###}
-    (SELECT array_to_string(ARRAY(
-        SELECT array_to_string(defaclacl::text[], ', ')
-            FROM pg_default_acl
+    (SELECT pg_catalog.array_to_string(ARRAY(
+        SELECT pg_catalog.array_to_string(defaclacl::text[], ', ')
+            FROM pg_catalog.pg_default_acl
         WHERE defaclobjtype = 'r' AND defaclnamespace = nsp.oid
     ), ', ')) AS tblacl,
     {### Default ACL for Sequnces ###}
-    (SELECT array_to_string(ARRAY(
-        SELECT array_to_string(defaclacl::text[], ', ')
-            FROM pg_default_acl
+    (SELECT pg_catalog.array_to_string(ARRAY(
+        SELECT pg_catalog.array_to_string(defaclacl::text[], ', ')
+            FROM pg_catalog.pg_default_acl
         WHERE defaclobjtype = 'S' AND defaclnamespace = nsp.oid
     ), ', ')) AS seqacl,
     {### Default ACL for Functions ###}
-    (SELECT array_to_string(ARRAY(
-        SELECT array_to_string(defaclacl::text[], ', ')
-            FROM pg_default_acl
+    (SELECT pg_catalog.array_to_string(ARRAY(
+        SELECT pg_catalog.array_to_string(defaclacl::text[], ', ')
+            FROM pg_catalog.pg_default_acl
         WHERE defaclobjtype = 'f' AND defaclnamespace = nsp.oid
     ), ', ')) AS funcacl,
     {### Default ACL for Type ###}
-    (SELECT array_to_string(ARRAY(
-        SELECT array_to_string(defaclacl::text[], ', ')
-            FROM pg_default_acl
+    (SELECT pg_catalog.array_to_string(ARRAY(
+        SELECT pg_catalog.array_to_string(defaclacl::text[], ', ')
+            FROM pg_catalog.pg_default_acl
         WHERE defaclobjtype = 'T' AND defaclnamespace = nsp.oid
     ), ', ')) AS typeacl,
-    (SELECT array_agg(provider || '=' || label) FROM pg_seclabels sl1 WHERE sl1.objoid=nsp.oid) AS seclabels
+    (SELECT pg_catalog.array_agg(provider || '=' || label) FROM pg_catalog.pg_seclabels sl1 WHERE sl1.objoid=nsp.oid) AS seclabels
 FROM
-    pg_namespace nsp
-    LEFT OUTER JOIN pg_description des ON
+    pg_catalog.pg_namespace nsp
+    LEFT OUTER JOIN pg_catalog.pg_description des ON
         (des.objoid=nsp.oid AND des.classoid='pg_namespace'::regclass)
-    LEFT JOIN pg_roles r ON (r.oid = nsp.nspowner)
+    LEFT JOIN pg_catalog.pg_roles r ON (r.oid = nsp.nspowner)
 WHERE
     {% if scid %}
     nsp.oid={{scid}}::oid AND
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/default/sql/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/default/sql/acl.sql
index e8fbfd01f..58d0aff55 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/default/sql/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/default/sql/acl.sql
@@ -1,8 +1,8 @@
 {# Fetch privileges for schema #}
 SELECT
     'nspacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') AS grantee,
-    g.rolname AS grantor, array_agg(b.privilege_type) AS privileges,
-    array_agg(b.is_grantable) AS grantable
+    g.rolname AS grantor, pg_catalog.array_agg(b.privilege_type) AS privileges,
+    pg_catalog.array_agg(b.is_grantable) AS grantable
 FROM
     (SELECT
         (d).grantee AS grantee, (d).grantor AS grantor,
@@ -13,8 +13,8 @@ FROM
         ELSE 'UNKNOWN - ' || (d).privilege_type
         END AS privilege_type
     FROM
-        (SELECT aclexplode(nsp.nspacl) as d
-        FROM pg_namespace nsp
+        (SELECT pg_catalog.aclexplode(nsp.nspacl) as d
+        FROM pg_catalog.pg_namespace nsp
         WHERE nsp.oid = {{ scid|qtLiteral }}::OID
         ) a
     ) b
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/default/sql/defacl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/default/sql/defacl.sql
index 9ccbef5b2..a38d4d054 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/default/sql/defacl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/default/sql/defacl.sql
@@ -5,7 +5,7 @@ SELECT
     WHEN 'f' THEN 'deffuncacl'
     ELSE 'UNKNOWN - ' || a.deftype
     END AS deftype,
-    COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor, array_agg(a.privilege_type) as privileges, array_agg(a.is_grantable) as grantable
+    COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor, pg_catalog.array_agg(a.privilege_type) as privileges, pg_catalog.array_agg(a.is_grantable) as grantable
 FROM
     (SELECT
         (acl).grantee as grantee, (acl).grantor AS grantor, (acl).is_grantable AS is_grantable,
@@ -26,9 +26,9 @@ FROM
         END AS privilege_type,
         defaclobjtype as deftype
     FROM
-        (SELECT defaclobjtype, aclexplode(defaclacl) as acl
+        (SELECT defaclobjtype, pg_catalog.aclexplode(defaclacl) as acl
             FROM
-                pg_namespace nsp
+                pg_catalog.pg_namespace nsp
                 LEFT OUTER JOIN pg_catalog.pg_default_acl dacl ON (dacl.defaclnamespace = nsp.oid)
             WHERE
                 nsp.oid={{scid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/default/sql/get_name.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/default/sql/get_name.sql
index 3c5187dcf..be20542b7 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/default/sql/get_name.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/default/sql/get_name.sql
@@ -1 +1 @@
-SELECT nsp.nspname FROM pg_namespace nsp WHERE nsp.oid = {{ scid|qtLiteral }};
+SELECT nsp.nspname FROM pg_catalog.pg_namespace nsp WHERE nsp.oid = {{ scid|qtLiteral }};
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/default/sql/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/default/sql/nodes.sql
index a521a3e92..200204f54 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/default/sql/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/default/sql/nodes.sql
@@ -2,10 +2,10 @@
 SELECT
     nsp.oid,
     nsp.nspname as name,
-    has_schema_privilege(nsp.oid, 'CREATE') as can_create,
-    has_schema_privilege(nsp.oid, 'USAGE') as has_usage
+    pg_catalog.has_schema_privilege(nsp.oid, 'CREATE') as can_create,
+    pg_catalog.has_schema_privilege(nsp.oid, 'USAGE') as has_usage
 FROM
-    pg_namespace nsp
+    pg_catalog.pg_namespace nsp
 WHERE
     {% if scid %}
     nsp.oid={{scid}}::oid AND
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/default/sql/oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/default/sql/oid.sql
index c5329b390..9528a26fe 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/default/sql/oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/default/sql/oid.sql
@@ -1 +1 @@
-SELECT nsp.oid FROM pg_namespace nsp WHERE nsp.nspname = {{ schema|qtLiteral }};
+SELECT nsp.oid FROM pg_catalog.pg_namespace nsp WHERE nsp.nspname = {{ schema|qtLiteral }};
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/default/sql/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/default/sql/properties.sql
index 50c8a25ad..235df7624 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/default/sql/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/pg/default/sql/properties.sql
@@ -6,33 +6,33 @@ SELECT
     ELSE 3 END AS nsptyp,
     nsp.nspname AS name,
     nsp.oid,
-    array_to_string(nsp.nspacl::text[], ', ') as acl,
+    pg_catalog.array_to_string(nsp.nspacl::text[], ', ') as acl,
     r.rolname AS namespaceowner, description,
-    has_schema_privilege(nsp.oid, 'CREATE') AS can_create,
+    pg_catalog.has_schema_privilege(nsp.oid, 'CREATE') AS can_create,
     {### Default ACL for Tables ###}
-    (SELECT array_to_string(ARRAY(
-        SELECT array_to_string(defaclacl::text[], ', ')
-            FROM pg_default_acl
+    (SELECT pg_catalog.array_to_string(ARRAY(
+        SELECT pg_catalog.array_to_string(defaclacl::text[], ', ')
+            FROM pg_catalog.pg_default_acl
         WHERE defaclobjtype = 'r' AND defaclnamespace = nsp.oid
     ), ', ')) AS tblacl,
     {### Default ACL for Sequnces ###}
-    (SELECT array_to_string(ARRAY(
-        SELECT array_to_string(defaclacl::text[], ', ')
-            FROM pg_default_acl
+    (SELECT pg_catalog.array_to_string(ARRAY(
+        SELECT pg_catalog.array_to_string(defaclacl::text[], ', ')
+            FROM pg_catalog.pg_default_acl
         WHERE defaclobjtype = 'S' AND defaclnamespace = nsp.oid
     ), ', ')) AS seqacl,
     {### Default ACL for Functions ###}
-    (SELECT array_to_string(ARRAY(
-        SELECT array_to_string(defaclacl::text[], ', ')
-            FROM pg_default_acl
+    (SELECT pg_catalog.array_to_string(ARRAY(
+        SELECT pg_catalog.array_to_string(defaclacl::text[], ', ')
+            FROM pg_catalog.pg_default_acl
         WHERE defaclobjtype = 'f' AND defaclnamespace = nsp.oid
     ), ', ')) AS funcacl,
-    (SELECT array_agg(provider || '=' || label) FROM pg_seclabels sl1 WHERE sl1.objoid=nsp.oid) AS seclabels
+    (SELECT pg_catalog.array_agg(provider || '=' || label) FROM pg_catalog.pg_seclabels sl1 WHERE sl1.objoid=nsp.oid) AS seclabels
 FROM
-    pg_namespace nsp
-    LEFT OUTER JOIN pg_description des ON
+    pg_catalog.pg_namespace nsp
+    LEFT OUTER JOIN pg_catalog.pg_description des ON
         (des.objoid=nsp.oid AND des.classoid='pg_namespace'::regclass)
-    LEFT JOIN pg_roles r ON (r.oid = nsp.nspowner)
+    LEFT JOIN pg_catalog.pg_roles r ON (r.oid = nsp.nspowner)
 WHERE
     {% if scid %}
     nsp.oid={{scid}}::oid AND
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.1_plus/sql/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.1_plus/sql/acl.sql
index e8fbfd01f..58d0aff55 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.1_plus/sql/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.1_plus/sql/acl.sql
@@ -1,8 +1,8 @@
 {# Fetch privileges for schema #}
 SELECT
     'nspacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') AS grantee,
-    g.rolname AS grantor, array_agg(b.privilege_type) AS privileges,
-    array_agg(b.is_grantable) AS grantable
+    g.rolname AS grantor, pg_catalog.array_agg(b.privilege_type) AS privileges,
+    pg_catalog.array_agg(b.is_grantable) AS grantable
 FROM
     (SELECT
         (d).grantee AS grantee, (d).grantor AS grantor,
@@ -13,8 +13,8 @@ FROM
         ELSE 'UNKNOWN - ' || (d).privilege_type
         END AS privilege_type
     FROM
-        (SELECT aclexplode(nsp.nspacl) as d
-        FROM pg_namespace nsp
+        (SELECT pg_catalog.aclexplode(nsp.nspacl) as d
+        FROM pg_catalog.pg_namespace nsp
         WHERE nsp.oid = {{ scid|qtLiteral }}::OID
         ) a
     ) b
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.1_plus/sql/defacl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.1_plus/sql/defacl.sql
index f03db8532..2ee7baa33 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.1_plus/sql/defacl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.1_plus/sql/defacl.sql
@@ -5,7 +5,7 @@ SELECT
     WHEN 'f' THEN 'deffuncacl'
     ELSE 'UNKNOWN - ' || a.deftype
     END AS deftype,
-    COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor, array_agg(a.privilege_type) as privileges, array_agg(a.is_grantable) as grantable
+    COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor, pg_catalog.array_agg(a.privilege_type) as privileges, pg_catalog.array_agg(a.is_grantable) as grantable
 FROM
     (SELECT
         (acl).grantee as grantee, (acl).grantor AS grantor, (acl).is_grantable AS is_grantable,
@@ -26,9 +26,9 @@ FROM
         END AS privilege_type,
         defaclobjtype as deftype
     FROM
-        (SELECT defaclobjtype, aclexplode(defaclacl) as acl
+        (SELECT defaclobjtype, pg_catalog.aclexplode(defaclacl) as acl
             FROM
-                pg_namespace nsp
+                pg_catalog.pg_namespace nsp
                 LEFT OUTER JOIN pg_catalog.pg_default_acl dacl ON (dacl.defaclnamespace = nsp.oid)
             WHERE
                 nsp.oid={{scid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.1_plus/sql/get_name.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.1_plus/sql/get_name.sql
index 3c5187dcf..be20542b7 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.1_plus/sql/get_name.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.1_plus/sql/get_name.sql
@@ -1 +1 @@
-SELECT nsp.nspname FROM pg_namespace nsp WHERE nsp.oid = {{ scid|qtLiteral }};
+SELECT nsp.nspname FROM pg_catalog.pg_namespace nsp WHERE nsp.oid = {{ scid|qtLiteral }};
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.1_plus/sql/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.1_plus/sql/nodes.sql
index 6da23892a..7f1c94796 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.1_plus/sql/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.1_plus/sql/nodes.sql
@@ -2,10 +2,10 @@
 SELECT
     nsp.oid,
     nsp.nspname as name,
-    has_schema_privilege(nsp.oid, 'CREATE') as can_create,
-    has_schema_privilege(nsp.oid, 'USAGE') as has_usage
+    pg_catalog.has_schema_privilege(nsp.oid, 'CREATE') as can_create,
+    pg_catalog.has_schema_privilege(nsp.oid, 'USAGE') as has_usage
 FROM
-    pg_namespace nsp
+    pg_catalog.pg_namespace nsp
 WHERE
     nsp.nspparent = 0 AND
     {% if scid %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.1_plus/sql/oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.1_plus/sql/oid.sql
index c5329b390..9528a26fe 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.1_plus/sql/oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.1_plus/sql/oid.sql
@@ -1 +1 @@
-SELECT nsp.oid FROM pg_namespace nsp WHERE nsp.nspname = {{ schema|qtLiteral }};
+SELECT nsp.oid FROM pg_catalog.pg_namespace nsp WHERE nsp.nspname = {{ schema|qtLiteral }};
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.1_plus/sql/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.1_plus/sql/properties.sql
index 87f93d3a9..1a81b07b9 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.1_plus/sql/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.1_plus/sql/properties.sql
@@ -6,32 +6,32 @@ SELECT
     ELSE 3 END AS nsptyp,
     nsp.nspname AS name,
     nsp.oid,
-    array_to_string(nsp.nspacl::text[], ', ') as acl,
+    pg_catalog.array_to_string(nsp.nspacl::text[], ', ') as acl,
     r.rolname AS namespaceowner, description,
-    has_schema_privilege(nsp.oid, 'CREATE') AS can_create,
+    pg_catalog.has_schema_privilege(nsp.oid, 'CREATE') AS can_create,
     {### Default ACL for Tables ###}
-    (SELECT array_to_string(ARRAY(
-        SELECT array_to_string(defaclacl::text[], ', ')
-            FROM pg_default_acl
+    (SELECT pg_catalog.array_to_string(ARRAY(
+        SELECT pg_catalog.array_to_string(defaclacl::text[], ', ')
+            FROM pg_catalog.pg_default_acl
         WHERE defaclobjtype = 'r' AND defaclnamespace = nsp.oid
     ), ', ')) AS tblacl,
     {### Default ACL for Sequnces ###}
-    (SELECT array_to_string(ARRAY(
-        SELECT array_to_string(defaclacl::text[], ', ')
-            FROM pg_default_acl
+    (SELECT pg_catalog.array_to_string(ARRAY(
+        SELECT pg_catalog.array_to_string(defaclacl::text[], ', ')
+            FROM pg_catalog.pg_default_acl
         WHERE defaclobjtype = 'S' AND defaclnamespace = nsp.oid
     ), ', ')) AS seqacl,
     {### Default ACL for Functions ###}
-    (SELECT array_to_string(ARRAY(
-        SELECT array_to_string(defaclacl::text[], ', ')
-            FROM pg_default_acl
+    (SELECT pg_catalog.array_to_string(ARRAY(
+        SELECT pg_catalog.array_to_string(defaclacl::text[], ', ')
+            FROM pg_catalog.pg_default_acl
         WHERE defaclobjtype = 'f' AND defaclnamespace = nsp.oid
     ), ', ')) AS funcacl
 FROM
-    pg_namespace nsp
-    LEFT OUTER JOIN pg_description des ON
+    pg_catalog.pg_namespace nsp
+    LEFT OUTER JOIN pg_catalog.pg_description des ON
         (des.objoid=nsp.oid AND des.classoid='pg_namespace'::regclass)
-    LEFT JOIN pg_roles r ON (r.oid = nsp.nspowner)
+    LEFT JOIN pg_catalog.pg_roles r ON (r.oid = nsp.nspowner)
 WHERE
     {% if scid %}
     nsp.oid={{scid}}::oid AND
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.2_plus/sql/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.2_plus/sql/acl.sql
index e8fbfd01f..58d0aff55 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.2_plus/sql/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.2_plus/sql/acl.sql
@@ -1,8 +1,8 @@
 {# Fetch privileges for schema #}
 SELECT
     'nspacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') AS grantee,
-    g.rolname AS grantor, array_agg(b.privilege_type) AS privileges,
-    array_agg(b.is_grantable) AS grantable
+    g.rolname AS grantor, pg_catalog.array_agg(b.privilege_type) AS privileges,
+    pg_catalog.array_agg(b.is_grantable) AS grantable
 FROM
     (SELECT
         (d).grantee AS grantee, (d).grantor AS grantor,
@@ -13,8 +13,8 @@ FROM
         ELSE 'UNKNOWN - ' || (d).privilege_type
         END AS privilege_type
     FROM
-        (SELECT aclexplode(nsp.nspacl) as d
-        FROM pg_namespace nsp
+        (SELECT pg_catalog.aclexplode(nsp.nspacl) as d
+        FROM pg_catalog.pg_namespace nsp
         WHERE nsp.oid = {{ scid|qtLiteral }}::OID
         ) a
     ) b
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.2_plus/sql/defacl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.2_plus/sql/defacl.sql
index 6dabab0e7..1452dba98 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.2_plus/sql/defacl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.2_plus/sql/defacl.sql
@@ -8,8 +8,8 @@ SELECT
     END AS deftype,
     COALESCE(gt.rolname, 'PUBLIC') grantee,
     g.rolname grantor,
-    array_agg(a.privilege_type order by a.privilege_type) as privileges,
-    array_agg(a.is_grantable) as grantable
+    pg_catalog.array_agg(a.privilege_type order by a.privilege_type) as privileges,
+    pg_catalog.array_agg(a.is_grantable) as grantable
 FROM
     (SELECT
         (acl).grantee as grantee, (acl).grantor AS grantor, (acl).is_grantable AS is_grantable,
@@ -30,9 +30,9 @@ FROM
         END AS privilege_type,
         defaclobjtype as deftype
     FROM
-        (SELECT defaclobjtype, aclexplode(defaclacl) as acl
+        (SELECT defaclobjtype, pg_catalog.aclexplode(defaclacl) as acl
             FROM
-                pg_namespace nsp
+                pg_catalog.pg_namespace nsp
                 LEFT OUTER JOIN pg_catalog.pg_default_acl dacl ON (dacl.defaclnamespace = nsp.oid)
             WHERE
                 nsp.oid={{scid}}::oid
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.2_plus/sql/get_name.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.2_plus/sql/get_name.sql
index 3c5187dcf..be20542b7 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.2_plus/sql/get_name.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.2_plus/sql/get_name.sql
@@ -1 +1 @@
-SELECT nsp.nspname FROM pg_namespace nsp WHERE nsp.oid = {{ scid|qtLiteral }};
+SELECT nsp.nspname FROM pg_catalog.pg_namespace nsp WHERE nsp.oid = {{ scid|qtLiteral }};
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.2_plus/sql/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.2_plus/sql/nodes.sql
index 6da23892a..7f1c94796 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.2_plus/sql/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.2_plus/sql/nodes.sql
@@ -2,10 +2,10 @@
 SELECT
     nsp.oid,
     nsp.nspname as name,
-    has_schema_privilege(nsp.oid, 'CREATE') as can_create,
-    has_schema_privilege(nsp.oid, 'USAGE') as has_usage
+    pg_catalog.has_schema_privilege(nsp.oid, 'CREATE') as can_create,
+    pg_catalog.has_schema_privilege(nsp.oid, 'USAGE') as has_usage
 FROM
-    pg_namespace nsp
+    pg_catalog.pg_namespace nsp
 WHERE
     nsp.nspparent = 0 AND
     {% if scid %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.2_plus/sql/oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.2_plus/sql/oid.sql
index c5329b390..9528a26fe 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.2_plus/sql/oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.2_plus/sql/oid.sql
@@ -1 +1 @@
-SELECT nsp.oid FROM pg_namespace nsp WHERE nsp.nspname = {{ schema|qtLiteral }};
+SELECT nsp.oid FROM pg_catalog.pg_namespace nsp WHERE nsp.nspname = {{ schema|qtLiteral }};
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.2_plus/sql/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.2_plus/sql/properties.sql
index 158c00415..49720e616 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.2_plus/sql/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schemas/ppas/9.2_plus/sql/properties.sql
@@ -8,37 +8,37 @@ SELECT
     nsp.oid,
     array_to_string(nsp.nspacl::text[], ', ') as acl,
     r.rolname AS namespaceowner, description,
-    has_schema_privilege(nsp.oid, 'CREATE') AS can_create,
+    pg_catalog.has_schema_privilege(nsp.oid, 'CREATE') AS can_create,
     {### Default ACL for Tables ###}
-    (SELECT array_to_string(ARRAY(
-        SELECT array_to_string(defaclacl::text[], ', ')
-            FROM pg_default_acl
+    (SELECT pg_catalog.array_to_string(ARRAY(
+        SELECT pg_catalog.array_to_string(defaclacl::text[], ', ')
+            FROM pg_catalog.pg_default_acl
         WHERE defaclobjtype = 'r' AND defaclnamespace = nsp.oid
     ), ', ')) AS tblacl,
     {### Default ACL for Sequnces ###}
-    (SELECT array_to_string(ARRAY(
-        SELECT array_to_string(defaclacl::text[], ', ')
-            FROM pg_default_acl
+    (SELECT pg_catalog.array_to_string(ARRAY(
+        SELECT pg_catalog.array_to_string(defaclacl::text[], ', ')
+            FROM pg_catalog.pg_default_acl
         WHERE defaclobjtype = 'S' AND defaclnamespace = nsp.oid
     ), ', ')) AS seqacl,
     {### Default ACL for Functions ###}
-    (SELECT array_to_string(ARRAY(
-        SELECT array_to_string(defaclacl::text[], ', ')
-            FROM pg_default_acl
+    (SELECT pg_catalog.array_to_string(ARRAY(
+        SELECT pg_catalog.array_to_string(defaclacl::text[], ', ')
+            FROM pg_catalog.pg_default_acl
         WHERE defaclobjtype = 'f' AND defaclnamespace = nsp.oid
     ), ', ')) AS funcacl,
     {### Default ACL for Type ###}
-    (SELECT array_to_string(ARRAY(
-        SELECT array_to_string(defaclacl::text[], ', ')
-            FROM pg_default_acl
+    (SELECT pg_catalog.array_to_string(ARRAY(
+        SELECT pg_catalog.array_to_string(defaclacl::text[], ', ')
+            FROM pg_catalog.pg_default_acl
         WHERE defaclobjtype = 'T' AND defaclnamespace = nsp.oid
     ), ', ')) AS typeacl,
-    (SELECT array_agg(provider || '=' || label) FROM pg_seclabels sl1 WHERE sl1.objoid=nsp.oid) AS seclabels
+    (SELECT pg_catalog.array_agg(provider || '=' || label) FROM pg_catalog.pg_seclabels sl1 WHERE sl1.objoid=nsp.oid) AS seclabels
 FROM
-    pg_namespace nsp
-    LEFT OUTER JOIN pg_description des ON
+    pg_catalog.pg_namespace nsp
+    LEFT OUTER JOIN pg_catalog.pg_description des ON
         (des.objoid=nsp.oid AND des.classoid='pg_namespace'::regclass)
-    LEFT JOIN pg_roles r ON (r.oid = nsp.nspowner)
+    LEFT JOIN pg_catalog.pg_roles r ON (r.oid = nsp.nspowner)
 WHERE
     {% if scid %}
     nsp.oid={{scid}}::oid AND
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/vacuum_settings/sql/vacuum_defaults.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/vacuum_settings/sql/vacuum_defaults.sql
index e60598cdb..67e768abc 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/vacuum_settings/sql/vacuum_defaults.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/vacuum_settings/sql/vacuum_defaults.sql
@@ -1,2 +1,2 @@
 {# ============= Fetch list of default values for autovacuum parameters =============== #}
-SELECT name, setting::numeric AS setting FROM pg_settings WHERE name IN({{ columns }}) ORDER BY name
+SELECT name, setting::numeric AS setting FROM pg_catalog.pg_settings WHERE name IN({{ columns }}) ORDER BY name
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/types/sql/default/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/types/sql/default/acl.sql
index 76d0aeb7a..54dc1eed1 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/types/sql/default/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/types/sql/default/acl.sql
@@ -1,4 +1,4 @@
-SELECT 'typacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor, array_agg(privilege_type) as privileges, array_agg(is_grantable) as grantable
+SELECT 'typacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor, pg_catalog.array_agg(privilege_type) as privileges, pg_catalog.array_agg(is_grantable) as grantable
 FROM
     (SELECT
         d.grantee, d.grantor, d.is_grantable,
@@ -8,10 +8,10 @@ FROM
         END AS privilege_type
     FROM
         (SELECT t.typacl
-            FROM pg_type t
-            LEFT OUTER JOIN pg_type e ON e.oid=t.typelem
-            LEFT OUTER JOIN pg_class ct ON ct.oid=t.typrelid AND ct.relkind <> 'c'
-            LEFT OUTER JOIN pg_description des ON (des.objoid=t.oid AND des.classoid='pg_type'::regclass)
+            FROM pg_catalog.pg_type t
+            LEFT OUTER JOIN pg_catalog.pg_type e ON e.oid=t.typelem
+            LEFT OUTER JOIN pg_catalog.pg_class ct ON ct.oid=t.typrelid AND ct.relkind <> 'c'
+            LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=t.oid AND des.classoid='pg_type'::regclass)
             WHERE t.typtype != 'd' AND t.typname NOT LIKE E'\\_%' AND t.typnamespace = {{scid}}::oid
             {% if tid %}
             AND t.oid = {{tid}}::oid
@@ -19,7 +19,7 @@ FROM
         ) acl,
         (SELECT (d).grantee AS grantee, (d).grantor AS grantor, (d).is_grantable
             AS is_grantable, (d).privilege_type AS privilege_type FROM (SELECT
-            aclexplode(t.typacl) as d FROM pg_type t WHERE t.oid = {{tid}}::oid) a ORDER BY privilege_type) d
+            pg_catalog.aclexplode(t.typacl) as d FROM pg_catalog.pg_type t WHERE t.oid = {{tid}}::oid) a ORDER BY privilege_type) d
         ) d
     LEFT JOIN pg_catalog.pg_roles g ON (d.grantor = g.oid)
     LEFT JOIN pg_catalog.pg_roles gt ON (d.grantee = gt.oid)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/types/sql/default/additional_properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/types/sql/default/additional_properties.sql
index cf57ffc95..499f81448 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/types/sql/default/additional_properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/types/sql/default/additional_properties.sql
@@ -1,16 +1,16 @@
 {# The SQL given below will fetch composite type#}
 {% if type == 'c' %}
-SELECT attnum, attname, format_type(t.oid,NULL) AS typname, attndims, atttypmod, nsp.nspname,
-    (SELECT COUNT(1) from pg_type t2 WHERE t2.typname=t.typname) > 1 AS isdup,
+SELECT attnum, attname, pg_catalog.format_type(t.oid,NULL) AS typname, attndims, atttypmod, nsp.nspname,
+    (SELECT COUNT(1) from pg_catalog.pg_type t2 WHERE t2.typname=t.typname) > 1 AS isdup,
     collname, nspc.nspname as collnspname, att.attrelid,
-    format_type(t.oid, att.atttypmod) AS fulltype,
+    pg_catalog.format_type(t.oid, att.atttypmod) AS fulltype,
     CASE WHEN t.typelem > 0 THEN t.typelem ELSE t.oid END as elemoid
-FROM pg_attribute att
-    JOIN pg_type t ON t.oid=atttypid
+FROM pg_catalog.pg_attribute att
+    JOIN pg_catalog.pg_type t ON t.oid=atttypid
     JOIN pg_namespace nsp ON t.typnamespace=nsp.oid
-    LEFT OUTER JOIN pg_type b ON t.typelem=b.oid
-    LEFT OUTER JOIN pg_collation c ON att.attcollation=c.oid
-    LEFT OUTER JOIN pg_namespace nspc ON c.collnamespace=nspc.oid
+    LEFT OUTER JOIN pg_catalog.pg_type b ON t.typelem=b.oid
+    LEFT OUTER JOIN pg_catalog.pg_collation c ON att.attcollation=c.oid
+    LEFT OUTER JOIN pg_catalog.pg_namespace nspc ON c.collnamespace=nspc.oid
     WHERE att.attrelid = {{typrelid}}::oid
     ORDER by attnum;
 {% endif %}
@@ -18,7 +18,7 @@ FROM pg_attribute att
 {# The SQL given below will fetch enum type#}
 {% if type == 'e' %}
 SELECT enumlabel
-FROM pg_enum
+FROM pg_catalog.pg_enum
     WHERE enumtypid={{tid}}::oid
     ORDER by enumsortorder
 {% endif %}
@@ -27,13 +27,13 @@ FROM pg_enum
 {% if type == 'r' %}
 SELECT rngsubtype, st.typname,
     rngcollation,
-    CASE WHEN n.nspname IS NOT NULL THEN concat(quote_ident(n.nspname), '.', quote_ident(col.collname)) ELSE col.collname END AS collname,
+    CASE WHEN n.nspname IS NOT NULL THEN pg_catalog.concat(pg_catalog.quote_ident(n.nspname), '.', pg_catalog.quote_ident(col.collname)) ELSE col.collname END AS collname,
     rngsubopc, opc.opcname,
     rngcanonical, rngsubdiff
 FROM pg_range
-    LEFT JOIN pg_type st ON st.oid=rngsubtype
-    LEFT JOIN pg_collation col ON col.oid=rngcollation
-    LEFT JOIN pg_namespace n ON col.collnamespace=n.oid
-    LEFT JOIN pg_opclass opc ON opc.oid=rngsubopc
+    LEFT JOIN pg_catalog.pg_type st ON st.oid=rngsubtype
+    LEFT JOIN pg_catalog.pg_collation col ON col.oid=rngcollation
+    LEFT JOIN pg_catalog.pg_namespace n ON col.collnamespace=n.oid
+    LEFT JOIN pg_catalog.pg_opclass opc ON opc.oid=rngsubopc
     WHERE rngtypid={{tid}}::oid;
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/types/sql/default/get_collations.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/types/sql/default/get_collations.sql
index cfde51e9d..2b5cb534c 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/types/sql/default/get_collations.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/types/sql/default/get_collations.sql
@@ -1,7 +1,7 @@
 SELECT --nspname, collname,
     CASE WHEN length(nspname::text) > 0 AND length(collname::text) > 0  THEN
-        concat(quote_ident(nspname), '.', quote_ident(collname))
+        pg_catalog.concat(pg_catalog.quote_ident(nspname), '.', pg_catalog.quote_ident(collname))
     ELSE '' END AS collation
-FROM pg_collation c, pg_namespace n
+FROM pg_catalog.pg_collation c, pg_catalog.pg_namespace n
 WHERE c.collnamespace=n.oid
 ORDER BY nspname, collname;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/types/sql/default/get_external_functions.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/types/sql/default/get_external_functions.sql
index 2207ab9cf..425df8845 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/types/sql/default/get_external_functions.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/types/sql/default/get_external_functions.sql
@@ -2,14 +2,14 @@
 {% if extfunc %}
 SELECT proname, nspname,
     CASE WHEN (length(nspname::text) > 0 AND nspname != 'public') and length(proname::text) > 0  THEN
-        concat(quote_ident(nspname), '.', quote_ident(proname))
+        pg_catalog.concat(pg_catalog.quote_ident(nspname), '.', pg_catalog.quote_ident(proname))
     WHEN length(proname::text) > 0 THEN
-        quote_ident(proname)
+        pg_catalog.quote_ident(proname)
     ELSE '' END AS func
 FROM (
     SELECT proname, nspname, max(proargtypes[0]) AS arg0, max(proargtypes[1]) AS arg1
-FROM pg_proc p
-    JOIN pg_namespace n ON n.oid=pronamespace
+FROM pg_catalog.pg_proc p
+    JOIN pg_catalog.pg_namespace n ON n.oid=pronamespace
 GROUP BY proname, nspname
 HAVING count(proname) = 1) AS uniquefunc
 WHERE arg0 <> 0 AND (arg1 IS NULL OR arg1 <> 0);
@@ -18,12 +18,12 @@ WHERE arg0 <> 0 AND (arg1 IS NULL OR arg1 <> 0);
 {% if typemodin %}
 SELECT proname, nspname,
     CASE WHEN length(nspname::text) > 0 AND length(proname::text) > 0  THEN
-        concat(quote_ident(nspname), '.', quote_ident(proname))
+        pg_catalog.concat(pg_catalog.quote_ident(nspname), '.', pg_catalog.quote_ident(proname))
     ELSE '' END AS func
-FROM pg_proc p
-    JOIN pg_namespace n ON n.oid=pronamespace
-WHERE prorettype=(SELECT oid FROM pg_type WHERE typname='int4')
-    AND proargtypes[0]=(SELECT oid FROM pg_type WHERE typname='_cstring')
+FROM pg_catalog.pg_proc p
+    JOIN pg_catalog.pg_namespace n ON n.oid=pronamespace
+WHERE prorettype=(SELECT oid FROM pg_catalog.pg_type WHERE typname='int4')
+    AND proargtypes[0]=(SELECT oid FROM pg_catalog.pg_type WHERE typname='_cstring')
     AND proargtypes[1] IS NULL
 ORDER BY nspname, proname;
 {% endif %}
@@ -31,12 +31,12 @@ ORDER BY nspname, proname;
 {% if typemodout %}
 SELECT proname, nspname,
     CASE WHEN length(nspname::text) > 0 AND length(proname::text) > 0  THEN
-        concat(quote_ident(nspname), '.', quote_ident(proname))
+        pg_catalog.concat(pg_catalog.quote_ident(nspname), '.', pg_catalog.quote_ident(proname))
     ELSE '' END AS func
-FROM pg_proc p
-    JOIN pg_namespace n ON n.oid=pronamespace
-WHERE prorettype=(SELECT oid FROM pg_type WHERE typname='cstring')
-    AND proargtypes[0]=(SELECT oid FROM pg_type WHERE typname='int4')
+FROM pg_catalog.pg_proc p
+    JOIN pg_catalog.pg_namespace n ON n.oid=pronamespace
+WHERE prorettype=(SELECT oid FROM pg_catalog.pg_type WHERE typname='cstring')
+    AND proargtypes[0]=(SELECT oid FROM pg_catalog.pg_type WHERE typname='int4')
     AND proargtypes[1] IS NULL
 ORDER BY nspname, proname;
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/types/sql/default/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/types/sql/default/get_oid.sql
index 175149884..d5282bc10 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/types/sql/default/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/types/sql/default/get_oid.sql
@@ -1,9 +1,9 @@
 {# Below will provide oid for newly created type #}
 SELECT t.oid
-FROM pg_type t
-    LEFT OUTER JOIN pg_type e ON e.oid=t.typelem
-    LEFT OUTER JOIN pg_class ct ON ct.oid=t.typrelid AND ct.relkind <> 'c'
-    LEFT OUTER JOIN pg_description des ON (des.objoid=t.oid AND des.classoid='pg_type'::regclass)
+FROM pg_catalog.pg_type t
+    LEFT OUTER JOIN pg_catalog.pg_type e ON e.oid=t.typelem
+    LEFT OUTER JOIN pg_catalog.pg_class ct ON ct.oid=t.typrelid AND ct.relkind <> 'c'
+    LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=t.oid AND des.classoid='pg_type'::regclass)
 WHERE t.typtype != 'd' AND t.typname NOT LIKE E'\\_%' AND t.typnamespace = {{scid}}::oid
 {% if data %}
     AND t.typname = {{data.name|qtLiteral}}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/types/sql/default/get_scid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/types/sql/default/get_scid.sql
index 067a9865f..65d7661d4 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/types/sql/default/get_scid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/types/sql/default/get_scid.sql
@@ -2,14 +2,14 @@
 SELECT
     t.typnamespace as scid
 FROM
-    pg_type t
+    pg_catalog.pg_type t
 WHERE
     t.oid = {{tid}}::oid;
 {% else %}
 SELECT
     ns.oid as scid
 FROM
-    pg_namespace ns
+    pg_catalog.pg_namespace ns
 WHERE
     ns.nspname = {{schema|qtLiteral}}::text;
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/types/sql/default/get_subtypes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/types/sql/default/get_subtypes.sql
index 26a19030a..f8ba524a2 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/types/sql/default/get_subtypes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/types/sql/default/get_subtypes.sql
@@ -2,16 +2,16 @@
 {% if subtype %}
 SELECT DISTINCT typ.typname AS stype,
     (CASE WHEN typ.typcollation > 0 THEN true ELSE false END) AS is_collate
-FROM pg_opclass opc
-    JOIN pg_type typ ON opc.opcintype = typ.oid
+FROM pg_catalog.pg_opclass opc
+    JOIN pg_catalog.pg_type typ ON opc.opcintype = typ.oid
 WHERE opc.opcmethod = 403
 ORDER BY 1
 {% endif %}
 {### To fill subtype opclass combobox ###}
 {% if subtype_opclass and data and data.typname %}
 SELECT opc.opcname
-FROM pg_opclass opc
-    JOIN pg_type typ ON opc.opcintype=typ.oid
+FROM pg_catalog.pg_opclass opc
+    JOIN pg_catalog.pg_type typ ON opc.opcintype=typ.oid
     AND typ.typname = {{ data.typname|qtLiteral }}
 WHERE opc.opcmethod = 403
 ORDER BY opcname;
@@ -19,8 +19,8 @@ ORDER BY opcname;
 {### To fetch opcinttype from subtype opclass ###}
 {% if get_opcintype and data and data.typname and data.opcname %}
 SELECT opc.opcintype
-FROM pg_opclass opc
-    JOIN pg_type typ ON opc.opcintype=typ.oid
+FROM pg_catalog.pg_opclass opc
+    JOIN pg_catalog.pg_type typ ON opc.opcintype=typ.oid
     AND typ.typname = {{ data.typname|qtLiteral }}
 WHERE opc.opcmethod = 403
     AND opc.opcname = {{ data.opcname|qtLiteral }}
@@ -30,26 +30,26 @@ ORDER BY opcname;
 {% if opcintype %}
 SELECT proname, nspname,
     CASE WHEN length(nspname::text) > 0 AND length(proname::text) > 0  THEN
-        concat(quote_ident(nspname), '.', quote_ident(proname))
+        pg_catalog.concat(quote_ident(nspname), '.', pg_catalog.quote_ident(proname))
     ELSE '' END AS stypdiff
-FROM pg_proc
-    JOIN pg_namespace n ON n.oid=pronamespace
+FROM pg_catalog.pg_proc
+    JOIN pg_catalog.pg_namespace n ON n.oid=pronamespace
 WHERE prorettype = 701
     AND proargtypes = '{{opcintype}} {{opcintype}}'
 ORDER BY proname;
 {% endif %}
 {### To fill canonical combobox ###}
 {% if getoid %}
-SELECT oid FROM pg_type
+SELECT oid FROM pg_catalog.pg_type
 WHERE typname = {{ data.name|qtLiteral }}
 {% endif %}
 {% if canonical and oid %}
 SELECT proname, nspname,
     CASE WHEN length(nspname::text) > 0 AND length(proname::text) > 0  THEN
-        concat(quote_ident(nspname), '.', quote_ident(proname))
+        pg_catalog.concat(quote_ident(nspname), '.', pg_catalog.quote_ident(proname))
     ELSE '' END AS canonical
-FROM pg_proc
-    JOIN pg_namespace n ON n.oid=pronamespace
+FROM pg_catalog.pg_proc
+    JOIN pg_catalog.pg_namespace n ON n.oid=pronamespace
 WHERE prorettype= {{ oid }}
     AND proargtypes = '{{ oid }}'
 ORDER BY proname;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/types/sql/default/get_types.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/types/sql/default/get_types.sql
index 1055ac631..175a8c6e6 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/types/sql/default/get_types.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/types/sql/default/get_types.sql
@@ -1,11 +1,11 @@
 SELECT * FROM
-    (SELECT format_type(t.oid,NULL) AS typname,
+    (SELECT pg_catalog.format_type(t.oid,NULL) AS typname,
     CASE WHEN typelem > 0 THEN typelem ELSE t.oid END AS elemoid,
     typlen, typtype, t.oid, nspname,
     (SELECT COUNT(1) FROM pg_type t2 WHERE t2.typname = t.typname) > 1 AS isdup,
     CASE WHEN t.typcollation != 0 THEN TRUE ELSE FALSE END AS is_collatable
-FROM pg_type t
-   JOIN pg_namespace nsp ON typnamespace=nsp.oid
+FROM pg_catalog.pg_type t
+   JOIN pg_catalog.pg_namespace nsp ON typnamespace=nsp.oid
 WHERE (NOT (typname = 'unknown' AND nspname = 'pg_catalog')) AND typisdefined AND typtype IN ('b', 'c', 'd', 'e', 'r') AND NOT EXISTS (select 1 from pg_class where relnamespace=typnamespace and relname = typname and relkind != 'c') AND (typname not like '_%' OR NOT EXISTS (select 1 from pg_class where relnamespace=typnamespace and relname = substring(typname from 2)::name and relkind != 'c'))  AND nsp.nspname != 'information_schema'
     ) AS dummy
-ORDER BY nspname <> 'pg_catalog', nspname <> 'public', nspname, 1
\ No newline at end of file
+ORDER BY nspname <> 'pg_catalog', nspname <> 'public', nspname, 1
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/types/sql/default/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/types/sql/default/nodes.sql
index de18fc470..5cab7ef1d 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/types/sql/default/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/types/sql/default/nodes.sql
@@ -1,8 +1,8 @@
 SELECT t.oid, t.typname AS name
-FROM pg_type t
-    LEFT OUTER JOIN pg_type e ON e.oid=t.typelem
-    LEFT OUTER JOIN pg_class ct ON ct.oid=t.typrelid AND ct.relkind <> 'c'
-    LEFT OUTER JOIN pg_namespace nsp ON nsp.oid = t.typnamespace
+FROM pg_catalog.pg_type t
+    LEFT OUTER JOIN pg_catalog.pg_type e ON e.oid=t.typelem
+    LEFT OUTER JOIN pg_catalog.pg_class ct ON ct.oid=t.typrelid AND ct.relkind <> 'c'
+    LEFT OUTER JOIN pg_catalog.pg_namespace nsp ON nsp.oid = t.typnamespace
 WHERE t.typtype != 'd' AND t.typname NOT LIKE E'\\_%' AND t.typnamespace = {{scid}}::oid
 {% if tid %}
     AND t.oid = {{tid}}::oid
@@ -10,4 +10,4 @@ WHERE t.typtype != 'd' AND t.typname NOT LIKE E'\\_%' AND t.typnamespace = {{sci
 {% if not show_system_objects %}
     AND ct.oid is NULL
 {% endif %}
-ORDER BY t.typname;
\ No newline at end of file
+ORDER BY t.typname;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/types/sql/default/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/types/sql/default/properties.sql
index 83c6a6a9d..09728bf20 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/types/sql/default/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/types/sql/default/properties.sql
@@ -1,19 +1,19 @@
 SELECT t.oid, t.typname AS name,
     (CASE WHEN CAST(coalesce(t.typcollation, '0') AS integer) = 100 THEN true ElSE false END) AS is_collatable,
     t.typacl AS type_acl,
-    t.*, format_type(t.oid, null) AS alias,
-    pg_get_userbyid(t.typowner) as typeowner, e.typname as element,
+    t.*, pg_catalog.format_type(t.oid, null) AS alias,
+    pg_catalog.pg_get_userbyid(t.typowner) as typeowner, e.typname as element,
     description, ct.oid AS taboid,
     nsp.nspname AS schema,
     --MinimumVersion 9.1 START
-    (SELECT array_agg(provider || '=' || label) FROM pg_seclabel sl1 WHERE sl1.objoid=t.oid) AS seclabels,
+    (SELECT pg_catalog.array_agg(provider || '=' || label) FROM pg_catalog.pg_seclabel sl1 WHERE sl1.objoid=t.oid) AS seclabels,
     -- END
     (CASE WHEN (t.oid <= {{ datlastsysoid}}::oid OR ct.oid != 0) THEN true ElSE false END) AS is_sys_type
-FROM pg_type t
-    LEFT OUTER JOIN pg_type e ON e.oid=t.typelem
-    LEFT OUTER JOIN pg_class ct ON ct.oid=t.typrelid AND ct.relkind <> 'c'
-    LEFT OUTER JOIN pg_description des ON (des.objoid=t.oid AND des.classoid='pg_type'::regclass)
-    LEFT OUTER JOIN pg_namespace nsp ON nsp.oid = t.typnamespace
+FROM pg_catalog.pg_type t
+    LEFT OUTER JOIN pg_catalog.pg_type e ON e.oid=t.typelem
+    LEFT OUTER JOIN pg_catalog.pg_class ct ON ct.oid=t.typrelid AND ct.relkind <> 'c'
+    LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=t.oid AND des.classoid='pg_type'::regclass)
+    LEFT OUTER JOIN pg_catalog.pg_namespace nsp ON nsp.oid = t.typnamespace
 WHERE t.typtype != 'd' AND t.typname NOT LIKE E'\\_%' AND t.typnamespace = {{scid}}::oid
 {% if tid %}
     AND t.oid = {{tid}}::oid
@@ -21,4 +21,4 @@ WHERE t.typtype != 'd' AND t.typname NOT LIKE E'\\_%' AND t.typnamespace = {{sci
 {% if not show_system_objects %}
     AND ct.oid is NULL
 {% endif %}
-ORDER BY t.typname;
\ No newline at end of file
+ORDER BY t.typname;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.3_plus/sql/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.3_plus/sql/acl.sql
index 6c18f409e..c48706cc1 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.3_plus/sql/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.3_plus/sql/acl.sql
@@ -4,8 +4,8 @@ SELECT
     'datacl' as deftype,
     COALESCE(gt.rolname, 'PUBLIC') grantee,
     g.rolname grantor,
-    array_agg(privilege_type) as privileges,
-    array_agg(is_grantable) as grantable
+    pg_catalog.array_agg(privilege_type) as privileges,
+    pg_catalog.array_agg(is_grantable) as grantable
 FROM
     (SELECT
         d.grantee,
@@ -25,13 +25,13 @@ FROM
         (SELECT
             relacl
          FROM
-            pg_class cl
-         LEFT OUTER JOIN pg_shdescription descr ON
+            pg_catalog.pg_class cl
+         LEFT OUTER JOIN pg_catalog.pg_shdescription descr ON
             (cl.oid=descr.objoid AND descr.classoid='pg_class'::regclass)
          WHERE
             cl.oid = {{ vid }}::OID AND relkind = 'm'
         ) acl,
-        aclexplode(relacl) d
+        pg_catalog.aclexplode(relacl) d
     ) d
 LEFT JOIN pg_catalog.pg_roles g ON (d.grantor = g.oid)
 LEFT JOIN pg_catalog.pg_roles gt ON (d.grantee = gt.oid)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.3_plus/sql/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.3_plus/sql/delete.sql
index 65c9cb010..bae4dfb9e 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.3_plus/sql/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.3_plus/sql/delete.sql
@@ -4,8 +4,8 @@ SELECT
     c.relname As name,
     nsp.nspname
 FROM
-    pg_class c
-LEFT JOIN pg_namespace nsp ON c.relnamespace = nsp.oid
+    pg_catalog.pg_class c
+LEFT JOIN pg_catalog.pg_namespace nsp ON c.relnamespace = nsp.oid
 WHERE
     c.relfilenode = {{ vid }};
 {% elif (name and nspname) %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.3_plus/sql/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.3_plus/sql/get_oid.sql
index 453c2444e..d56a189bb 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.3_plus/sql/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.3_plus/sql/get_oid.sql
@@ -3,7 +3,7 @@
 SELECT
     c.relnamespace as scid
 FROM
-    pg_class c
+    pg_catalog.pg_class c
 WHERE
     c.oid = {{vid}}::oid;
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.3_plus/sql/get_schema.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.3_plus/sql/get_schema.sql
index bcc3d1cc3..df31e8e71 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.3_plus/sql/get_schema.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.3_plus/sql/get_schema.sql
@@ -2,6 +2,6 @@
 SELECT
     nspname
 FROM
-    pg_namespace
+    pg_catalog.pg_namespace
 WHERE
     oid = {{ scid }}::oid;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.3_plus/sql/get_view_name.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.3_plus/sql/get_view_name.sql
index 29ca63872..87bb97cb5 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.3_plus/sql/get_view_name.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.3_plus/sql/get_view_name.sql
@@ -4,8 +4,8 @@ SELECT
     c.relname AS name,
     nsp.nspname AS schema
 FROM
-    pg_class c
-    LEFT OUTER JOIN pg_namespace nsp on nsp.oid = c.relnamespace
+    pg_catalog.pg_class c
+    LEFT OUTER JOIN pg_catalog.pg_namespace nsp on nsp.oid = c.relnamespace
 WHERE
     c.oid = {{vid}}
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.3_plus/sql/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.3_plus/sql/nodes.sql
index b6e7373cb..d74d1f1a5 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.3_plus/sql/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.3_plus/sql/nodes.sql
@@ -1,7 +1,7 @@
 SELECT
     c.oid,
     c.relname AS name
-FROM pg_class c
+FROM pg_catalog.pg_class c
 WHERE
   c.relkind = 'm'
 {% if (vid and datlastsysoid) %}
@@ -10,4 +10,4 @@ WHERE
     AND c.relnamespace = {{scid}}::oid
 ORDER BY
     c.relname
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.3_plus/sql/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.3_plus/sql/properties.sql
index 39b435cb8..d63c1b7cd 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.3_plus/sql/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.3_plus/sql/properties.sql
@@ -7,77 +7,77 @@ SELECT
     c.reltablespace AS spcoid,
     c.relispopulated AS with_data,
     CASE WHEN length(spcname::text) > 0 THEN spcname ELSE
-        (SELECT sp.spcname FROM pg_database dtb
-        JOIN pg_tablespace sp ON dtb.dattablespace=sp.oid
+        (SELECT sp.spcname FROM pg_catalog.pg_database dtb
+        JOIN pg_catalog.pg_tablespace sp ON dtb.dattablespace=sp.oid
         WHERE dtb.oid = {{ did }}::oid)
     END as spcname,
     c.relacl,
     nsp.nspname as schema,
-    pg_get_userbyid(c.relowner) AS owner,
+    pg_catalog.pg_get_userbyid(c.relowner) AS owner,
     description AS comment,
-    pg_get_viewdef(c.oid, true) AS definition,
+    pg_catalog.pg_get_viewdef(c.oid, true) AS definition,
     {# ============= Checks if it is system view ================ #}
     {% if vid and datlastsysoid %}
     CASE WHEN {{vid}} <= {{datlastsysoid}} THEN True ELSE False END AS system_view,
     {% endif %}
-    array_to_string(c.relacl::text[], ', ') AS acl,
-    (SELECT array_agg(provider || '=' || label) FROM pg_seclabels sl1 WHERE sl1.objoid=c.oid AND sl1.objsubid=0) AS seclabels,
-    substring(array_to_string(c.reloptions, ',')
+    pg_catalog.array_to_string(c.relacl::text[], ', ') AS acl,
+    (SELECT pg_catalog.array_agg(provider || '=' || label) FROM pg_catalog.pg_seclabels sl1 WHERE sl1.objoid=c.oid AND sl1.objsubid=0) AS seclabels,
+    substring(pg_catalog.array_to_string(c.reloptions, ',')
       FROM 'fillfactor=([0-9]*)') AS fillfactor,
-    (substring(array_to_string(c.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS autovacuum_enabled,
-    substring(array_to_string(c.reloptions, ',')
+    (substring(pg_catalog.array_to_string(c.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS autovacuum_enabled,
+    substring(pg_catalog.array_to_string(c.reloptions, ',')
       FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS autovacuum_vacuum_threshold,
-    substring(array_to_string(c.reloptions, ',')
+    substring(pg_catalog.array_to_string(c.reloptions, ',')
       FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_vacuum_scale_factor,
-    substring(array_to_string(c.reloptions, ',')
+    substring(pg_catalog.array_to_string(c.reloptions, ',')
       FROM 'autovacuum_analyze_threshold=([0-9]*)') AS autovacuum_analyze_threshold,
-    substring(array_to_string(c.reloptions, ',')
+    substring(pg_catalog.array_to_string(c.reloptions, ',')
       FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_analyze_scale_factor,
-    substring(array_to_string(c.reloptions, ',')
+    substring(pg_catalog.array_to_string(c.reloptions, ',')
       FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS autovacuum_vacuum_cost_delay,
-    substring(array_to_string(c.reloptions, ',')
+    substring(pg_catalog.array_to_string(c.reloptions, ',')
       FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS autovacuum_vacuum_cost_limit,
-    substring(array_to_string(c.reloptions, ',')
+    substring(pg_catalog.array_to_string(c.reloptions, ',')
       FROM 'autovacuum_freeze_min_age=([0-9]*)') AS autovacuum_freeze_min_age,
-    substring(array_to_string(c.reloptions, ',')
+    substring(pg_catalog.array_to_string(c.reloptions, ',')
       FROM 'autovacuum_freeze_max_age=([0-9]*)') AS autovacuum_freeze_max_age,
-    substring(array_to_string(c.reloptions, ',')
+    substring(pg_catalog.array_to_string(c.reloptions, ',')
       FROM 'autovacuum_freeze_table_age=([0-9]*)') AS autovacuum_freeze_table_age,
-    (substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS toast_autovacuum_enabled,
-    substring(array_to_string(tst.reloptions, ',')
+    (substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS toast_autovacuum_enabled,
+    substring(pg_catalog.array_to_string(tst.reloptions, ',')
       FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS toast_autovacuum_vacuum_threshold,
-    substring(array_to_string(tst.reloptions, ',')
+    substring(pg_catalog.array_to_string(tst.reloptions, ',')
       FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_vacuum_scale_factor,
-    substring(array_to_string(tst.reloptions, ',')
+    substring(pg_catalog.array_to_string(tst.reloptions, ',')
       FROM 'autovacuum_analyze_threshold=([0-9]*)') AS toast_autovacuum_analyze_threshold,
-    substring(array_to_string(tst.reloptions, ',')
+    substring(pg_catalog.array_to_string(tst.reloptions, ',')
       FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_analyze_scale_factor,
-    substring(array_to_string(tst.reloptions, ',')
+    substring(pg_catalog.array_to_string(tst.reloptions, ',')
       FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS toast_autovacuum_vacuum_cost_delay,
-    substring(array_to_string(tst.reloptions, ',')
+    substring(pg_catalog.array_to_string(tst.reloptions, ',')
       FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS toast_autovacuum_vacuum_cost_limit,
-    substring(array_to_string(tst.reloptions, ',')
+    substring(pg_catalog.array_to_string(tst.reloptions, ',')
       FROM 'autovacuum_freeze_min_age=([0-9]*)') AS toast_autovacuum_freeze_min_age,
-    substring(array_to_string(tst.reloptions, ',')
+    substring(pg_catalog.array_to_string(tst.reloptions, ',')
       FROM 'autovacuum_freeze_max_age=([0-9]*)') AS toast_autovacuum_freeze_max_age,
-    substring(array_to_string(tst.reloptions, ',')
+    substring(pg_catalog.array_to_string(tst.reloptions, ',')
       FROM 'autovacuum_freeze_table_age=([0-9]*)') AS toast_autovacuum_freeze_table_age,
     c.reloptions AS reloptions, tst.reloptions AS toast_reloptions,
     (CASE WHEN c.reltoastrelid = 0 THEN false ELSE true END) AS hastoasttable
 FROM
-    pg_class c
-LEFT OUTER JOIN pg_namespace nsp on nsp.oid = c.relnamespace
-LEFT OUTER JOIN pg_tablespace spc on spc.oid=c.reltablespace
-LEFT OUTER JOIN pg_description des ON (des.objoid=c.oid and des.objsubid=0 AND des.classoid='pg_class'::regclass)
-LEFT OUTER JOIN pg_class tst ON tst.oid = c.reltoastrelid
+    pg_catalog.pg_class c
+LEFT OUTER JOIN pg_catalog.pg_namespace nsp on nsp.oid = c.relnamespace
+LEFT OUTER JOIN pg_catalog.pg_tablespace spc on spc.oid=c.reltablespace
+LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=c.oid and des.objsubid=0 AND des.classoid='pg_class'::regclass)
+LEFT OUTER JOIN pg_catalog.pg_class tst ON tst.oid = c.reltoastrelid
     WHERE ((c.relhasrules AND (EXISTS (
         SELECT
             r.rulename
         FROM
-            pg_rewrite r
+            pg_catalog.pg_rewrite r
         WHERE
             ((r.ev_class = c.oid)
-                AND (bpchar(r.ev_type) = '1'::bpchar)) )))
+                AND (pg_catalog.bpchar(r.ev_type) = '1'::bpchar)) )))
             AND (c.relkind = 'm'::char)
           )
 {% if (vid and datlastsysoid) %}
@@ -92,7 +92,7 @@ ORDER BY
 SELECT
     pr.rolname
 FROM
-    pg_roles pr
+    pg_catalog.pg_roles pr
 WHERE
     pr.rolcanlogin
 ORDER BY
@@ -102,7 +102,7 @@ ORDER BY
 SELECT
     nsp.nspname
 FROM
-    pg_namespace nsp
+    pg_catalog.pg_namespace nsp
 WHERE
     (nsp.nspname NOT LIKE E'pg\\_%'
         AND nsp.nspname != 'information_schema')
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.3_plus/sql/view_id.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.3_plus/sql/view_id.sql
index b9d053b70..fe4c57a0e 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.3_plus/sql/view_id.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.3_plus/sql/view_id.sql
@@ -1,6 +1,6 @@
 {# ===== Below will provide view id for last created view ==== #}
 {% if data %}
-SELECT c.oid, c.relname FROM pg_class c
-LEFT OUTER JOIN pg_namespace nsp on nsp.oid = c.relnamespace
+SELECT c.oid, c.relname FROM pg_catalog.pg_class c
+LEFT OUTER JOIN pg_catalog.pg_namespace nsp on nsp.oid = c.relnamespace
 WHERE c.relname = {{ data.name|qtLiteral }} and nsp.nspname = {{ data.schema|qtLiteral }};
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.4_plus/sql/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.4_plus/sql/acl.sql
index 6c18f409e..c48706cc1 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.4_plus/sql/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.4_plus/sql/acl.sql
@@ -4,8 +4,8 @@ SELECT
     'datacl' as deftype,
     COALESCE(gt.rolname, 'PUBLIC') grantee,
     g.rolname grantor,
-    array_agg(privilege_type) as privileges,
-    array_agg(is_grantable) as grantable
+    pg_catalog.array_agg(privilege_type) as privileges,
+    pg_catalog.array_agg(is_grantable) as grantable
 FROM
     (SELECT
         d.grantee,
@@ -25,13 +25,13 @@ FROM
         (SELECT
             relacl
          FROM
-            pg_class cl
-         LEFT OUTER JOIN pg_shdescription descr ON
+            pg_catalog.pg_class cl
+         LEFT OUTER JOIN pg_catalog.pg_shdescription descr ON
             (cl.oid=descr.objoid AND descr.classoid='pg_class'::regclass)
          WHERE
             cl.oid = {{ vid }}::OID AND relkind = 'm'
         ) acl,
-        aclexplode(relacl) d
+        pg_catalog.aclexplode(relacl) d
     ) d
 LEFT JOIN pg_catalog.pg_roles g ON (d.grantor = g.oid)
 LEFT JOIN pg_catalog.pg_roles gt ON (d.grantee = gt.oid)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.4_plus/sql/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.4_plus/sql/delete.sql
index 65c9cb010..bae4dfb9e 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.4_plus/sql/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.4_plus/sql/delete.sql
@@ -4,8 +4,8 @@ SELECT
     c.relname As name,
     nsp.nspname
 FROM
-    pg_class c
-LEFT JOIN pg_namespace nsp ON c.relnamespace = nsp.oid
+    pg_catalog.pg_class c
+LEFT JOIN pg_catalog.pg_namespace nsp ON c.relnamespace = nsp.oid
 WHERE
     c.relfilenode = {{ vid }};
 {% elif (name and nspname) %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.4_plus/sql/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.4_plus/sql/get_oid.sql
index 453c2444e..d56a189bb 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.4_plus/sql/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.4_plus/sql/get_oid.sql
@@ -3,7 +3,7 @@
 SELECT
     c.relnamespace as scid
 FROM
-    pg_class c
+    pg_catalog.pg_class c
 WHERE
     c.oid = {{vid}}::oid;
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.4_plus/sql/get_schema.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.4_plus/sql/get_schema.sql
index bcc3d1cc3..df31e8e71 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.4_plus/sql/get_schema.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.4_plus/sql/get_schema.sql
@@ -2,6 +2,6 @@
 SELECT
     nspname
 FROM
-    pg_namespace
+    pg_catalog.pg_namespace
 WHERE
     oid = {{ scid }}::oid;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.4_plus/sql/get_view_name.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.4_plus/sql/get_view_name.sql
index 29ca63872..87bb97cb5 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.4_plus/sql/get_view_name.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.4_plus/sql/get_view_name.sql
@@ -4,8 +4,8 @@ SELECT
     c.relname AS name,
     nsp.nspname AS schema
 FROM
-    pg_class c
-    LEFT OUTER JOIN pg_namespace nsp on nsp.oid = c.relnamespace
+    pg_catalog.pg_class c
+    LEFT OUTER JOIN pg_catalog.pg_namespace nsp on nsp.oid = c.relnamespace
 WHERE
     c.oid = {{vid}}
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.4_plus/sql/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.4_plus/sql/nodes.sql
index b6e7373cb..d74d1f1a5 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.4_plus/sql/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.4_plus/sql/nodes.sql
@@ -1,7 +1,7 @@
 SELECT
     c.oid,
     c.relname AS name
-FROM pg_class c
+FROM pg_catalog.pg_class c
 WHERE
   c.relkind = 'm'
 {% if (vid and datlastsysoid) %}
@@ -10,4 +10,4 @@ WHERE
     AND c.relnamespace = {{scid}}::oid
 ORDER BY
     c.relname
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.4_plus/sql/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.4_plus/sql/properties.sql
index 39b435cb8..d63c1b7cd 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.4_plus/sql/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.4_plus/sql/properties.sql
@@ -7,77 +7,77 @@ SELECT
     c.reltablespace AS spcoid,
     c.relispopulated AS with_data,
     CASE WHEN length(spcname::text) > 0 THEN spcname ELSE
-        (SELECT sp.spcname FROM pg_database dtb
-        JOIN pg_tablespace sp ON dtb.dattablespace=sp.oid
+        (SELECT sp.spcname FROM pg_catalog.pg_database dtb
+        JOIN pg_catalog.pg_tablespace sp ON dtb.dattablespace=sp.oid
         WHERE dtb.oid = {{ did }}::oid)
     END as spcname,
     c.relacl,
     nsp.nspname as schema,
-    pg_get_userbyid(c.relowner) AS owner,
+    pg_catalog.pg_get_userbyid(c.relowner) AS owner,
     description AS comment,
-    pg_get_viewdef(c.oid, true) AS definition,
+    pg_catalog.pg_get_viewdef(c.oid, true) AS definition,
     {# ============= Checks if it is system view ================ #}
     {% if vid and datlastsysoid %}
     CASE WHEN {{vid}} <= {{datlastsysoid}} THEN True ELSE False END AS system_view,
     {% endif %}
-    array_to_string(c.relacl::text[], ', ') AS acl,
-    (SELECT array_agg(provider || '=' || label) FROM pg_seclabels sl1 WHERE sl1.objoid=c.oid AND sl1.objsubid=0) AS seclabels,
-    substring(array_to_string(c.reloptions, ',')
+    pg_catalog.array_to_string(c.relacl::text[], ', ') AS acl,
+    (SELECT pg_catalog.array_agg(provider || '=' || label) FROM pg_catalog.pg_seclabels sl1 WHERE sl1.objoid=c.oid AND sl1.objsubid=0) AS seclabels,
+    substring(pg_catalog.array_to_string(c.reloptions, ',')
       FROM 'fillfactor=([0-9]*)') AS fillfactor,
-    (substring(array_to_string(c.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS autovacuum_enabled,
-    substring(array_to_string(c.reloptions, ',')
+    (substring(pg_catalog.array_to_string(c.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS autovacuum_enabled,
+    substring(pg_catalog.array_to_string(c.reloptions, ',')
       FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS autovacuum_vacuum_threshold,
-    substring(array_to_string(c.reloptions, ',')
+    substring(pg_catalog.array_to_string(c.reloptions, ',')
       FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_vacuum_scale_factor,
-    substring(array_to_string(c.reloptions, ',')
+    substring(pg_catalog.array_to_string(c.reloptions, ',')
       FROM 'autovacuum_analyze_threshold=([0-9]*)') AS autovacuum_analyze_threshold,
-    substring(array_to_string(c.reloptions, ',')
+    substring(pg_catalog.array_to_string(c.reloptions, ',')
       FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_analyze_scale_factor,
-    substring(array_to_string(c.reloptions, ',')
+    substring(pg_catalog.array_to_string(c.reloptions, ',')
       FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS autovacuum_vacuum_cost_delay,
-    substring(array_to_string(c.reloptions, ',')
+    substring(pg_catalog.array_to_string(c.reloptions, ',')
       FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS autovacuum_vacuum_cost_limit,
-    substring(array_to_string(c.reloptions, ',')
+    substring(pg_catalog.array_to_string(c.reloptions, ',')
       FROM 'autovacuum_freeze_min_age=([0-9]*)') AS autovacuum_freeze_min_age,
-    substring(array_to_string(c.reloptions, ',')
+    substring(pg_catalog.array_to_string(c.reloptions, ',')
       FROM 'autovacuum_freeze_max_age=([0-9]*)') AS autovacuum_freeze_max_age,
-    substring(array_to_string(c.reloptions, ',')
+    substring(pg_catalog.array_to_string(c.reloptions, ',')
       FROM 'autovacuum_freeze_table_age=([0-9]*)') AS autovacuum_freeze_table_age,
-    (substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS toast_autovacuum_enabled,
-    substring(array_to_string(tst.reloptions, ',')
+    (substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS toast_autovacuum_enabled,
+    substring(pg_catalog.array_to_string(tst.reloptions, ',')
       FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS toast_autovacuum_vacuum_threshold,
-    substring(array_to_string(tst.reloptions, ',')
+    substring(pg_catalog.array_to_string(tst.reloptions, ',')
       FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_vacuum_scale_factor,
-    substring(array_to_string(tst.reloptions, ',')
+    substring(pg_catalog.array_to_string(tst.reloptions, ',')
       FROM 'autovacuum_analyze_threshold=([0-9]*)') AS toast_autovacuum_analyze_threshold,
-    substring(array_to_string(tst.reloptions, ',')
+    substring(pg_catalog.array_to_string(tst.reloptions, ',')
       FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_analyze_scale_factor,
-    substring(array_to_string(tst.reloptions, ',')
+    substring(pg_catalog.array_to_string(tst.reloptions, ',')
       FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS toast_autovacuum_vacuum_cost_delay,
-    substring(array_to_string(tst.reloptions, ',')
+    substring(pg_catalog.array_to_string(tst.reloptions, ',')
       FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS toast_autovacuum_vacuum_cost_limit,
-    substring(array_to_string(tst.reloptions, ',')
+    substring(pg_catalog.array_to_string(tst.reloptions, ',')
       FROM 'autovacuum_freeze_min_age=([0-9]*)') AS toast_autovacuum_freeze_min_age,
-    substring(array_to_string(tst.reloptions, ',')
+    substring(pg_catalog.array_to_string(tst.reloptions, ',')
       FROM 'autovacuum_freeze_max_age=([0-9]*)') AS toast_autovacuum_freeze_max_age,
-    substring(array_to_string(tst.reloptions, ',')
+    substring(pg_catalog.array_to_string(tst.reloptions, ',')
       FROM 'autovacuum_freeze_table_age=([0-9]*)') AS toast_autovacuum_freeze_table_age,
     c.reloptions AS reloptions, tst.reloptions AS toast_reloptions,
     (CASE WHEN c.reltoastrelid = 0 THEN false ELSE true END) AS hastoasttable
 FROM
-    pg_class c
-LEFT OUTER JOIN pg_namespace nsp on nsp.oid = c.relnamespace
-LEFT OUTER JOIN pg_tablespace spc on spc.oid=c.reltablespace
-LEFT OUTER JOIN pg_description des ON (des.objoid=c.oid and des.objsubid=0 AND des.classoid='pg_class'::regclass)
-LEFT OUTER JOIN pg_class tst ON tst.oid = c.reltoastrelid
+    pg_catalog.pg_class c
+LEFT OUTER JOIN pg_catalog.pg_namespace nsp on nsp.oid = c.relnamespace
+LEFT OUTER JOIN pg_catalog.pg_tablespace spc on spc.oid=c.reltablespace
+LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=c.oid and des.objsubid=0 AND des.classoid='pg_class'::regclass)
+LEFT OUTER JOIN pg_catalog.pg_class tst ON tst.oid = c.reltoastrelid
     WHERE ((c.relhasrules AND (EXISTS (
         SELECT
             r.rulename
         FROM
-            pg_rewrite r
+            pg_catalog.pg_rewrite r
         WHERE
             ((r.ev_class = c.oid)
-                AND (bpchar(r.ev_type) = '1'::bpchar)) )))
+                AND (pg_catalog.bpchar(r.ev_type) = '1'::bpchar)) )))
             AND (c.relkind = 'm'::char)
           )
 {% if (vid and datlastsysoid) %}
@@ -92,7 +92,7 @@ ORDER BY
 SELECT
     pr.rolname
 FROM
-    pg_roles pr
+    pg_catalog.pg_roles pr
 WHERE
     pr.rolcanlogin
 ORDER BY
@@ -102,7 +102,7 @@ ORDER BY
 SELECT
     nsp.nspname
 FROM
-    pg_namespace nsp
+    pg_catalog.pg_namespace nsp
 WHERE
     (nsp.nspname NOT LIKE E'pg\\_%'
         AND nsp.nspname != 'information_schema')
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.4_plus/sql/view_id.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.4_plus/sql/view_id.sql
index b9d053b70..fe4c57a0e 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.4_plus/sql/view_id.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/pg/9.4_plus/sql/view_id.sql
@@ -1,6 +1,6 @@
 {# ===== Below will provide view id for last created view ==== #}
 {% if data %}
-SELECT c.oid, c.relname FROM pg_class c
-LEFT OUTER JOIN pg_namespace nsp on nsp.oid = c.relnamespace
+SELECT c.oid, c.relname FROM pg_catalog.pg_class c
+LEFT OUTER JOIN pg_catalog.pg_namespace nsp on nsp.oid = c.relnamespace
 WHERE c.relname = {{ data.name|qtLiteral }} and nsp.nspname = {{ data.schema|qtLiteral }};
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/ppas/9.3_plus/sql/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/ppas/9.3_plus/sql/acl.sql
index 841d74982..a658b1764 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/ppas/9.3_plus/sql/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/ppas/9.3_plus/sql/acl.sql
@@ -4,8 +4,8 @@ SELECT
     'datacl' as deftype,
     COALESCE(gt.rolname, 'PUBLIC') grantee,
     g.rolname grantor,
-    array_agg(privilege_type) as privileges,
-    array_agg(is_grantable) as grantable
+    pg_catalog.array_agg(privilege_type) as privileges,
+    pg_catalog.array_agg(is_grantable) as grantable
 FROM
     (SELECT
         d.grantee,
@@ -25,13 +25,13 @@ FROM
         (SELECT
             relacl
          FROM
-            pg_class cl
-         LEFT OUTER JOIN pg_shdescription descr ON
+            pg_catalog.pg_class cl
+         LEFT OUTER JOIN pg_catalog.pg_shdescription descr ON
             (cl.oid=descr.objoid AND descr.classoid='pg_class'::regclass)
          WHERE
             cl.oid = {{ vid }}::OID AND relkind = 'm'
         ) acl,
-        aclexplode(relacl) d
+        pg_catalog.aclexplode(relacl) d
     ) d
 LEFT JOIN pg_catalog.pg_roles g ON (d.grantor = g.oid)
 LEFT JOIN pg_catalog.pg_roles gt ON (d.grantee = gt.oid)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/ppas/9.3_plus/sql/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/ppas/9.3_plus/sql/delete.sql
index 65c9cb010..bae4dfb9e 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/ppas/9.3_plus/sql/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/ppas/9.3_plus/sql/delete.sql
@@ -4,8 +4,8 @@ SELECT
     c.relname As name,
     nsp.nspname
 FROM
-    pg_class c
-LEFT JOIN pg_namespace nsp ON c.relnamespace = nsp.oid
+    pg_catalog.pg_class c
+LEFT JOIN pg_catalog.pg_namespace nsp ON c.relnamespace = nsp.oid
 WHERE
     c.relfilenode = {{ vid }};
 {% elif (name and nspname) %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/ppas/9.3_plus/sql/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/ppas/9.3_plus/sql/get_oid.sql
index 453c2444e..d56a189bb 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/ppas/9.3_plus/sql/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/ppas/9.3_plus/sql/get_oid.sql
@@ -3,7 +3,7 @@
 SELECT
     c.relnamespace as scid
 FROM
-    pg_class c
+    pg_catalog.pg_class c
 WHERE
     c.oid = {{vid}}::oid;
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/ppas/9.3_plus/sql/get_schema.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/ppas/9.3_plus/sql/get_schema.sql
index bcc3d1cc3..df31e8e71 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/ppas/9.3_plus/sql/get_schema.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/ppas/9.3_plus/sql/get_schema.sql
@@ -2,6 +2,6 @@
 SELECT
     nspname
 FROM
-    pg_namespace
+    pg_catalog.pg_namespace
 WHERE
     oid = {{ scid }}::oid;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/ppas/9.3_plus/sql/get_view_name.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/ppas/9.3_plus/sql/get_view_name.sql
index 29ca63872..87bb97cb5 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/ppas/9.3_plus/sql/get_view_name.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/ppas/9.3_plus/sql/get_view_name.sql
@@ -4,8 +4,8 @@ SELECT
     c.relname AS name,
     nsp.nspname AS schema
 FROM
-    pg_class c
-    LEFT OUTER JOIN pg_namespace nsp on nsp.oid = c.relnamespace
+    pg_catalog.pg_class c
+    LEFT OUTER JOIN pg_catalog.pg_namespace nsp on nsp.oid = c.relnamespace
 WHERE
     c.oid = {{vid}}
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/ppas/9.3_plus/sql/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/ppas/9.3_plus/sql/nodes.sql
index b6e7373cb..d74d1f1a5 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/ppas/9.3_plus/sql/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/ppas/9.3_plus/sql/nodes.sql
@@ -1,7 +1,7 @@
 SELECT
     c.oid,
     c.relname AS name
-FROM pg_class c
+FROM pg_catalog.pg_class c
 WHERE
   c.relkind = 'm'
 {% if (vid and datlastsysoid) %}
@@ -10,4 +10,4 @@ WHERE
     AND c.relnamespace = {{scid}}::oid
 ORDER BY
     c.relname
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/ppas/9.3_plus/sql/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/ppas/9.3_plus/sql/properties.sql
index b2d6e4605..52117c044 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/ppas/9.3_plus/sql/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/ppas/9.3_plus/sql/properties.sql
@@ -7,77 +7,77 @@ SELECT
     c.reltablespace AS spcoid,
     c.relispopulated AS with_data,
     CASE WHEN length(spcname::text) > 0 THEN spcname ELSE
-        (SELECT sp.spcname FROM pg_database dtb
-        JOIN pg_tablespace sp ON dtb.dattablespace=sp.oid
+        (SELECT sp.spcname FROM pg_catalog.pg_database dtb
+        JOIN pg_catalog.pg_tablespace sp ON dtb.dattablespace=sp.oid
         WHERE dtb.oid = {{ did }}::oid)
     END as spcname,
     c.relacl,
     nsp.nspname as schema,
-    pg_get_userbyid(c.relowner) AS owner,
+    pg_catalog.pg_get_userbyid(c.relowner) AS owner,
     description AS comment,
-    pg_get_viewdef(c.oid) AS definition,
+    pg_catalog.pg_get_viewdef(c.oid) AS definition,
     {# ============= Checks if it is system view ================ #}
     {% if vid and datlastsysoid %}
     CASE WHEN {{vid}} <= {{datlastsysoid}} THEN True ELSE False END AS system_view,
     {% endif %}
-    array_to_string(c.relacl::text[], ', ') AS acl,
-    (SELECT array_agg(provider || '=' || label) FROM pg_seclabels sl1 WHERE sl1.objoid=c.oid AND sl1.objsubid=0) AS seclabels,
-    substring(array_to_string(c.reloptions, ',')
+    pg_catalog.array_to_string(c.relacl::text[], ', ') AS acl,
+    (SELECT pg_catalog.array_agg(provider || '=' || label) FROM pg_catalog.pg_seclabels sl1 WHERE sl1.objoid=c.oid AND sl1.objsubid=0) AS seclabels,
+    substring(pg_catalog.array_to_string(c.reloptions, ',')
       FROM 'fillfactor=([0-9]*)') AS fillfactor,
-    (substring(array_to_string(c.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS autovacuum_enabled,
-    substring(array_to_string(c.reloptions, ',')
+    (substring(pg_catalog.array_to_string(c.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS autovacuum_enabled,
+    substring(pg_catalog.array_to_string(c.reloptions, ',')
       FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS autovacuum_vacuum_threshold,
-    substring(array_to_string(c.reloptions, ',')
+    substring(pg_catalog.array_to_string(c.reloptions, ',')
       FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_vacuum_scale_factor,
-    substring(array_to_string(c.reloptions, ',')
+    substring(pg_catalog.array_to_string(c.reloptions, ',')
       FROM 'autovacuum_analyze_threshold=([0-9]*)') AS autovacuum_analyze_threshold,
-    substring(array_to_string(c.reloptions, ',')
+    substring(pg_catalog.array_to_string(c.reloptions, ',')
       FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS autovacuum_analyze_scale_factor,
-    substring(array_to_string(c.reloptions, ',')
+    substring(pg_catalog.array_to_string(c.reloptions, ',')
       FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS autovacuum_vacuum_cost_delay,
-    substring(array_to_string(c.reloptions, ',')
+    substring(pg_catalog.array_to_string(c.reloptions, ',')
       FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS autovacuum_vacuum_cost_limit,
-    substring(array_to_string(c.reloptions, ',')
+    substring(pg_catalog.array_to_string(c.reloptions, ',')
       FROM 'autovacuum_freeze_min_age=([0-9]*)') AS autovacuum_freeze_min_age,
-    substring(array_to_string(c.reloptions, ',')
+    substring(pg_catalog.array_to_string(c.reloptions, ',')
       FROM 'autovacuum_freeze_max_age=([0-9]*)') AS autovacuum_freeze_max_age,
-    substring(array_to_string(c.reloptions, ',')
+    substring(pg_catalog.array_to_string(c.reloptions, ',')
       FROM 'autovacuum_freeze_table_age=([0-9]*)') AS autovacuum_freeze_table_age,
-    (substring(array_to_string(tst.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS toast_autovacuum_enabled,
-    substring(array_to_string(tst.reloptions, ',')
+    (substring(pg_catalog.array_to_string(tst.reloptions, ',') FROM 'autovacuum_enabled=([a-z|0-9]*)'))::BOOL AS toast_autovacuum_enabled,
+    substring(pg_catalog.array_to_string(tst.reloptions, ',')
       FROM 'autovacuum_vacuum_threshold=([0-9]*)') AS toast_autovacuum_vacuum_threshold,
-    substring(array_to_string(tst.reloptions, ',')
+    substring(pg_catalog.array_to_string(tst.reloptions, ',')
       FROM 'autovacuum_vacuum_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_vacuum_scale_factor,
-    substring(array_to_string(tst.reloptions, ',')
+    substring(pg_catalog.array_to_string(tst.reloptions, ',')
       FROM 'autovacuum_analyze_threshold=([0-9]*)') AS toast_autovacuum_analyze_threshold,
-    substring(array_to_string(tst.reloptions, ',')
+    substring(pg_catalog.array_to_string(tst.reloptions, ',')
       FROM 'autovacuum_analyze_scale_factor=([0-9]*[.]?[0-9]*)') AS toast_autovacuum_analyze_scale_factor,
-    substring(array_to_string(tst.reloptions, ',')
+    substring(pg_catalog.array_to_string(tst.reloptions, ',')
       FROM 'autovacuum_vacuum_cost_delay=([0-9]*)') AS toast_autovacuum_vacuum_cost_delay,
-    substring(array_to_string(tst.reloptions, ',')
+    substring(pg_catalog.array_to_string(tst.reloptions, ',')
       FROM 'autovacuum_vacuum_cost_limit=([0-9]*)') AS toast_autovacuum_vacuum_cost_limit,
-    substring(array_to_string(tst.reloptions, ',')
+    substring(pg_catalog.array_to_string(tst.reloptions, ',')
       FROM 'autovacuum_freeze_min_age=([0-9]*)') AS toast_autovacuum_freeze_min_age,
-    substring(array_to_string(tst.reloptions, ',')
+    substring(pg_catalog.array_to_string(tst.reloptions, ',')
       FROM 'autovacuum_freeze_max_age=([0-9]*)') AS toast_autovacuum_freeze_max_age,
-    substring(array_to_string(tst.reloptions, ',')
+    substring(pg_catalog.array_to_string(tst.reloptions, ',')
       FROM 'autovacuum_freeze_table_age=([0-9]*)') AS toast_autovacuum_freeze_table_age,
     c.reloptions AS reloptions, tst.reloptions AS toast_reloptions,
     (CASE WHEN c.reltoastrelid = 0 THEN false ELSE true END) AS hastoasttable
 FROM
-    pg_class c
-LEFT OUTER JOIN pg_namespace nsp on nsp.oid = c.relnamespace
-LEFT OUTER JOIN pg_tablespace spc on spc.oid=c.reltablespace
-LEFT OUTER JOIN pg_description des ON (des.objoid=c.oid and des.objsubid=0 AND des.classoid='pg_class'::regclass)
-LEFT OUTER JOIN pg_class tst ON tst.oid = c.reltoastrelid
+    pg_catalog.pg_class c
+LEFT OUTER JOIN pg_catalog.pg_namespace nsp on nsp.oid = c.relnamespace
+LEFT OUTER JOIN pg_catalog.pg_tablespace spc on spc.oid=c.reltablespace
+LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=c.oid and des.objsubid=0 AND des.classoid='pg_class'::regclass)
+LEFT OUTER JOIN pg_catalog.pg_class tst ON tst.oid = c.reltoastrelid
     WHERE ((c.relhasrules AND (EXISTS (
         SELECT
             r.rulename
         FROM
-            pg_rewrite r
+            pg_catalog.pg_rewrite r
         WHERE
             ((r.ev_class = c.oid)
-                AND (bpchar(r.ev_type) = '1'::bpchar)) )))
+                AND (pg_catalog.bpchar(r.ev_type) = '1'::bpchar)) )))
             AND (c.relkind = 'm'::char)
           )
 {% if (vid and datlastsysoid) %}
@@ -92,7 +92,7 @@ ORDER BY
 SELECT
     pr.rolname
 FROM
-    pg_roles pr
+    pg_catalog.pg_roles pr
 WHERE
     pr.rolcanlogin
 ORDER BY
@@ -102,7 +102,7 @@ ORDER BY
 SELECT
     nsp.nspname
 FROM
-    pg_namespace nsp
+    pg_catalog.pg_namespace nsp
 WHERE
     (nsp.nspname NOT LIKE E'pg\\_%'
         AND nsp.nspname != 'information_schema')
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/ppas/9.3_plus/sql/view_id.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/ppas/9.3_plus/sql/view_id.sql
index b9d053b70..fe4c57a0e 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/ppas/9.3_plus/sql/view_id.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/mviews/ppas/9.3_plus/sql/view_id.sql
@@ -1,6 +1,6 @@
 {# ===== Below will provide view id for last created view ==== #}
 {% if data %}
-SELECT c.oid, c.relname FROM pg_class c
-LEFT OUTER JOIN pg_namespace nsp on nsp.oid = c.relnamespace
+SELECT c.oid, c.relname FROM pg_catalog.pg_class c
+LEFT OUTER JOIN pg_catalog.pg_namespace nsp on nsp.oid = c.relnamespace
 WHERE c.relname = {{ data.name|qtLiteral }} and nsp.nspname = {{ data.schema|qtLiteral }};
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.1_plus/sql/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.1_plus/sql/acl.sql
index 564ef2f78..59de7eff9 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.1_plus/sql/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.1_plus/sql/acl.sql
@@ -4,8 +4,8 @@ SELECT
     'datacl' as deftype,
     COALESCE(gt.rolname, 'PUBLIC') grantee,
     g.rolname grantor,
-    array_agg(privilege_type) as privileges,
-    array_agg(is_grantable) as grantable
+    pg_catalog.array_agg(privilege_type) as privileges,
+    pg_catalog.array_agg(is_grantable) as grantable
 FROM
     (SELECT
         d.grantee, d.grantor, d.is_grantable,
@@ -23,8 +23,8 @@ FROM
         (SELECT
             relacl
         FROM
-            pg_class cl
-        LEFT OUTER JOIN pg_shdescription descr ON (
+            pg_catalog.pg_class cl
+        LEFT OUTER JOIN pg_catalog.pg_shdescription descr ON (
             cl.oid=descr.objoid AND descr.classoid='pg_class'::regclass)
         WHERE
             cl.oid = {{ vid }}::OID AND relkind = 'v'
@@ -36,9 +36,9 @@ FROM
             (d).privilege_type AS privilege_type
         FROM
             (SELECT
-                aclexplode(relacl) AS d
+                pg_catalog.aclexplode(relacl) AS d
              FROM
-                pg_class cl1
+                pg_catalog.pg_class cl1
              WHERE
                 cl1.oid = {{ vid }}
             ) a
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.1_plus/sql/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.1_plus/sql/delete.sql
index b1c173f98..6b0305b18 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.1_plus/sql/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.1_plus/sql/delete.sql
@@ -4,8 +4,8 @@ SELECT
     c.relname AS name,
     nsp.nspname
 FROM
-    pg_class c
-LEFT JOIN pg_namespace nsp ON c.relnamespace = nsp.oid
+    pg_catalog.pg_class c
+LEFT JOIN pg_catalog.pg_namespace nsp ON c.relnamespace = nsp.oid
 WHERE
     c.relfilenode = {{ vid }};
 {% elif (name and nspname) %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.1_plus/sql/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.1_plus/sql/get_oid.sql
index 453c2444e..d56a189bb 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.1_plus/sql/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.1_plus/sql/get_oid.sql
@@ -3,7 +3,7 @@
 SELECT
     c.relnamespace as scid
 FROM
-    pg_class c
+    pg_catalog.pg_class c
 WHERE
     c.oid = {{vid}}::oid;
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.1_plus/sql/get_schema.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.1_plus/sql/get_schema.sql
index 3bdb5dcb3..45cf02987 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.1_plus/sql/get_schema.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.1_plus/sql/get_schema.sql
@@ -2,6 +2,6 @@
 SELECT
     nspname
 FROM
-    pg_namespace
+    pg_catalog.pg_namespace
 WHERE
     oid = {{ scid }}::oid;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.1_plus/sql/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.1_plus/sql/nodes.sql
index be1339674..0917d40dc 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.1_plus/sql/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.1_plus/sql/nodes.sql
@@ -1,7 +1,7 @@
 SELECT
     c.oid,
     c.relname AS name
-FROM pg_class c
+FROM pg_catalog.pg_class c
 WHERE
   c.relkind = 'v'
 {% if (vid and datlastsysoid) %}
@@ -10,4 +10,4 @@ WHERE
     AND c.relnamespace = {{scid}}::oid
 ORDER BY
     c.relname
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.1_plus/sql/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.1_plus/sql/properties.sql
index 005af504e..651ae1140 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.1_plus/sql/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.1_plus/sql/properties.sql
@@ -7,33 +7,33 @@ SELECT
     nsp.nspname AS schema,
     description AS comment,
     c.reltablespace AS spcoid,
-    pg_get_userbyid(c.relowner) AS owner,
-    pg_get_viewdef(c.oid, true) AS definition,
-    array_to_string(c.relacl::text[], ', ') AS acl,
+    pg_catalog.pg_get_userbyid(c.relowner) AS owner,
+    pg_catalog.pg_get_viewdef(c.oid, true) AS definition,
+    pg_catalog.array_to_string(c.relacl::text[], ', ') AS acl,
     {#=============Checks if it is system view================#}
     {% if vid and datlastsysoid %}
     CASE WHEN {{vid}} <= {{datlastsysoid}} THEN True ELSE False END AS system_view,
     {% endif %}
     (SELECT
-        array_agg(provider || '=' || label)
+        pg_catalog.array_agg(provider || '=' || label)
      FROM
-        pg_seclabels sl1
+        pg_catalog.pg_seclabels sl1
      WHERE
         sl1.objoid=c.oid AND sl1.objsubid=0
     ) AS seclabels,
 FROM pg_class c
-    LEFT OUTER JOIN pg_namespace nsp on nsp.oid = c.relnamespace
-    LEFT OUTER JOIN pg_tablespace spc on spc.oid=c.reltablespace
-    LEFT OUTER JOIN pg_description des ON (des.objoid=c.oid and des.objsubid=0 AND des.classoid='pg_class'::regclass)
+    LEFT OUTER JOIN pg_catalog.pg_namespace nsp on nsp.oid = c.relnamespace
+    LEFT OUTER JOIN pg_catalog.pg_tablespace spc on spc.oid=c.reltablespace
+    LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=c.oid and des.objsubid=0 AND des.classoid='pg_class'::regclass)
 WHERE ((c.relhasrules
             AND
                 (EXISTS(
                     SELECT
                         r.rulename
                     FROM
-                        pg_rewrite r
+                        pg_catalog.pg_rewrite r
                     WHERE
-                        ((r.ev_class = c.oid) AND (bpchar(r.ev_type) = '1'::bpchar))
+                        ((r.ev_class = c.oid) AND (pg_catalog.bpchar(r.ev_type) = '1'::bpchar))
                 ))
        ) AND (c.relkind = 'v'::char))
 {% if (vid and datlastsysoid) %}
@@ -46,7 +46,7 @@ WHERE ((c.relhasrules
 SELECT
     pr.rolname
 FROM
-    pg_roles pr
+    pg_catalog.pg_roles pr
 WHERE
     pr.rolcanlogin
 ORDER BY
@@ -56,7 +56,7 @@ ORDER BY
 SELECT
     nsp.nspname
 FROM
-    pg_namespace nsp
+    pg_catalog.pg_namespace nsp
 WHERE
     (nsp.nspname NOT LIKE E'pg\\_%'
         AND nsp.nspname != 'information_schema')
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.1_plus/sql/view_id.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.1_plus/sql/view_id.sql
index 4916e090f..8b87a863b 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.1_plus/sql/view_id.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.1_plus/sql/view_id.sql
@@ -1,6 +1,6 @@
 {# ===== Below will provide view id for last created view ===== #}
 {% if data %}
-SELECT c.oid, c.relname FROM pg_class c
-LEFT OUTER JOIN pg_namespace nsp on nsp.oid = c.relnamespace
+SELECT c.oid, c.relname FROM pg_catalog.pg_class c
+LEFT OUTER JOIN pg_catalog.pg_namespace nsp on nsp.oid = c.relnamespace
 WHERE c.relname = {{ data.name |qtLiteral }} and nsp.nspname = '{{ data.schema }}';
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.2_plus/sql/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.2_plus/sql/acl.sql
index 3b50acdd8..38f5400e1 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.2_plus/sql/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.2_plus/sql/acl.sql
@@ -4,8 +4,8 @@ SELECT
     'datacl' as deftype,
     COALESCE(gt.rolname, 'PUBLIC') grantee,
     g.rolname grantor,
-    array_agg(privilege_type) as privileges,
-    array_agg(is_grantable) as grantable
+    pg_catalog.array_agg(privilege_type) as privileges,
+    pg_catalog.array_agg(is_grantable) as grantable
 FROM
     (SELECT
         d.grantee, d.grantor, d.is_grantable,
@@ -23,8 +23,8 @@ FROM
         (SELECT
             relacl
         FROM
-            pg_class cl
-        LEFT OUTER JOIN pg_shdescription descr ON (
+            pg_catalog.pg_class cl
+        LEFT OUTER JOIN pg_catalog.pg_shdescription descr ON (
             cl.oid=descr.objoid AND descr.classoid='pg_class'::regclass)
         WHERE
             cl.oid = {{ vid }}::OID AND relkind = 'v'
@@ -36,9 +36,9 @@ FROM
             (d).privilege_type AS privilege_type
         FROM
             (SELECT
-                aclexplode(relacl) AS d
+                pg_catalog.aclexplode(relacl) AS d
              FROM
-                pg_class cl1
+                pg_catalog.pg_class cl1
              WHERE
                 cl1.oid = {{ vid }}
             ) a
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.2_plus/sql/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.2_plus/sql/delete.sql
index b1c173f98..6b0305b18 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.2_plus/sql/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.2_plus/sql/delete.sql
@@ -4,8 +4,8 @@ SELECT
     c.relname AS name,
     nsp.nspname
 FROM
-    pg_class c
-LEFT JOIN pg_namespace nsp ON c.relnamespace = nsp.oid
+    pg_catalog.pg_class c
+LEFT JOIN pg_catalog.pg_namespace nsp ON c.relnamespace = nsp.oid
 WHERE
     c.relfilenode = {{ vid }};
 {% elif (name and nspname) %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.2_plus/sql/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.2_plus/sql/get_oid.sql
index 453c2444e..d56a189bb 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.2_plus/sql/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.2_plus/sql/get_oid.sql
@@ -3,7 +3,7 @@
 SELECT
     c.relnamespace as scid
 FROM
-    pg_class c
+    pg_catalog.pg_class c
 WHERE
     c.oid = {{vid}}::oid;
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.2_plus/sql/get_schema.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.2_plus/sql/get_schema.sql
index 3bdb5dcb3..45cf02987 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.2_plus/sql/get_schema.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.2_plus/sql/get_schema.sql
@@ -2,6 +2,6 @@
 SELECT
     nspname
 FROM
-    pg_namespace
+    pg_catalog.pg_namespace
 WHERE
     oid = {{ scid }}::oid;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.2_plus/sql/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.2_plus/sql/nodes.sql
index be1339674..0917d40dc 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.2_plus/sql/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.2_plus/sql/nodes.sql
@@ -1,7 +1,7 @@
 SELECT
     c.oid,
     c.relname AS name
-FROM pg_class c
+FROM pg_catalog.pg_class c
 WHERE
   c.relkind = 'v'
 {% if (vid and datlastsysoid) %}
@@ -10,4 +10,4 @@ WHERE
     AND c.relnamespace = {{scid}}::oid
 ORDER BY
     c.relname
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.2_plus/sql/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.2_plus/sql/properties.sql
index 82be52cbe..569479a04 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.2_plus/sql/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.2_plus/sql/properties.sql
@@ -6,9 +6,9 @@ SELECT
     description AS comment,
     c.reltablespace AS spcoid,
     (CASE WHEN length(spc.spcname::text) > 0 THEN spc.spcname ELSE 'pg_default' END) as spcname,
-    pg_get_userbyid(c.relowner) AS owner,
+    pg_catalog.pg_get_userbyid(c.relowner) AS owner,
     description As comment,
-    pg_get_viewdef(c.oid, true) AS definition,
+    pg_catalog.pg_get_viewdef(c.oid, true) AS definition,
     nsp.nspname AS schema,
     array_to_string(c.relacl::text[], ', ') AS acl,
     {#=============Checks if it is system view================#}
@@ -16,26 +16,26 @@ SELECT
     CASE WHEN {{vid}} <= {{datlastsysoid}} THEN True ELSE False END AS system_view,
     {% endif %}
     (SELECT
-        array_agg(provider || '=' || label)
+        pg_catalog.array_agg(provider || '=' || label)
      FROM
-        pg_seclabels sl1
+        pg_catalog.pg_seclabels sl1
      WHERE
         sl1.objoid=c.oid AND sl1.objsubid=0
     ) AS seclabels,
-    (substring(array_to_string(c.reloptions, ',')
+    (substring(pg_catalog.array_to_string(c.reloptions, ',')
         FROM 'security_barrier=([a-z|0-9]*)'))::boolean AS security_barrier
 FROM pg_class c
-LEFT OUTER JOIN pg_namespace nsp on nsp.oid = c.relnamespace
-LEFT OUTER JOIN pg_tablespace spc on spc.oid=c.reltablespace
-LEFT OUTER JOIN pg_description des ON (des.objoid=c.oid and des.objsubid=0 AND des.classoid='pg_class'::regclass)
+LEFT OUTER JOIN pg_catalog.pg_namespace nsp on nsp.oid = c.relnamespace
+LEFT OUTER JOIN pg_catalog.pg_tablespace spc on spc.oid=c.reltablespace
+LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=c.oid and des.objsubid=0 AND des.classoid='pg_class'::regclass)
     WHERE ((c.relhasrules AND (EXISTS (
             SELECT
                 r.rulename
             FROM
-                pg_rewrite r
+                pg_catalog.pg_rewrite r
             WHERE
                 ((r.ev_class = c.oid)
-                    AND (bpchar(r.ev_type) = '1'::bpchar)
+                    AND (pg_catalog.bpchar(r.ev_type) = '1'::bpchar)
                 ) ))
            ) AND (c.relkind = 'v'::char)
           )
@@ -49,7 +49,7 @@ LEFT OUTER JOIN pg_description des ON (des.objoid=c.oid and des.objsubid=0 AND d
 SELECT
     pr.rolname
 FROM
-    pg_roles pr
+    pg_catalog.pg_roles pr
 WHERE
     pr.rolcanlogin
 ORDER BY
@@ -59,7 +59,7 @@ ORDER BY
 SELECT
     nsp.nspname
 FROM
-    pg_namespace nsp
+    pg_catalog.pg_namespace nsp
 WHERE
     (nsp.nspname NOT LIKE E'pg\\_%'
         AND nsp.nspname != 'information_schema')
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.2_plus/sql/view_id.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.2_plus/sql/view_id.sql
index 4916e090f..8b87a863b 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.2_plus/sql/view_id.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.2_plus/sql/view_id.sql
@@ -1,6 +1,6 @@
 {# ===== Below will provide view id for last created view ===== #}
 {% if data %}
-SELECT c.oid, c.relname FROM pg_class c
-LEFT OUTER JOIN pg_namespace nsp on nsp.oid = c.relnamespace
+SELECT c.oid, c.relname FROM pg_catalog.pg_class c
+LEFT OUTER JOIN pg_catalog.pg_namespace nsp on nsp.oid = c.relnamespace
 WHERE c.relname = {{ data.name |qtLiteral }} and nsp.nspname = '{{ data.schema }}';
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.3_plus/sql/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.3_plus/sql/acl.sql
index 5993f549a..76b9f19e3 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.3_plus/sql/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.3_plus/sql/acl.sql
@@ -4,8 +4,8 @@ SELECT
     'datacl' as deftype,
     COALESCE(gt.rolname, 'PUBLIC') grantee,
     g.rolname grantor,
-    array_agg(privilege_type) as privileges,
-    array_agg(is_grantable) as grantable
+    pg_catalog.array_agg(privilege_type) as privileges,
+    pg_catalog.array_agg(is_grantable) as grantable
 FROM
     (SELECT
         d.grantee, d.grantor, d.is_grantable,
@@ -23,12 +23,12 @@ FROM
         (SELECT
             relacl
         FROM
-            pg_class cl
-        LEFT OUTER JOIN pg_shdescription descr ON (
+            pg_catalog.pg_class cl
+        LEFT OUTER JOIN pg_catalog.pg_shdescription descr ON (
             cl.oid=descr.objoid AND descr.classoid='pg_class'::regclass)
         WHERE cl.oid = {{ vid }}::OID AND relkind = 'v'
         ) acl,
-        aclexplode(relacl) d
+        pg_catalog.aclexplode(relacl) d
     ) d
 LEFT JOIN pg_catalog.pg_roles g ON (d.grantor = g.oid)
 LEFT JOIN pg_catalog.pg_roles gt ON (d.grantee = gt.oid)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.3_plus/sql/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.3_plus/sql/delete.sql
index b1c173f98..6b0305b18 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.3_plus/sql/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.3_plus/sql/delete.sql
@@ -4,8 +4,8 @@ SELECT
     c.relname AS name,
     nsp.nspname
 FROM
-    pg_class c
-LEFT JOIN pg_namespace nsp ON c.relnamespace = nsp.oid
+    pg_catalog.pg_class c
+LEFT JOIN pg_catalog.pg_namespace nsp ON c.relnamespace = nsp.oid
 WHERE
     c.relfilenode = {{ vid }};
 {% elif (name and nspname) %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.3_plus/sql/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.3_plus/sql/get_oid.sql
index 453c2444e..d56a189bb 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.3_plus/sql/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.3_plus/sql/get_oid.sql
@@ -3,7 +3,7 @@
 SELECT
     c.relnamespace as scid
 FROM
-    pg_class c
+    pg_catalog.pg_class c
 WHERE
     c.oid = {{vid}}::oid;
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.3_plus/sql/get_schema.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.3_plus/sql/get_schema.sql
index 3bdb5dcb3..45cf02987 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.3_plus/sql/get_schema.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.3_plus/sql/get_schema.sql
@@ -2,6 +2,6 @@
 SELECT
     nspname
 FROM
-    pg_namespace
+    pg_catalog.pg_namespace
 WHERE
     oid = {{ scid }}::oid;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.3_plus/sql/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.3_plus/sql/nodes.sql
index be1339674..0917d40dc 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.3_plus/sql/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.3_plus/sql/nodes.sql
@@ -1,7 +1,7 @@
 SELECT
     c.oid,
     c.relname AS name
-FROM pg_class c
+FROM pg_catalog.pg_class c
 WHERE
   c.relkind = 'v'
 {% if (vid and datlastsysoid) %}
@@ -10,4 +10,4 @@ WHERE
     AND c.relnamespace = {{scid}}::oid
 ORDER BY
     c.relname
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.3_plus/sql/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.3_plus/sql/properties.sql
index 45f9a769d..d01bd95f8 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.3_plus/sql/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.3_plus/sql/properties.sql
@@ -9,34 +9,34 @@ SELECT
     nsp.nspname AS schema,
     c.reltablespace AS spcoid,
     c.relispopulated AS ispopulated,
-    pg_get_userbyid(c.relowner) AS owner,
-    array_to_string(c.relacl::text[], ', ') AS acl,
-    pg_get_viewdef(c.oid, true) AS definition,
+    pg_catalog.pg_get_userbyid(c.relowner) AS owner,
+    pg_catalog.array_to_string(c.relacl::text[], ', ') AS acl,
+    pg_catalog.pg_get_viewdef(c.oid, true) AS definition,
     {# ===== Checks if it is system view ===== #}
     {% if vid and datlastsysoid %}
     CASE WHEN {{vid}} <= {{datlastsysoid}} THEN True ELSE False END AS system_view,
     {% endif %}
     (SELECT
-        array_agg(provider || '=' || label)
+        pg_catalog.array_agg(provider || '=' || label)
      FROM
-        pg_seclabels sl1
+        pg_catalog.pg_seclabels sl1
      WHERE
         sl1.objoid=c.oid AND sl1.objsubid=0
     ) AS seclabels,
-    (substring(array_to_string(c.reloptions, ',')
+    (substring(pg_catalog.array_to_string(c.reloptions, ',')
         FROM 'security_barrier=([a-z|0-9]*)'))::boolean AS security_barrier
 FROM pg_class c
-LEFT OUTER JOIN pg_namespace nsp on nsp.oid = c.relnamespace
-LEFT OUTER JOIN pg_tablespace spc on spc.oid=c.reltablespace
-LEFT OUTER JOIN pg_description des ON (des.objoid=c.oid and des.objsubid=0 AND des.classoid='pg_class'::regclass)
+LEFT OUTER JOIN pg_catalog.pg_namespace nsp on nsp.oid = c.relnamespace
+LEFT OUTER JOIN pg_catalog.pg_tablespace spc on spc.oid=c.reltablespace
+LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=c.oid and des.objsubid=0 AND des.classoid='pg_class'::regclass)
     WHERE ((c.relhasrules AND (EXISTS (
         SELECT
             r.rulename
         FROM
-            pg_rewrite r
+            pg_catalog.pg_rewrite r
         WHERE
             ((r.ev_class = c.oid)
-                AND (bpchar(r.ev_type) = '1'::bpchar)) )))
+                AND (pg_catalog.bpchar(r.ev_type) = '1'::bpchar)) )))
             AND (c.relkind = 'v'::char)
           )
 {% if (vid and datlastsysoid) %}
@@ -51,7 +51,7 @@ ORDER BY
 SELECT
     pr.rolname
 FROM
-    pg_roles pr
+    pg_catalog.pg_roles pr
 WHERE
     pr.rolcanlogin
 ORDER BY
@@ -61,7 +61,7 @@ ORDER BY
 SELECT
     nsp.nspname
 FROM
-    pg_namespace nsp
+    pg_catalog.pg_namespace nsp
 WHERE
     (nsp.nspname NOT LIKE E'pg\\_%'
         AND nsp.nspname != 'information_schema')
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.3_plus/sql/view_id.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.3_plus/sql/view_id.sql
index 4916e090f..8b87a863b 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.3_plus/sql/view_id.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.3_plus/sql/view_id.sql
@@ -1,6 +1,6 @@
 {# ===== Below will provide view id for last created view ===== #}
 {% if data %}
-SELECT c.oid, c.relname FROM pg_class c
-LEFT OUTER JOIN pg_namespace nsp on nsp.oid = c.relnamespace
+SELECT c.oid, c.relname FROM pg_catalog.pg_class c
+LEFT OUTER JOIN pg_catalog.pg_namespace nsp on nsp.oid = c.relnamespace
 WHERE c.relname = {{ data.name |qtLiteral }} and nsp.nspname = '{{ data.schema }}';
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.4_plus/sql/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.4_plus/sql/acl.sql
index 59665e5d5..45bc121ce 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.4_plus/sql/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.4_plus/sql/acl.sql
@@ -4,8 +4,8 @@ SELECT
     'datacl' as deftype,
     COALESCE(gt.rolname, 'PUBLIC') grantee,
     g.rolname grantor,
-    array_agg(privilege_type) as privileges,
-    array_agg(is_grantable) as grantable
+    pg_catalog.array_agg(privilege_type) as privileges,
+    pg_catalog.array_agg(is_grantable) as grantable
 FROM
     (SELECT
         d.grantee, d.grantor, d.is_grantable,
@@ -23,13 +23,13 @@ FROM
         (SELECT
             relacl
          FROM
-            pg_class cl
-         LEFT OUTER JOIN pg_shdescription descr ON
+            pg_catalog.pg_class cl
+         LEFT OUTER JOIN pg_catalog.pg_shdescription descr ON
             (cl.oid=descr.objoid AND descr.classoid='pg_class'::regclass)
          WHERE
             cl.oid = {{ vid }}::OID AND relkind = 'v'
         ) acl,
-        aclexplode(relacl) d
+        pg_catalog.aclexplode(relacl) d
     ) d
 LEFT JOIN pg_catalog.pg_roles g ON (d.grantor = g.oid)
 LEFT JOIN pg_catalog.pg_roles gt ON (d.grantee = gt.oid)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.4_plus/sql/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.4_plus/sql/delete.sql
index 788a0c2a6..1d6611fe5 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.4_plus/sql/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.4_plus/sql/delete.sql
@@ -4,8 +4,8 @@ SELECT
     c.relname AS name,
     nsp.nspname
 FROM
-    pg_class c
-LEFT JOIN pg_namespace nsp ON c.relnamespace = nsp.oid
+    pg_catalog.pg_class c
+LEFT JOIN pg_catalog.pg_namespace nsp ON c.relnamespace = nsp.oid
 WHERE
     c.relfilenode = {{ vid }};
 {% elif (name and nspname) %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.4_plus/sql/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.4_plus/sql/get_oid.sql
index 453c2444e..d56a189bb 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.4_plus/sql/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.4_plus/sql/get_oid.sql
@@ -3,7 +3,7 @@
 SELECT
     c.relnamespace as scid
 FROM
-    pg_class c
+    pg_catalog.pg_class c
 WHERE
     c.oid = {{vid}}::oid;
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.4_plus/sql/get_schema.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.4_plus/sql/get_schema.sql
index 3bdb5dcb3..45cf02987 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.4_plus/sql/get_schema.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.4_plus/sql/get_schema.sql
@@ -2,6 +2,6 @@
 SELECT
     nspname
 FROM
-    pg_namespace
+    pg_catalog.pg_namespace
 WHERE
     oid = {{ scid }}::oid;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.4_plus/sql/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.4_plus/sql/nodes.sql
index be1339674..0917d40dc 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.4_plus/sql/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.4_plus/sql/nodes.sql
@@ -1,7 +1,7 @@
 SELECT
     c.oid,
     c.relname AS name
-FROM pg_class c
+FROM pg_catalog.pg_class c
 WHERE
   c.relkind = 'v'
 {% if (vid and datlastsysoid) %}
@@ -10,4 +10,4 @@ WHERE
     AND c.relnamespace = {{scid}}::oid
 ORDER BY
     c.relname
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.4_plus/sql/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.4_plus/sql/properties.sql
index aa749ff35..31f47eb0a 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.4_plus/sql/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.4_plus/sql/properties.sql
@@ -10,33 +10,33 @@ SELECT
     c.reltablespace AS spcoid,
     nsp.nspname AS schema,
     c.relispopulated AS ispopulated,
-    pg_get_userbyid(c.relowner) AS owner,
-    array_to_string(c.relacl::text[], ', ') AS acl,
-    pg_get_viewdef(c.oid, true) AS definition,
+    pg_catalog.pg_get_userbyid(c.relowner) AS owner,
+    pg_catalog.array_to_string(c.relacl::text[], ', ') AS acl,
+    pg_catalog.pg_get_viewdef(c.oid, true) AS definition,
     {# ===== Checks if it is system view ===== #}
     {% if vid and datlastsysoid %}
     CASE WHEN {{vid}} <= {{datlastsysoid}} THEN True ELSE False END AS system_view,
     {% endif %}
     (SELECT
-        array_agg(provider || '=' || label)
+        pg_catalog.array_agg(provider || '=' || label)
      FROM
-        pg_seclabels sl1
+        pg_catalog.pg_seclabels sl1
      WHERE
         sl1.objoid=c.oid AND sl1.objsubid=0
     ) AS seclabels,
-    substring(array_to_string(c.reloptions, ',')
+    substring(pg_catalog.array_to_string(c.reloptions, ',')
         FROM 'check_option=([a-z]*)') AS check_option,
-    (substring(array_to_string(c.reloptions, ',')
+    (substring(pg_catalog.array_to_string(c.reloptions, ',')
         FROM 'security_barrier=([a-z|0-9]*)'))::boolean AS security_barrier
-FROM pg_class c
-LEFT OUTER JOIN pg_namespace nsp on nsp.oid = c.relnamespace
-LEFT OUTER JOIN pg_tablespace spc on spc.oid=c.reltablespace
-LEFT OUTER JOIN pg_description des ON (des.objoid=c.oid and des.objsubid=0 AND des.classoid='pg_class'::regclass)
+FROM pg_catalog.pg_class c
+LEFT OUTER JOIN pg_catalog.pg_namespace nsp on nsp.oid = c.relnamespace
+LEFT OUTER JOIN pg_catalog.pg_tablespace spc on spc.oid=c.reltablespace
+LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=c.oid and des.objsubid=0 AND des.classoid='pg_class'::regclass)
     WHERE ((c.relhasrules AND (EXISTS (
         SELECT
             r.rulename
         FROM
-            pg_rewrite r
+            pg_catalog.pg_rewrite r
         WHERE
             ((r.ev_class = c.oid)
                 AND (bpchar(r.ev_type) = '1'::bpchar)) )))
@@ -54,7 +54,7 @@ ORDER BY
 SELECT
     pr.rolname
 FROM
-    pg_roles pr
+    pg_catalog.pg_roles pr
 WHERE
     pr.rolcanlogin
 ORDER BY
@@ -64,7 +64,7 @@ ORDER BY
 SELECT
     nsp.nspname
 FROM
-    pg_namespace nsp
+    pg_catalog.pg_namespace nsp
 WHERE
     (nsp.nspname NOT LIKE E'pg\\_%'
         AND nsp.nspname != 'information_schema')
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.4_plus/sql/view_id.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.4_plus/sql/view_id.sql
index 4916e090f..8b87a863b 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.4_plus/sql/view_id.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/pg/9.4_plus/sql/view_id.sql
@@ -1,6 +1,6 @@
 {# ===== Below will provide view id for last created view ===== #}
 {% if data %}
-SELECT c.oid, c.relname FROM pg_class c
-LEFT OUTER JOIN pg_namespace nsp on nsp.oid = c.relnamespace
+SELECT c.oid, c.relname FROM pg_catalog.pg_class c
+LEFT OUTER JOIN pg_catalog.pg_namespace nsp on nsp.oid = c.relnamespace
 WHERE c.relname = {{ data.name |qtLiteral }} and nsp.nspname = '{{ data.schema }}';
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.1_plus/sql/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.1_plus/sql/acl.sql
index 59665e5d5..45bc121ce 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.1_plus/sql/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.1_plus/sql/acl.sql
@@ -4,8 +4,8 @@ SELECT
     'datacl' as deftype,
     COALESCE(gt.rolname, 'PUBLIC') grantee,
     g.rolname grantor,
-    array_agg(privilege_type) as privileges,
-    array_agg(is_grantable) as grantable
+    pg_catalog.array_agg(privilege_type) as privileges,
+    pg_catalog.array_agg(is_grantable) as grantable
 FROM
     (SELECT
         d.grantee, d.grantor, d.is_grantable,
@@ -23,13 +23,13 @@ FROM
         (SELECT
             relacl
          FROM
-            pg_class cl
-         LEFT OUTER JOIN pg_shdescription descr ON
+            pg_catalog.pg_class cl
+         LEFT OUTER JOIN pg_catalog.pg_shdescription descr ON
             (cl.oid=descr.objoid AND descr.classoid='pg_class'::regclass)
          WHERE
             cl.oid = {{ vid }}::OID AND relkind = 'v'
         ) acl,
-        aclexplode(relacl) d
+        pg_catalog.aclexplode(relacl) d
     ) d
 LEFT JOIN pg_catalog.pg_roles g ON (d.grantor = g.oid)
 LEFT JOIN pg_catalog.pg_roles gt ON (d.grantee = gt.oid)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.1_plus/sql/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.1_plus/sql/delete.sql
index b1c173f98..6b0305b18 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.1_plus/sql/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.1_plus/sql/delete.sql
@@ -4,8 +4,8 @@ SELECT
     c.relname AS name,
     nsp.nspname
 FROM
-    pg_class c
-LEFT JOIN pg_namespace nsp ON c.relnamespace = nsp.oid
+    pg_catalog.pg_class c
+LEFT JOIN pg_catalog.pg_namespace nsp ON c.relnamespace = nsp.oid
 WHERE
     c.relfilenode = {{ vid }};
 {% elif (name and nspname) %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.1_plus/sql/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.1_plus/sql/get_oid.sql
index 453c2444e..d56a189bb 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.1_plus/sql/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.1_plus/sql/get_oid.sql
@@ -3,7 +3,7 @@
 SELECT
     c.relnamespace as scid
 FROM
-    pg_class c
+    pg_catalog.pg_class c
 WHERE
     c.oid = {{vid}}::oid;
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.1_plus/sql/get_schema.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.1_plus/sql/get_schema.sql
index 3bdb5dcb3..45cf02987 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.1_plus/sql/get_schema.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.1_plus/sql/get_schema.sql
@@ -2,6 +2,6 @@
 SELECT
     nspname
 FROM
-    pg_namespace
+    pg_catalog.pg_namespace
 WHERE
     oid = {{ scid }}::oid;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.1_plus/sql/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.1_plus/sql/nodes.sql
index be1339674..0917d40dc 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.1_plus/sql/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.1_plus/sql/nodes.sql
@@ -1,7 +1,7 @@
 SELECT
     c.oid,
     c.relname AS name
-FROM pg_class c
+FROM pg_catalog.pg_class c
 WHERE
   c.relkind = 'v'
 {% if (vid and datlastsysoid) %}
@@ -10,4 +10,4 @@ WHERE
     AND c.relnamespace = {{scid}}::oid
 ORDER BY
     c.relname
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.1_plus/sql/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.1_plus/sql/properties.sql
index d81e8723c..cfd0dd764 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.1_plus/sql/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.1_plus/sql/properties.sql
@@ -9,36 +9,36 @@ SELECT
     c.reltablespace AS spcoid,
     nsp.nspname AS schema,
     c.relispopulated AS ispopulated,
-    pg_get_userbyid(c.relowner) AS owner,
-    array_to_string(c.relacl::text[], ', ') AS acl,
-    pg_get_viewdef(c.oid) AS definition,
+    pg_catalog.pg_get_userbyid(c.relowner) AS owner,
+    pg_catalog.array_to_string(c.relacl::text[], ', ') AS acl,
+    pg_catalog.pg_get_viewdef(c.oid) AS definition,
     {# ===== Checks if it is system view ===== #}
     {% if vid and datlastsysoid %}
     CASE WHEN {{vid}} <= {{datlastsysoid}} THEN True ELSE False END AS system_view,
     {% endif %}
     (SELECT
-        array_agg(provider || '=' || label)
+        pg_catalog.array_agg(provider || '=' || label)
      FROM
-        pg_seclabels sl1
+        pg_catalog.pg_seclabels sl1
      WHERE
         sl1.objoid=c.oid AND sl1.objsubid=0
     ) AS seclabels,
-    substring(array_to_string(c.reloptions, ',')
+    substring(pg_catalog.array_to_string(c.reloptions, ',')
         FROM 'check_option=([a-z]*)') AS check_option,
-    (substring(array_to_string(c.reloptions, ',')
+    (substring(pg_catalog.array_to_string(c.reloptions, ',')
         FROM 'security_barrier=([a-z|0-9]*)'))::boolean AS security_barrier
-FROM pg_class c
-LEFT OUTER JOIN pg_namespace nsp on nsp.oid = c.relnamespace
-LEFT OUTER JOIN pg_tablespace spc on spc.oid=c.reltablespace
-LEFT OUTER JOIN pg_description des ON (des.objoid=c.oid and des.objsubid=0 AND des.classoid='pg_class'::regclass)
+FROM pg_catalog.pg_class c
+LEFT OUTER JOIN pg_catalog.pg_namespace nsp on nsp.oid = c.relnamespace
+LEFT OUTER JOIN pg_catalog.pg_tablespace spc on spc.oid=c.reltablespace
+LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=c.oid and des.objsubid=0 AND des.classoid='pg_class'::regclass)
     WHERE ((c.relhasrules AND (EXISTS (
         SELECT
             r.rulename
         FROM
-            pg_rewrite r
+            pg_catalog.pg_rewrite r
         WHERE
             ((r.ev_class = c.oid)
-                AND (bpchar(r.ev_type) = '1'::bpchar)) )))
+                AND (pg_catalog.bpchar(r.ev_type) = '1'::bpchar)) )))
             AND (c.relkind = 'v'::char)
           )
 {% if (vid and datlastsysoid) %}
@@ -53,7 +53,7 @@ ORDER BY
 SELECT
     pr.rolname
 FROM
-    pg_roles pr
+    pg_catalog.pg_roles pr
 WHERE
     pr.rolcanlogin
 ORDER BY
@@ -63,7 +63,7 @@ ORDER BY
 SELECT
     nsp.nspname
 FROM
-    pg_namespace nsp
+    pg_catalog.pg_namespace nsp
 WHERE
     (nsp.nspname NOT LIKE E'pg\\_%'
         AND nsp.nspname != 'information_schema')
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.1_plus/sql/view_id.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.1_plus/sql/view_id.sql
index 445047489..b3ec20da9 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.1_plus/sql/view_id.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.1_plus/sql/view_id.sql
@@ -1,6 +1,6 @@
 {# ===== Below will provide view id for last created view ===== #}
 {% if data %}
-SELECT c.oid, c.relname FROM pg_class c
-LEFT OUTER JOIN pg_namespace nsp on nsp.oid = c.relnamespace
+SELECT c.oid, c.relname FROM pg_catalog.pg_class c
+LEFT OUTER JOIN pg_catalog.pg_namespace nsp on nsp.oid = c.relnamespace
 WHERE c.relname = {{ data.name|qtLiteral }} and nsp.nspname = '{{ data.schema }}';
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.2_plus/sql/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.2_plus/sql/acl.sql
index 3b50acdd8..38f5400e1 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.2_plus/sql/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.2_plus/sql/acl.sql
@@ -4,8 +4,8 @@ SELECT
     'datacl' as deftype,
     COALESCE(gt.rolname, 'PUBLIC') grantee,
     g.rolname grantor,
-    array_agg(privilege_type) as privileges,
-    array_agg(is_grantable) as grantable
+    pg_catalog.array_agg(privilege_type) as privileges,
+    pg_catalog.array_agg(is_grantable) as grantable
 FROM
     (SELECT
         d.grantee, d.grantor, d.is_grantable,
@@ -23,8 +23,8 @@ FROM
         (SELECT
             relacl
         FROM
-            pg_class cl
-        LEFT OUTER JOIN pg_shdescription descr ON (
+            pg_catalog.pg_class cl
+        LEFT OUTER JOIN pg_catalog.pg_shdescription descr ON (
             cl.oid=descr.objoid AND descr.classoid='pg_class'::regclass)
         WHERE
             cl.oid = {{ vid }}::OID AND relkind = 'v'
@@ -36,9 +36,9 @@ FROM
             (d).privilege_type AS privilege_type
         FROM
             (SELECT
-                aclexplode(relacl) AS d
+                pg_catalog.aclexplode(relacl) AS d
              FROM
-                pg_class cl1
+                pg_catalog.pg_class cl1
              WHERE
                 cl1.oid = {{ vid }}
             ) a
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.2_plus/sql/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.2_plus/sql/delete.sql
index b1c173f98..6b0305b18 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.2_plus/sql/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.2_plus/sql/delete.sql
@@ -4,8 +4,8 @@ SELECT
     c.relname AS name,
     nsp.nspname
 FROM
-    pg_class c
-LEFT JOIN pg_namespace nsp ON c.relnamespace = nsp.oid
+    pg_catalog.pg_class c
+LEFT JOIN pg_catalog.pg_namespace nsp ON c.relnamespace = nsp.oid
 WHERE
     c.relfilenode = {{ vid }};
 {% elif (name and nspname) %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.2_plus/sql/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.2_plus/sql/get_oid.sql
index 453c2444e..d56a189bb 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.2_plus/sql/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.2_plus/sql/get_oid.sql
@@ -3,7 +3,7 @@
 SELECT
     c.relnamespace as scid
 FROM
-    pg_class c
+    pg_catalog.pg_class c
 WHERE
     c.oid = {{vid}}::oid;
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.2_plus/sql/get_schema.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.2_plus/sql/get_schema.sql
index 3bdb5dcb3..45cf02987 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.2_plus/sql/get_schema.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.2_plus/sql/get_schema.sql
@@ -2,6 +2,6 @@
 SELECT
     nspname
 FROM
-    pg_namespace
+    pg_catalog.pg_namespace
 WHERE
     oid = {{ scid }}::oid;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.2_plus/sql/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.2_plus/sql/nodes.sql
index be1339674..0917d40dc 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.2_plus/sql/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.2_plus/sql/nodes.sql
@@ -1,7 +1,7 @@
 SELECT
     c.oid,
     c.relname AS name
-FROM pg_class c
+FROM pg_catalog.pg_class c
 WHERE
   c.relkind = 'v'
 {% if (vid and datlastsysoid) %}
@@ -10,4 +10,4 @@ WHERE
     AND c.relnamespace = {{scid}}::oid
 ORDER BY
     c.relname
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.2_plus/sql/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.2_plus/sql/properties.sql
index b29eccf0e..77d3761f5 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.2_plus/sql/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.2_plus/sql/properties.sql
@@ -5,36 +5,36 @@ SELECT
     c.relname AS name,
     c.reltablespace AS spcoid,
     (CASE WHEN length(spc.spcname::text) > 0 THEN spc.spcname ELSE 'pg_default' END) as spcname,
-    pg_get_userbyid(c.relowner) AS owner,
+    pg_catalog.pg_get_userbyid(c.relowner) AS owner,
     description As comment,
-    pg_get_viewdef(c.oid) AS definition,
+    pg_catalog.pg_get_viewdef(c.oid) AS definition,
     nsp.nspname AS schema,
-    array_to_string(c.relacl::text[], ', ') AS acl,
+    pg_catalog.array_to_string(c.relacl::text[], ', ') AS acl,
     {#=============Checks if it is system view================#}
     {% if vid and datlastsysoid %}
     CASE WHEN {{vid}} <= {{datlastsysoid}} THEN True ELSE False END AS system_view,
     {% endif %}
     (SELECT
-        array_agg(provider || '=' || label)
+        pg_catalog.array_agg(provider || '=' || label)
      FROM
-        pg_seclabels sl1
+        pg_catalog.pg_seclabels sl1
      WHERE
         sl1.objoid=c.oid AND sl1.objsubid=0
     ) AS seclabels,
-    (substring(array_to_string(c.reloptions, ',')
+    (substring(pg_catalog.array_to_string(c.reloptions, ',')
         FROM 'security_barrier=([a-z|0-9]*)'))::boolean AS security_barrier
 FROM pg_class c
-LEFT OUTER JOIN pg_namespace nsp on nsp.oid = c.relnamespace
-LEFT OUTER JOIN pg_tablespace spc on spc.oid=c.reltablespace
-LEFT OUTER JOIN pg_description des ON (des.objoid=c.oid and des.objsubid=0 AND des.classoid='pg_class'::regclass)
+LEFT OUTER JOIN pg_catalog.pg_namespace nsp on nsp.oid = c.relnamespace
+LEFT OUTER JOIN pg_catalog.pg_tablespace spc on spc.oid=c.reltablespace
+LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=c.oid and des.objsubid=0 AND des.classoid='pg_class'::regclass)
     WHERE ((c.relhasrules AND (EXISTS (
             SELECT
                 r.rulename
             FROM
-                pg_rewrite r
+                pg_catalog.pg_rewrite r
             WHERE
                 ((r.ev_class = c.oid)
-                    AND (bpchar(r.ev_type) = '1'::bpchar)
+                    AND (pg_catalog.bpchar(r.ev_type) = '1'::bpchar)
                 ) ))
            ) AND (c.relkind = 'v'::char)
           )
@@ -48,7 +48,7 @@ LEFT OUTER JOIN pg_description des ON (des.objoid=c.oid and des.objsubid=0 AND d
 SELECT
     pr.rolname
 FROM
-    pg_roles pr
+    pg_catalog.pg_roles pr
 WHERE
     pr.rolcanlogin
 ORDER BY
@@ -58,7 +58,7 @@ ORDER BY
 SELECT
     nsp.nspname
 FROM
-    pg_namespace nsp
+    pg_catalog.pg_namespace nsp
 WHERE
     (nsp.nspname NOT LIKE E'pg\\_%'
         AND nsp.nspname != 'information_schema')
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.2_plus/sql/view_id.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.2_plus/sql/view_id.sql
index 445047489..b3ec20da9 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.2_plus/sql/view_id.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.2_plus/sql/view_id.sql
@@ -1,6 +1,6 @@
 {# ===== Below will provide view id for last created view ===== #}
 {% if data %}
-SELECT c.oid, c.relname FROM pg_class c
-LEFT OUTER JOIN pg_namespace nsp on nsp.oid = c.relnamespace
+SELECT c.oid, c.relname FROM pg_catalog.pg_class c
+LEFT OUTER JOIN pg_catalog.pg_namespace nsp on nsp.oid = c.relnamespace
 WHERE c.relname = {{ data.name|qtLiteral }} and nsp.nspname = '{{ data.schema }}';
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.3_plus/sql/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.3_plus/sql/acl.sql
index 5993f549a..76b9f19e3 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.3_plus/sql/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.3_plus/sql/acl.sql
@@ -4,8 +4,8 @@ SELECT
     'datacl' as deftype,
     COALESCE(gt.rolname, 'PUBLIC') grantee,
     g.rolname grantor,
-    array_agg(privilege_type) as privileges,
-    array_agg(is_grantable) as grantable
+    pg_catalog.array_agg(privilege_type) as privileges,
+    pg_catalog.array_agg(is_grantable) as grantable
 FROM
     (SELECT
         d.grantee, d.grantor, d.is_grantable,
@@ -23,12 +23,12 @@ FROM
         (SELECT
             relacl
         FROM
-            pg_class cl
-        LEFT OUTER JOIN pg_shdescription descr ON (
+            pg_catalog.pg_class cl
+        LEFT OUTER JOIN pg_catalog.pg_shdescription descr ON (
             cl.oid=descr.objoid AND descr.classoid='pg_class'::regclass)
         WHERE cl.oid = {{ vid }}::OID AND relkind = 'v'
         ) acl,
-        aclexplode(relacl) d
+        pg_catalog.aclexplode(relacl) d
     ) d
 LEFT JOIN pg_catalog.pg_roles g ON (d.grantor = g.oid)
 LEFT JOIN pg_catalog.pg_roles gt ON (d.grantee = gt.oid)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.3_plus/sql/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.3_plus/sql/delete.sql
index b1c173f98..6b0305b18 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.3_plus/sql/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.3_plus/sql/delete.sql
@@ -4,8 +4,8 @@ SELECT
     c.relname AS name,
     nsp.nspname
 FROM
-    pg_class c
-LEFT JOIN pg_namespace nsp ON c.relnamespace = nsp.oid
+    pg_catalog.pg_class c
+LEFT JOIN pg_catalog.pg_namespace nsp ON c.relnamespace = nsp.oid
 WHERE
     c.relfilenode = {{ vid }};
 {% elif (name and nspname) %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.3_plus/sql/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.3_plus/sql/get_oid.sql
index 453c2444e..d56a189bb 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.3_plus/sql/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.3_plus/sql/get_oid.sql
@@ -3,7 +3,7 @@
 SELECT
     c.relnamespace as scid
 FROM
-    pg_class c
+    pg_catalog.pg_class c
 WHERE
     c.oid = {{vid}}::oid;
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.3_plus/sql/get_schema.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.3_plus/sql/get_schema.sql
index 3bdb5dcb3..45cf02987 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.3_plus/sql/get_schema.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.3_plus/sql/get_schema.sql
@@ -2,6 +2,6 @@
 SELECT
     nspname
 FROM
-    pg_namespace
+    pg_catalog.pg_namespace
 WHERE
     oid = {{ scid }}::oid;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.3_plus/sql/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.3_plus/sql/nodes.sql
index be1339674..0917d40dc 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.3_plus/sql/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.3_plus/sql/nodes.sql
@@ -1,7 +1,7 @@
 SELECT
     c.oid,
     c.relname AS name
-FROM pg_class c
+FROM pg_catalog.pg_class c
 WHERE
   c.relkind = 'v'
 {% if (vid and datlastsysoid) %}
@@ -10,4 +10,4 @@ WHERE
     AND c.relnamespace = {{scid}}::oid
 ORDER BY
     c.relname
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.3_plus/sql/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.3_plus/sql/properties.sql
index 8af43c86e..8b0401ae0 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.3_plus/sql/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.3_plus/sql/properties.sql
@@ -9,34 +9,34 @@ SELECT
     nsp.nspname AS schema,
     c.reltablespace AS spcoid,
     c.relispopulated AS ispopulated,
-    pg_get_userbyid(c.relowner) AS owner,
-    array_to_string(c.relacl::text[], ', ') AS acl,
-    pg_get_viewdef(c.oid) AS definition,
+    pg_catalog.pg_get_userbyid(c.relowner) AS owner,
+    pg_catalog.array_to_string(c.relacl::text[], ', ') AS acl,
+    pg_catalog.pg_get_viewdef(c.oid) AS definition,
     {# ===== Checks if it is system view ===== #}
     {% if vid and datlastsysoid %}
     CASE WHEN {{vid}} <= {{datlastsysoid}} THEN True ELSE False END AS system_view,
     {% endif %}
     (SELECT
-        array_agg(provider || '=' || label)
+        pg_catalog.array_agg(provider || '=' || label)
      FROM
-        pg_seclabels sl1
+        pg_catalog.pg_seclabels sl1
      WHERE
         sl1.objoid=c.oid AND sl1.objsubid=0
     ) AS seclabels,
-    (substring(array_to_string(c.reloptions, ',')
+    (substring(pg_catalog.array_to_string(c.reloptions, ',')
         FROM 'security_barrier=([a-z|0-9]*)'))::boolean AS security_barrier
 FROM pg_class c
-LEFT OUTER JOIN pg_namespace nsp on nsp.oid = c.relnamespace
-LEFT OUTER JOIN pg_tablespace spc on spc.oid=c.reltablespace
-LEFT OUTER JOIN pg_description des ON (des.objoid=c.oid and des.objsubid=0 AND des.classoid='pg_class'::regclass)
+LEFT OUTER JOIN pg_catalog.pg_namespace nsp on nsp.oid = c.relnamespace
+LEFT OUTER JOIN pg_catalog.pg_tablespace spc on spc.oid=c.reltablespace
+LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=c.oid and des.objsubid=0 AND des.classoid='pg_class'::regclass)
     WHERE ((c.relhasrules AND (EXISTS (
         SELECT
             r.rulename
         FROM
-            pg_rewrite r
+            pg_catalog.pg_rewrite r
         WHERE
             ((r.ev_class = c.oid)
-                AND (bpchar(r.ev_type) = '1'::bpchar)) )))
+                AND (pg_catalog.bpchar(r.ev_type) = '1'::bpchar)) )))
             AND (c.relkind = 'v'::char)
           )
 {% if (vid and datlastsysoid) %}
@@ -51,7 +51,7 @@ ORDER BY
 SELECT
     pr.rolname
 FROM
-    pg_roles pr
+    pg_catalog.pg_roles pr
 WHERE
     pr.rolcanlogin
 ORDER BY
@@ -61,7 +61,7 @@ ORDER BY
 SELECT
     nsp.nspname
 FROM
-    pg_namespace nsp
+    pg_catalog.pg_namespace nsp
 WHERE
     (nsp.nspname NOT LIKE E'pg\\_%'
         AND nsp.nspname != 'information_schema')
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.3_plus/sql/view_id.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.3_plus/sql/view_id.sql
index 445047489..b3ec20da9 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.3_plus/sql/view_id.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.3_plus/sql/view_id.sql
@@ -1,6 +1,6 @@
 {# ===== Below will provide view id for last created view ===== #}
 {% if data %}
-SELECT c.oid, c.relname FROM pg_class c
-LEFT OUTER JOIN pg_namespace nsp on nsp.oid = c.relnamespace
+SELECT c.oid, c.relname FROM pg_catalog.pg_class c
+LEFT OUTER JOIN pg_catalog.pg_namespace nsp on nsp.oid = c.relnamespace
 WHERE c.relname = {{ data.name|qtLiteral }} and nsp.nspname = '{{ data.schema }}';
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.4_plus/sql/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.4_plus/sql/acl.sql
index 089ad804a..c999dabae 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.4_plus/sql/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.4_plus/sql/acl.sql
@@ -4,8 +4,8 @@ SELECT
     'datacl' as deftype,
     COALESCE(gt.rolname, 'PUBLIC') grantee,
     g.rolname grantor,
-    array_agg(privilege_type) as privileges,
-    array_agg(is_grantable) as grantable
+    pg_catalog.array_agg(privilege_type) as privileges,
+    pg_catalog.array_agg(is_grantable) as grantable
 FROM
     (SELECT
         d.grantee, d.grantor, d.is_grantable,
@@ -23,13 +23,13 @@ FROM
         (SELECT
             relacl
          FROM
-            pg_class cl
-         LEFT OUTER JOIN pg_shdescription descr ON
+            pg_catalog.pg_class cl
+         LEFT OUTER JOIN pg_catalog.pg_shdescription descr ON
             (cl.oid=descr.objoid AND descr.classoid='pg_class'::regclass)
          WHERE
             cl.oid = {{ vid }}::OID AND relkind = 'v'
         ) acl,
-        aclexplode(relacl) d
+        pg_catalog.aclexplode(relacl) d
     ) d
 LEFT JOIN pg_catalog.pg_roles g ON (d.grantor = g.oid)
 LEFT JOIN pg_catalog.pg_roles gt ON (d.grantee = gt.oid)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.4_plus/sql/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.4_plus/sql/delete.sql
index b1c173f98..6b0305b18 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.4_plus/sql/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.4_plus/sql/delete.sql
@@ -4,8 +4,8 @@ SELECT
     c.relname AS name,
     nsp.nspname
 FROM
-    pg_class c
-LEFT JOIN pg_namespace nsp ON c.relnamespace = nsp.oid
+    pg_catalog.pg_class c
+LEFT JOIN pg_catalog.pg_namespace nsp ON c.relnamespace = nsp.oid
 WHERE
     c.relfilenode = {{ vid }};
 {% elif (name and nspname) %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.4_plus/sql/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.4_plus/sql/get_oid.sql
index 453c2444e..d56a189bb 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.4_plus/sql/get_oid.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.4_plus/sql/get_oid.sql
@@ -3,7 +3,7 @@
 SELECT
     c.relnamespace as scid
 FROM
-    pg_class c
+    pg_catalog.pg_class c
 WHERE
     c.oid = {{vid}}::oid;
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.4_plus/sql/get_schema.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.4_plus/sql/get_schema.sql
index 3bdb5dcb3..45cf02987 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.4_plus/sql/get_schema.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.4_plus/sql/get_schema.sql
@@ -2,6 +2,6 @@
 SELECT
     nspname
 FROM
-    pg_namespace
+    pg_catalog.pg_namespace
 WHERE
     oid = {{ scid }}::oid;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.4_plus/sql/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.4_plus/sql/nodes.sql
index be1339674..0917d40dc 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.4_plus/sql/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.4_plus/sql/nodes.sql
@@ -1,7 +1,7 @@
 SELECT
     c.oid,
     c.relname AS name
-FROM pg_class c
+FROM pg_catalog.pg_class c
 WHERE
   c.relkind = 'v'
 {% if (vid and datlastsysoid) %}
@@ -10,4 +10,4 @@ WHERE
     AND c.relnamespace = {{scid}}::oid
 ORDER BY
     c.relname
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.4_plus/sql/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.4_plus/sql/properties.sql
index cd44282f3..db0dacd0c 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.4_plus/sql/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.4_plus/sql/properties.sql
@@ -10,36 +10,36 @@ SELECT
     c.reltablespace AS spcoid,
     nsp.nspname AS schema,
     c.relispopulated AS ispopulated,
-    pg_get_userbyid(c.relowner) AS owner,
-    array_to_string(c.relacl::text[], ', ') AS acl,
-    pg_get_viewdef(c.oid) AS definition,
+    pg_catalog.pg_get_userbyid(c.relowner) AS owner,
+    pg_catalog.array_to_string(c.relacl::text[], ', ') AS acl,
+    pg_catalog.pg_get_viewdef(c.oid) AS definition,
     {# ===== Checks if it is system view ===== #}
     {% if vid and datlastsysoid %}
     CASE WHEN {{vid}} <= {{datlastsysoid}} THEN True ELSE False END AS system_view,
     {% endif %}
     (SELECT
-        array_agg(provider || '=' || label)
+        pg_catalog.array_agg(provider || '=' || label)
      FROM
-        pg_seclabels sl1
+        pg_catalog.pg_seclabels sl1
      WHERE
         sl1.objoid=c.oid AND sl1.objsubid=0
     ) AS seclabels,
-    substring(array_to_string(c.reloptions, ',')
+    substring(pg_catalog.array_to_string(c.reloptions, ',')
         FROM 'check_option=([a-z]*)') AS check_option,
-    (substring(array_to_string(c.reloptions, ',')
+    (substring(pg_catalog.array_to_string(c.reloptions, ',')
         FROM 'security_barrier=([a-z|0-9]*)'))::boolean AS security_barrier
-FROM pg_class c
-LEFT OUTER JOIN pg_namespace nsp on nsp.oid = c.relnamespace
-LEFT OUTER JOIN pg_tablespace spc on spc.oid=c.reltablespace
-LEFT OUTER JOIN pg_description des ON (des.objoid=c.oid and des.objsubid=0 AND des.classoid='pg_class'::regclass)
+FROM pg_catalog.pg_class c
+LEFT OUTER JOIN pg_catalog.pg_namespace nsp on nsp.oid = c.relnamespace
+LEFT OUTER JOIN pg_catalog.pg_tablespace spc on spc.oid=c.reltablespace
+LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=c.oid and des.objsubid=0 AND des.classoid='pg_class'::regclass)
     WHERE ((c.relhasrules AND (EXISTS (
         SELECT
             r.rulename
         FROM
-            pg_rewrite r
+            pg_catalog.pg_rewrite r
         WHERE
             ((r.ev_class = c.oid)
-                AND (bpchar(r.ev_type) = '1'::bpchar)) )))
+                AND (pg_catalog.bpchar(r.ev_type) = '1'::bpchar)) )))
             AND (c.relkind = 'v'::char)
           )
 {% if (vid and datlastsysoid) %}
@@ -54,7 +54,7 @@ ORDER BY
 SELECT
     pr.rolname
 FROM
-    pg_roles pr
+    pg_catalog.pg_roles pr
 WHERE
     pr.rolcanlogin
 ORDER BY
@@ -64,7 +64,7 @@ ORDER BY
 SELECT
     nsp.nspname
 FROM
-    pg_namespace nsp
+    pg_catalog.pg_namespace nsp
 WHERE
     (nsp.nspname NOT LIKE E'pg\\_%'
         AND nsp.nspname != 'information_schema')
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.4_plus/sql/view_id.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.4_plus/sql/view_id.sql
index a6d9b0b2e..e1868f5fb 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.4_plus/sql/view_id.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/templates/views/ppas/9.4_plus/sql/view_id.sql
@@ -1,6 +1,6 @@
 {# ===== Below will provide view id for last created view ===== #}
 {% if data %}
-SELECT c.oid, c.relname FROM pg_class c
-LEFT OUTER JOIN pg_namespace nsp on nsp.oid = c.relnamespace
+SELECT c.oid, c.relname FROM pg_catalog.pg_class c
+LEFT OUTER JOIN pg_catalog.pg_namespace nsp on nsp.oid = c.relnamespace
 WHERE c.relname = {{ data.name|qtLiteral }} and nsp.nspname = '{{ data.schema}}';
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/subscriptions/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/subscriptions/__init__.py
index 94a2461bc..a69c10665 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/subscriptions/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/subscriptions/__init__.py
@@ -699,7 +699,7 @@ class SubscriptionView(PGChildNodeView, SchemaDiffObjectCompare):
         )
         # create a cursor
         cur = conn.cursor()
-        cur.execute('SELECT pubname from pg_publication')
+        cur.execute('SELECT pubname from pg_catalog.pg_publication')
 
         publications = cur.fetchall()
         # Close the connection
diff --git a/web/pgadmin/browser/server_groups/servers/databases/subscriptions/templates/subscriptions/sql/default/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/subscriptions/templates/subscriptions/sql/default/delete.sql
index 33942fa99..459220665 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/subscriptions/templates/subscriptions/sql/default/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/subscriptions/templates/subscriptions/sql/default/delete.sql
@@ -1,6 +1,6 @@
 {# ============= Get the subscription name using oid ============= #}
 {% if subid %}
-    SELECT subname FROM pg_subscription WHERE oid = {{subid}}::oid;
+    SELECT subname FROM pg_catalog.pg_subscription WHERE oid = {{subid}}::oid;
 {% endif %}
 {# ============= Drop the language ============= #}
 {% if subname %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/subscriptions/templates/subscriptions/sql/default/dependencies.sql b/web/pgadmin/browser/server_groups/servers/databases/subscriptions/templates/subscriptions/sql/default/dependencies.sql
index a71f0cd25..5ea81d9c2 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/subscriptions/templates/subscriptions/sql/default/dependencies.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/subscriptions/templates/subscriptions/sql/default/dependencies.sql
@@ -1,2 +1,2 @@
-SELECT subpublications AS pub FROM pg_subscription
+SELECT subpublications AS pub FROM pg_catalog.pg_subscription
 WHERE subname = '{{subname}}';
diff --git a/web/pgadmin/browser/server_groups/servers/databases/subscriptions/templates/subscriptions/sql/default/get_position.sql b/web/pgadmin/browser/server_groups/servers/databases/subscriptions/templates/subscriptions/sql/default/get_position.sql
index 65ec696c1..78287c83a 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/subscriptions/templates/subscriptions/sql/default/get_position.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/subscriptions/templates/subscriptions/sql/default/get_position.sql
@@ -1 +1 @@
-SELECT oid, subname AS name FROM pg_subscription WHERE subname = '{{ subname }}';
+SELECT oid, subname AS name FROM pg_catalog.pg_subscription WHERE subname = '{{ subname }}';
diff --git a/web/pgadmin/browser/server_groups/servers/databases/subscriptions/templates/subscriptions/sql/default/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/subscriptions/templates/subscriptions/sql/default/nodes.sql
index a9b116b2f..82972f2bc 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/subscriptions/templates/subscriptions/sql/default/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/subscriptions/templates/subscriptions/sql/default/nodes.sql
@@ -1,4 +1,4 @@
-SELECT oid, sub.subname AS name FROM pg_subscription sub
+SELECT oid, sub.subname AS name FROM pg_catalog.pg_subscription sub
 WHERE
 {% if subid %}
     sub.oid = {{ subid }};
diff --git a/web/pgadmin/browser/server_groups/servers/databases/subscriptions/templates/subscriptions/sql/default/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/subscriptions/templates/subscriptions/sql/default/properties.sql
index af958fcb2..1971bd0a4 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/subscriptions/templates/subscriptions/sql/default/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/subscriptions/templates/subscriptions/sql/default/properties.sql
@@ -6,19 +6,19 @@ SELECT  sub.oid as oid,
         pga.rolname as subowner,
         subslotname as slot_name,
         subenabled as enabled,
-		SPLIT_PART(SPLIT_PART(subconninfo,' port',1), '=',2) as host,
-		SPLIT_PART(SPLIT_PART(subconninfo,'port=',2), ' ',1) as port,
-		SPLIT_PART(SPLIT_PART(subconninfo,'user=',2), ' ',1) as username,
-		SPLIT_PART(SPLIT_PART(subconninfo,'dbname=',2), ' ',1) as db,
-		SPLIT_PART(SPLIT_PART(subconninfo,'connect_timeout=',2), ' ',1) as connect_timeout,
-		SPLIT_PART(SPLIT_PART(subconninfo,'passfile=',2), ' ',1) as passfile,
-		SPLIT_PART(SPLIT_PART(subconninfo,'sslmode=',2), ' ',1) as sslmode,
-		SPLIT_PART(SPLIT_PART(subconninfo,'sslcompression=',2), ' ',1) as sslcompression,
-		SPLIT_PART(SPLIT_PART(subconninfo,'sslcert=',2), ' ',1) as sslcert,
-		SPLIT_PART(SPLIT_PART(subconninfo,'sslkey=',2), ' ',1) as sslkey,
-		SPLIT_PART(SPLIT_PART(subconninfo,'sslrootcert=',2), ' ',1) as sslrootcert,
-		SPLIT_PART(SPLIT_PART(subconninfo,'sslcrl=',2), ' ',1) as sslcrl
-FROM pg_subscription sub join pg_roles pga on sub.subowner= pga.oid
+		pg_catalog.SPLIT_PART(pg_catalog.SPLIT_PART(subconninfo,' port',1), '=',2) as host,
+		pg_catalog.SPLIT_PART(pg_catalog.SPLIT_PART(subconninfo,'port=',2), ' ',1) as port,
+		pg_catalog.SPLIT_PART(pg_catalog.SPLIT_PART(subconninfo,'user=',2), ' ',1) as username,
+		pg_catalog.SPLIT_PART(pg_catalog.SPLIT_PART(subconninfo,'dbname=',2), ' ',1) as db,
+		pg_catalog.SPLIT_PART(pg_catalog.SPLIT_PART(subconninfo,'connect_timeout=',2), ' ',1) as connect_timeout,
+		pg_catalog.SPLIT_PART(pg_catalog.SPLIT_PART(subconninfo,'passfile=',2), ' ',1) as passfile,
+		pg_catalog.SPLIT_PART(pg_catalog.SPLIT_PART(subconninfo,'sslmode=',2), ' ',1) as sslmode,
+		pg_catalog.SPLIT_PART(pg_catalog.SPLIT_PART(subconninfo,'sslcompression=',2), ' ',1) as sslcompression,
+		pg_catalog.SPLIT_PART(pg_catalog.SPLIT_PART(subconninfo,'sslcert=',2), ' ',1) as sslcert,
+		pg_catalog.SPLIT_PART(pg_catalog.SPLIT_PART(subconninfo,'sslkey=',2), ' ',1) as sslkey,
+		pg_catalog.SPLIT_PART(pg_catalog.SPLIT_PART(subconninfo,'sslrootcert=',2), ' ',1) as sslrootcert,
+		pg_catalog.SPLIT_PART(pg_catalog.SPLIT_PART(subconninfo,'sslcrl=',2), ' ',1) as sslcrl
+FROM pg_catalog.pg_subscription sub join pg_catalog.pg_roles pga on sub.subowner= pga.oid
 WHERE
 {% if subid %}
     sub.oid = {{ subid }};
diff --git a/web/pgadmin/browser/server_groups/servers/databases/subscriptions/templates/subscriptions/sql/default/stats.sql b/web/pgadmin/browser/server_groups/servers/databases/subscriptions/templates/subscriptions/sql/default/stats.sql
index 4da991441..8910ae304 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/subscriptions/templates/subscriptions/sql/default/stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/subscriptions/templates/subscriptions/sql/default/stats.sql
@@ -4,7 +4,7 @@ SELECT
     latest_end_lsn AS {{ conn|qtIdent(_('Latest end lsn')) }},
     last_msg_receipt_time AS {{ conn|qtIdent(_('Last message receipt')) }},
     last_msg_send_time AS {{ conn|qtIdent(_('Last message send time'))}}
-FROM pg_stat_subscription
+FROM pg_catalog.pg_stat_subscription
 {% if subid %}
     WHERE subid = {{ subid }};
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/acl.sql
index 48e2a95bc..8fe549790 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/acl.sql
@@ -1,7 +1,7 @@
 SELECT
     'datacl' AS deftype, COALESCE(gt.rolname, 'PUBLIC') AS grantee,
-    g.rolname AS grantor, array_agg(privilege_type) AS privileges,
-    array_agg(is_grantable) AS grantable
+    g.rolname AS grantor, pg_catalog.array_agg(privilege_type) AS privileges,
+    pg_catalog.array_agg(is_grantable) AS grantable
 FROM
     (SELECT
         d.grantee, d.grantor, d.is_grantable,
@@ -26,7 +26,7 @@ FROM
             (d).is_grantable AS is_grantable,
             (d).privilege_type AS privilege_type
         FROM
-            (SELECT aclexplode(db.datacl) AS d FROM pg_database db
+            (SELECT pg_catalog.aclexplode(db.datacl) AS d FROM pg_catalog.pg_database db
             WHERE db.oid = {{ did|qtLiteral }}::OID) a
         ) d
     ) d
diff --git a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/defacl.sql b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/defacl.sql
index aa08b56b2..512820bd2 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/defacl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/defacl.sql
@@ -5,7 +5,7 @@ SELECT
     WHEN 'f' THEN 'deffuncacl'
     WHEN 'T' THEN 'deftypeacl'
     END AS deftype,
-    COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor, array_agg(a.privilege_type) as privileges, array_agg(a.is_grantable) as grantable
+    COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor, pg_catalog.array_agg(a.privilege_type) as privileges, pg_catalog.array_agg(a.is_grantable) as grantable
 FROM
     (SELECT
         (acl).grantee as grantee, (acl).grantor AS grantor, (acl).is_grantable AS is_grantable,
@@ -26,7 +26,7 @@ FROM
         END AS privilege_type,
         defaclobjtype as deftype
     FROM
-        (SELECT defaclobjtype, aclexplode(defaclacl) as acl FROM pg_catalog.pg_default_acl dacl
+        (SELECT defaclobjtype, pg_catalog.aclexplode(defaclacl) as acl FROM pg_catalog.pg_default_acl dacl
       WHERE dacl.defaclnamespace = 0::OID) d) a
     LEFT JOIN pg_catalog.pg_roles g ON (a.grantor = g.oid)
     LEFT JOIN pg_catalog.pg_roles gt ON (a.grantee = gt.oid)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/get_ctypes.sql b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/get_ctypes.sql
index 46246ef65..32fdd807f 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/get_ctypes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/get_ctypes.sql
@@ -1,5 +1,5 @@
 SELECT DISTINCT(datctype) AS cname
-FROM pg_database
+FROM pg_catalog.pg_database
 UNION
 SELECT DISTINCT(datcollate) AS cname
-FROM pg_database
\ No newline at end of file
+FROM pg_catalog.pg_database
diff --git a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/get_variables.sql b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/get_variables.sql
index d76d02b3f..49976fe39 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/get_variables.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/get_variables.sql
@@ -1,5 +1,5 @@
   SELECT rl.*, r.rolname AS user_name, db.datname as db_name
-FROM pg_db_role_setting AS rl
- LEFT JOIN pg_roles AS r ON rl.setrole = r.oid
- LEFT JOIN pg_database AS db ON rl.setdatabase = db.oid
+FROM pg_catalog.pg_db_role_setting AS rl
+ LEFT JOIN pg_catalog.pg_roles AS r ON rl.setrole = r.oid
+ LEFT JOIN pg_catalog.pg_database AS db ON rl.setdatabase = db.oid
 WHERE setdatabase = {{did}}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/properties.sql
index 3927df34c..18b4b78ec 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/properties.sql
@@ -1,32 +1,32 @@
 SELECT
     db.oid AS did, db.oid, db.datname AS name, db.dattablespace AS spcoid,
-    spcname, datallowconn, pg_encoding_to_char(encoding) AS encoding,
-    pg_get_userbyid(datdba) AS datowner, datcollate, datctype, datconnlimit,
-    has_database_privilege(db.oid, 'CREATE') AS cancreate,
-    current_setting('default_tablespace') AS default_tablespace,
+    spcname, datallowconn, pg_catalog.pg_encoding_to_char(encoding) AS encoding,
+    pg_catalog.pg_get_userbyid(datdba) AS datowner, datcollate, datctype, datconnlimit,
+    pg_catalog.has_database_privilege(db.oid, 'CREATE') AS cancreate,
+    pg_catalog.current_setting('default_tablespace') AS default_tablespace,
     descr.description AS comments, db.datistemplate AS is_template,
     {### Default ACL for Tables ###}
-    (SELECT array_to_string(ARRAY(
-        SELECT array_to_string(defaclacl::text[], ', ')
+    (SELECT pg_catalog.array_to_string(ARRAY(
+        SELECT pg_catalog.array_to_string(defaclacl::text[], ', ')
             FROM pg_default_acl
         WHERE defaclobjtype = 'r' AND defaclnamespace = 0::OID
     ), ', ')) AS tblacl,
     {### Default ACL for Sequnces ###}
-    (SELECT array_to_string(ARRAY(
-        SELECT array_to_string(defaclacl::text[], ', ')
+    (SELECT pg_catalog.array_to_string(ARRAY(
+        SELECT pg_catalog.array_to_string(defaclacl::text[], ', ')
             FROM pg_default_acl
         WHERE defaclobjtype = 'S' AND defaclnamespace = 0::OID
     ), ', ')) AS seqacl,
     {### Default ACL for Functions ###}
-    (SELECT array_to_string(ARRAY(
-        SELECT array_to_string(defaclacl::text[], ', ')
-            FROM pg_default_acl
+    (SELECT pg_catalog.array_to_string(ARRAY(
+        SELECT pg_catalog.array_to_string(defaclacl::text[], ', ')
+            FROM pg_catalog.pg_default_acl
         WHERE defaclobjtype = 'f' AND defaclnamespace = 0::OID
     ), ', ')) AS funcacl,
-    array_to_string(datacl::text[], ', ') AS acl
-FROM pg_database db
-    LEFT OUTER JOIN pg_tablespace ta ON db.dattablespace=ta.OID
-    LEFT OUTER JOIN pg_shdescription descr ON (
+    pg_catalog.array_to_string(datacl::text[], ', ') AS acl
+FROM pg_catalog.pg_database db
+    LEFT OUTER JOIN pg_catalog.pg_tablespace ta ON db.dattablespace=ta.OID
+    LEFT OUTER JOIN pg_catalog.pg_shdescription descr ON (
         db.oid=descr.objoid AND descr.classoid='pg_database'::regclass
     )
 WHERE {% if did %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.2_plus/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.2_plus/acl.sql
index 754914e77..d72fafb10 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.2_plus/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.2_plus/acl.sql
@@ -1,7 +1,7 @@
 SELECT
     'datacl' AS deftype, COALESCE(gt.rolname, 'PUBLIC') AS grantee,
-    g.rolname grantor, array_agg(privilege_type) AS privileges,
-    array_agg(is_grantable) AS grantable
+    g.rolname grantor, pg_catalog.array_agg(privilege_type) AS privileges,
+    pg_catalog.array_agg(is_grantable) AS grantable
 FROM
     (SELECT
         d.grantee, d.grantor, d.is_grantable,
@@ -26,7 +26,7 @@ FROM
             (d).is_grantable AS is_grantable,
             (d).privilege_type AS privilege_type
         FROM
-            (SELECT aclexplode(db.datacl) AS d FROM pg_database db
+            (SELECT pg_catalog.aclexplode(db.datacl) AS d FROM pg_catalog.pg_database db
             WHERE db.oid = {{ did|qtLiteral }}::OID) a
         ) d
     ) d
diff --git a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.2_plus/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.2_plus/delete.sql
index a8670c613..ac8ff009e 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.2_plus/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.2_plus/delete.sql
@@ -1,6 +1,6 @@
 {# We need database name before we execute drop #}
 {% if did %}
-SELECT db.datname as name FROM pg_database as db WHERE db.oid = {{did}}
+SELECT db.datname as name FROM pg_catalog.pg_database as db WHERE db.oid = {{did}}
 {% endif %}
 {# Using name from above query we will drop the database #}
 {% if datname %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.2_plus/get_encodings.sql b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.2_plus/get_encodings.sql
index e8e531cea..51caf9637 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.2_plus/get_encodings.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.2_plus/get_encodings.sql
@@ -4,8 +4,8 @@
 #}
 SELECT *
 FROM
-    (SELECT pg_encoding_to_char(s.i) AS encoding
-    FROM (SELECT generate_series(0, 100, 1) as i) s) a
+    (SELECT pg_catalog.pg_encoding_to_char(s.i) AS encoding
+    FROM (SELECT pg_catalog.generate_series(0, 100, 1) as i) s) a
 WHERE encoding != '' ORDER BY encoding;
 
 {#
diff --git a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.2_plus/get_variables.sql b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.2_plus/get_variables.sql
index 8297c75fa..c4e58f5c2 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.2_plus/get_variables.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.2_plus/get_variables.sql
@@ -1,7 +1,7 @@
 SELECT
     rl.*, r.rolname AS user_name, db.datname as db_name
 FROM
-    pg_db_role_setting AS rl
-    LEFT JOIN pg_roles AS r ON rl.setrole = r.oid
-    LEFT JOIN pg_database AS db ON rl.setdatabase = db.oid
+    pg_catalog.pg_db_role_setting AS rl
+    LEFT JOIN pg_catalog.pg_roles AS r ON rl.setrole = r.oid
+    LEFT JOIN pg_catalog.pg_database AS db ON rl.setdatabase = db.oid
 WHERE setdatabase = {{did}};
diff --git a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.2_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.2_plus/properties.sql
index bf4e59b2e..46839c4f7 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.2_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.2_plus/properties.sql
@@ -1,39 +1,39 @@
 SELECT
     db.oid AS did, db.oid, db.datname AS name, db.dattablespace AS spcoid,
-    spcname, datallowconn, pg_encoding_to_char(encoding) AS encoding,
-    pg_get_userbyid(datdba) AS datowner, datcollate, datctype, datconnlimit,
-    has_database_privilege(db.oid, 'CREATE') AS cancreate,
-    current_setting('default_tablespace') AS default_tablespace,
+    spcname, datallowconn, pg_catalog.pg_encoding_to_char(encoding) AS encoding,
+    pg_catalog.pg_get_userbyid(datdba) AS datowner, datcollate, datctype, datconnlimit,
+    pg_catalog.has_database_privilege(db.oid, 'CREATE') AS cancreate,
+    pg_catalog.current_setting('default_tablespace') AS default_tablespace,
     descr.description AS comments, db.datistemplate AS is_template,
     {### Default ACL for Tables ###}
-    (SELECT array_to_string(ARRAY(
-        SELECT array_to_string(defaclacl::text[], ', ')
+    (SELECT pg_catalog.array_to_string(ARRAY(
+        SELECT pg_catalog.array_to_string(defaclacl::text[], ', ')
             FROM pg_default_acl
         WHERE defaclobjtype = 'r' AND defaclnamespace = 0::OID
     ), ', ')) AS tblacl,
     {### Default ACL for Sequnces ###}
-    (SELECT array_to_string(ARRAY(
-        SELECT array_to_string(defaclacl::text[], ', ')
-            FROM pg_default_acl
+    (SELECT pg_catalog.array_to_string(ARRAY(
+        SELECT pg_catalog.array_to_string(defaclacl::text[], ', ')
+            FROM pg_catalog.pg_default_acl
         WHERE defaclobjtype = 'S' AND defaclnamespace = 0::OID
     ), ', ')) AS seqacl,
     {### Default ACL for Functions ###}
-    (SELECT array_to_string(ARRAY(
-        SELECT array_to_string(defaclacl::text[], ', ')
-            FROM pg_default_acl
+    (SELECT pg_catalog.array_to_string(ARRAY(
+        SELECT pg_catalog.array_to_string(defaclacl::text[], ', ')
+            FROM pg_catalog.pg_default_acl
         WHERE defaclobjtype = 'f' AND defaclnamespace = 0::OID
     ), ', ')) AS funcacl,
     {### Default ACL for Type ###}
-    (SELECT array_to_string(ARRAY(
-        SELECT array_to_string(defaclacl::text[], ', ')
-            FROM pg_default_acl
+    (SELECT pg_catalog.array_to_string(ARRAY(
+        SELECT pg_catalog.array_to_string(defaclacl::text[], ', ')
+            FROM pg_catalog.pg_default_acl
         WHERE defaclobjtype = 'T' AND defaclnamespace = 0::OID
     ), ', ')) AS typeacl,
-    (SELECT array_agg(provider || '=' || label) FROM pg_shseclabel sl1 WHERE sl1.objoid=db.oid) AS seclabels,
-    array_to_string(datacl::text[], ', ') AS acl
-FROM pg_database db
-    LEFT OUTER JOIN pg_tablespace ta ON db.dattablespace=ta.OID
-    LEFT OUTER JOIN pg_shdescription descr ON (
+    (SELECT pg_catalog.array_agg(provider || '=' || label) FROM pg_catalog.pg_shseclabel sl1 WHERE sl1.objoid=db.oid) AS seclabels,
+    pg_catalog.array_to_string(datacl::text[], ', ') AS acl
+FROM pg_catalog.pg_database db
+    LEFT OUTER JOIN pg_catalog.pg_tablespace ta ON db.dattablespace=ta.OID
+    LEFT OUTER JOIN pg_catalog.pg_shdescription descr ON (
         db.oid=descr.objoid AND descr.classoid='pg_database'::regclass
     )
 WHERE {% if did %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.2_plus/stats.sql b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.2_plus/stats.sql
index ee920a97a..241cae6bc 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.2_plus/stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.2_plus/stats.sql
@@ -21,10 +21,10 @@ SELECT
     deadlocks AS {{ conn|qtIdent(_("Deadlocks")) }},
     blk_read_time AS {{ conn|qtIdent(_("Block read time")) }},
     blk_write_time AS {{ conn|qtIdent(_("Block write time")) }},
-    pg_database_size(db.datid) AS {{ conn|qtIdent(_('Size')) }}
+    pg_catalog.pg_database_size(db.datid) AS {{ conn|qtIdent(_('Size')) }}
 FROM
-    pg_stat_database db
-    LEFT JOIN pg_stat_database_conflicts slave ON db.datid=slave.datid
+    pg_catalog.pg_stat_database db
+    LEFT JOIN pg_catalog.pg_stat_database_conflicts slave ON db.datid=slave.datid
 WHERE {% if did %}
 db.datid = {{ did|qtLiteral }}::OID{% else %}
 db.datid > {{ last_system_oid|qtLiteral }}::OID
diff --git a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.2_plus/variables.sql b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.2_plus/variables.sql
index 78ed3c912..b49e153c5 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.2_plus/variables.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.2_plus/variables.sql
@@ -1,4 +1,4 @@
 SELECT
     name, vartype, min_val, max_val, enumvals
-FROM pg_settings
+FROM pg_catalog.pg_settings
 WHERE context in ('user', 'superuser');
diff --git a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.3_plus/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.3_plus/acl.sql
index 48e2a95bc..8fe549790 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.3_plus/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.3_plus/acl.sql
@@ -1,7 +1,7 @@
 SELECT
     'datacl' AS deftype, COALESCE(gt.rolname, 'PUBLIC') AS grantee,
-    g.rolname AS grantor, array_agg(privilege_type) AS privileges,
-    array_agg(is_grantable) AS grantable
+    g.rolname AS grantor, pg_catalog.array_agg(privilege_type) AS privileges,
+    pg_catalog.array_agg(is_grantable) AS grantable
 FROM
     (SELECT
         d.grantee, d.grantor, d.is_grantable,
@@ -26,7 +26,7 @@ FROM
             (d).is_grantable AS is_grantable,
             (d).privilege_type AS privilege_type
         FROM
-            (SELECT aclexplode(db.datacl) AS d FROM pg_database db
+            (SELECT pg_catalog.aclexplode(db.datacl) AS d FROM pg_catalog.pg_database db
             WHERE db.oid = {{ did|qtLiteral }}::OID) a
         ) d
     ) d
diff --git a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.3_plus/defacl.sql b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.3_plus/defacl.sql
index 11840f097..e1284f51b 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.3_plus/defacl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.3_plus/defacl.sql
@@ -5,7 +5,7 @@ SELECT
     WHEN 'f' THEN 'deffuncacl'
     WHEN 'T' THEN 'deftypeacl'
     END AS deftype,
-    COALESCE(gt.rolname, 'PUBLIC') AS grantee, g.rolname AS grantor, array_agg(a.privilege_type) as privileges, array_agg(a.is_grantable) as grantable
+    COALESCE(gt.rolname, 'PUBLIC') AS grantee, g.rolname AS grantor, pg_catalog.array_agg(a.privilege_type) as privileges, pg_catalog.array_agg(a.is_grantable) as grantable
 FROM
     (SELECT
         (acl).grantee as grantee, (acl).grantor AS grantor, (acl).is_grantable AS is_grantable,
@@ -26,7 +26,7 @@ FROM
         END AS privilege_type,
         defaclobjtype as deftype
     FROM
-        (SELECT defaclobjtype, aclexplode(defaclacl) as acl FROM pg_catalog.pg_default_acl dacl
+        (SELECT defaclobjtype, pg_catalog.aclexplode(defaclacl) as acl FROM pg_catalog.pg_default_acl dacl
       WHERE dacl.defaclnamespace = 0::OID) d) a
     LEFT JOIN pg_catalog.pg_roles g ON (a.grantor = g.oid)
     LEFT JOIN pg_catalog.pg_roles gt ON (a.grantee = gt.oid)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.3_plus/get_variables.sql b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.3_plus/get_variables.sql
index e129adebd..468e1ddd2 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.3_plus/get_variables.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.3_plus/get_variables.sql
@@ -1,6 +1,6 @@
 SELECT
     rl.*, r.rolname AS user_name, db.datname as db_name
-FROM pg_db_role_setting AS rl
-    LEFT JOIN pg_roles AS r ON rl.setrole = r.oid
-    LEFT JOIN pg_database AS db ON rl.setdatabase = db.oid
+FROM pg_catalog.pg_db_role_setting AS rl
+    LEFT JOIN pg_catalog.pg_roles AS r ON rl.setrole = r.oid
+    LEFT JOIN pg_catalog.pg_database AS db ON rl.setdatabase = db.oid
 WHERE setdatabase = {{did}}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/acl.sql
index 226f4b222..d4e74d767 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/acl.sql
@@ -1,7 +1,7 @@
 SELECT
     'datacl' AS deftype, COALESCE(gt.rolname, 'PUBLIC') AS grantee,
-    g.rolname AS grantor, array_agg(privilege_type) AS privileges,
-    array_agg(is_grantable) AS grantable
+    g.rolname AS grantor, pg_catalog.array_agg(privilege_type) AS privileges,
+    pg_catalog.array_agg(is_grantable) AS grantable
 FROM
     (SELECT
         d.grantee,
@@ -27,10 +27,10 @@ FROM
             u_grantor.oid AS grantor,
             grantee.oid AS grantee,
             pr.type AS privilege_type,
-            aclcontains(c.datacl, makeaclitem(grantee.oid, u_grantor.oid, pr.type, true)) AS is_grantable
-        FROM pg_database c, pg_authid u_grantor, (
+            pg_catalog.aclcontains(c.datacl, pg_catalog.makeaclitem(grantee.oid, u_grantor.oid, pr.type, true)) AS is_grantable
+        FROM pg_catalog.pg_database c, pg_authid u_grantor, (
             SELECT pg_authid.oid, pg_authid.rolname
-            FROM pg_authid
+            FROM pg_catalog.pg_authid
                 UNION ALL
             SELECT 0::oid AS oid, 'PUBLIC') grantee(oid, rolname),
             (     SELECT 'SELECT'
@@ -46,8 +46,8 @@ FROM
                   SELECT 'REFERENCES'
                           UNION ALL
                   SELECT 'TRIGGER') pr(type)
-        WHERE aclcontains(c.datacl, makeaclitem(grantee.oid, u_grantor.oid, pr.type, false))
-        AND (pg_has_role(u_grantor.oid, 'USAGE'::text) OR pg_has_role(grantee.oid, 'USAGE'::text)
+        WHERE pg_catalog.aclcontains(c.datacl, pg_catalog.makeaclitem(grantee.oid, u_grantor.oid, pr.type, false))
+        AND (pg_catalog.pg_has_role(u_grantor.oid, 'USAGE'::text) OR pg_catalog.pg_has_role(grantee.oid, 'USAGE'::text)
         OR grantee.rolname = 'PUBLIC'::name)
         AND c.oid = {{ did|qtLiteral }}::OID
         ) d
diff --git a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/delete.sql
index 3d387714f..48886d981 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/delete.sql
@@ -1,6 +1,6 @@
 {# We need database name before we execute drop #}
 {% if did %}
-SELECT db.datname as name FROM pg_database as db WHERE db.oid = {{did}};
+SELECT db.datname as name FROM pg_catalog.pg_database as db WHERE db.oid = {{did}};
 {% endif %}
 {# Using name from above query we will drop the database #}
 {% if datname %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/delete_multiple.sql b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/delete_multiple.sql
index 7ca5539f2..a39d81bdc 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/delete_multiple.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/delete_multiple.sql
@@ -1,6 +1,6 @@
 {# We need database name before we execute drop #}
 {% if db_ids %}
-SELECT db.datname as name FROM pg_database as db WHERE db.oid in {{db_ids}};
+SELECT db.datname as name FROM pg_catalog.pg_database as db WHERE db.oid in {{db_ids}};
 {% endif %}
 {# Using name from above query we will drop the database #}
 {% if dbname_array %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/get_ctypes.sql b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/get_ctypes.sql
index 523db309a..023d396ec 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/get_ctypes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/get_ctypes.sql
@@ -1,3 +1,3 @@
-SELECT current_setting('lc_ctype') as cname
+SELECT pg_catalog.current_setting('lc_ctype') as cname
 UNION
-SELECT current_setting('lc_collate') as cname
+SELECT pg_catalog.current_setting('lc_collate') as cname
diff --git a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/get_encodings.sql b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/get_encodings.sql
index 4ef63793b..15bfa8e59 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/get_encodings.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/get_encodings.sql
@@ -3,8 +3,8 @@
 -- We need to implement a mechanism to check for valid supported server encoding
 #}
 SELECT * FROM
-(SELECT pg_encoding_to_char(s.i) AS encoding
-FROM (SELECT generate_series(0, 100, 1) as i) s) a
+(SELECT pg_catalog.pg_encoding_to_char(s.i) AS encoding
+FROM (SELECT pg_catalog.generate_series(0, 100, 1) as i) s) a
 WHERE encoding != '' ORDER BY encoding;
 
 {#
diff --git a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/nodes.sql
index de93b3d43..d6d33e0d4 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/nodes.sql
@@ -1,9 +1,9 @@
 SELECT
     db.oid as did, db.datname as name, ta.spcname as spcname, db.datallowconn,
-    has_database_privilege(db.oid, 'CREATE') as cancreate, datdba as owner
+    pg_catalog.has_database_privilege(db.oid, 'CREATE') as cancreate, datdba as owner
 FROM
-    pg_database db
-    LEFT OUTER JOIN pg_tablespace ta ON db.dattablespace = ta.oid
+    pg_catalog.pg_database db
+    LEFT OUTER JOIN pg_catalog.pg_tablespace ta ON db.dattablespace = ta.oid
 WHERE {% if did %}
 db.oid = {{ did|qtLiteral }}::OID{% else %}
 db.oid > {{ last_system_oid }}::OID
diff --git a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/properties.sql
index 558495514..ac692b0ef 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/properties.sql
@@ -1,12 +1,12 @@
 SELECT
     db.oid AS did, db.oid, db.datname AS name, db.dattablespace AS spcoid,
-    spcname, datallowconn, pg_encoding_to_char(encoding) AS encoding,
-    pg_get_userbyid(datdba) AS datowner,
-    (select current_setting('lc_collate')) as datcollate,
-    (select current_setting('lc_ctype')) as datctype,
+    spcname, datallowconn, pg_catalog.pg_encoding_to_char(encoding) AS encoding,
+    pg_catalog.pg_get_userbyid(datdba) AS datowner,
+    (select pg_catalog.current_setting('lc_collate')) as datcollate,
+    (select pg_catalog.current_setting('lc_ctype')) as datctype,
     datconnlimit,
-    has_database_privilege(db.oid, 'CREATE') AS cancreate,
-    current_setting('default_tablespace') AS default_tablespace,
+    pg_catalog.has_database_privilege(db.oid, 'CREATE') AS cancreate,
+    pg_catalog.current_setting('default_tablespace') AS default_tablespace,
     descr.description AS comments, db.datistemplate AS is_template,
     {### Default ACL for Tables ###}
     '' AS tblacl,
@@ -14,10 +14,10 @@ SELECT
     '' AS seqacl,
     {### Default ACL for Functions ###}
     '' AS funcacl,
-    array_to_string(datacl::text[], ', ') AS acl
-FROM pg_database db
-    LEFT OUTER JOIN pg_tablespace ta ON db.dattablespace=ta.OID
-    LEFT OUTER JOIN pg_shdescription descr ON (
+    pg_catalog.array_to_string(datacl::text[], ', ') AS acl
+FROM pg_catalog.pg_database db
+    LEFT OUTER JOIN pg_catalog.pg_tablespace ta ON db.dattablespace=ta.OID
+    LEFT OUTER JOIN pg_catalog.pg_shdescription descr ON (
         db.oid=descr.objoid AND descr.classoid='pg_database'::regclass
     )
 WHERE {% if did %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/stats.sql b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/stats.sql
index 68ff711bf..f3109b562 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/stats.sql
@@ -10,9 +10,9 @@ SELECT
     tup_inserted AS {{ conn|qtIdent(_('Tuples inserted')) }},
     tup_updated AS {{ conn|qtIdent(_('Tuples updated')) }},
     tup_deleted AS {{ conn|qtIdent(_('Tuples deleted')) }},
-    pg_database_size(db.datid) AS {{ conn|qtIdent(_('Size')) }}
+    pg_catalog.pg_database_size(db.datid) AS {{ conn|qtIdent(_('Size')) }}
 FROM
-    pg_stat_database db
+    pg_catalog.pg_stat_database db
 WHERE {% if did %}
 db.datid = {{ did|qtLiteral }}::OID{% else %}
 db.datid > {{ last_system_oid|qtLiteral }}::OID
diff --git a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/variables.sql b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/variables.sql
index 3e7729896..ff30cb705 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/variables.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/variables.sql
@@ -1,2 +1,2 @@
 SELECT name, vartype, min_val, max_val, enumvals
-FROM pg_settings WHERE context in ('user', 'superuser')
+FROM pg_catalog.pg_settings WHERE context in ('user', 'superuser')
diff --git a/web/pgadmin/browser/server_groups/servers/roles/__init__.py b/web/pgadmin/browser/server_groups/servers/roles/__init__.py
index 3fbdd8d48..b62e7fe38 100644
--- a/web/pgadmin/browser/server_groups/servers/roles/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/roles/__init__.py
@@ -831,7 +831,7 @@ rolmembership:{
             )
 
         status, rid = self.conn.execute_scalar(
-            "SELECT oid FROM pg_roles WHERE rolname = %(rolname)s",
+            "SELECT oid FROM pg_catalog.pg_roles WHERE rolname = %(rolname)s",
             {'rolname': self.request['rolname']}
         )
 
diff --git a/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.1_plus/dependents.sql b/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.1_plus/dependents.sql
index 5ddbcb317..2ee036cb6 100644
--- a/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.1_plus/dependents.sql
+++ b/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.1_plus/dependents.sql
@@ -2,39 +2,39 @@
 SELECT 'd' as type, datname,
     datallowconn AND pg_catalog.has_database_privilege(datname, 'CONNECT') AS datallowconn,
     datdba, datlastsysoid
-FROM pg_database db
+FROM pg_catalog.pg_database db
 UNION
 SELECT 'M', spcname, null, null, null
-    FROM pg_tablespace where spcowner= {{rid}}::oid
+    FROM pg_catalog.pg_tablespace where spcowner= {{rid}}::oid
 ORDER BY 1, 2
 {% endif %}
 
 {% if fetch_dependents %}
 SELECT cl.relkind, COALESCE(cin.nspname, cln.nspname) as nspname,
     COALESCE(ci.relname, cl.relname) as relname, cl.relname as indname
-FROM pg_class cl
-JOIN pg_namespace cln ON cl.relnamespace=cln.oid
-LEFT OUTER JOIN pg_index ind ON ind.indexrelid=cl.oid
-LEFT OUTER JOIN pg_class ci ON ind.indrelid=ci.oid
-LEFT OUTER JOIN pg_namespace cin ON ci.relnamespace=cin.oid
-WHERE cl.oid IN (SELECT objid FROM pg_shdepend WHERE refobjid={{rid}}::oid) AND cl.oid > {{lastsysoid}}::oid
+FROM pg_catalog.pg_class cl
+JOIN pg_catalog.pg_namespace cln ON cl.relnamespace=cln.oid
+LEFT OUTER JOIN pg_catalog.pg_index ind ON ind.indexrelid=cl.oid
+LEFT OUTER JOIN pg_catalog.pg_class ci ON ind.indrelid=ci.oid
+LEFT OUTER JOIN pg_catalog.pg_namespace cin ON ci.relnamespace=cin.oid
+WHERE cl.oid IN (SELECT objid FROM pg_catalog.pg_shdepend WHERE refobjid={{rid}}::oid) AND cl.oid > {{lastsysoid}}::oid
 UNION ALL SELECT 'n', null, nspname, null
-    FROM pg_namespace nsp
-    WHERE nsp.oid IN (SELECT objid FROM pg_shdepend WHERE refobjid={{rid}}::oid) AND nsp.oid > {{lastsysoid}}::oid
+    FROM pg_catalog.pg_namespace nsp
+    WHERE nsp.oid IN (SELECT objid FROM pg_catalog.pg_shdepend WHERE refobjid={{rid}}::oid) AND nsp.oid > {{lastsysoid}}::oid
 UNION ALL SELECT CASE WHEN typtype='d' THEN 'd' ELSE 'y' END, null, typname, null
-    FROM pg_type ty
-    WHERE ty.oid IN (SELECT objid FROM pg_shdepend WHERE refobjid={{rid}}::oid) AND ty.oid > {{lastsysoid}}::oid
+    FROM pg_catalog.pg_type ty
+    WHERE ty.oid IN (SELECT objid FROM pg_catalog.pg_shdepend WHERE refobjid={{rid}}::oid) AND ty.oid > {{lastsysoid}}::oid
 UNION ALL SELECT 'C', null, conname, null
-    FROM pg_conversion co
-    WHERE co.oid IN (SELECT objid FROM pg_shdepend WHERE refobjid={{rid}}::oid) AND co.oid > {{lastsysoid}}::oid
+    FROM pg_catalog.pg_conversion co
+    WHERE co.oid IN (SELECT objid FROM pg_catalog.pg_shdepend WHERE refobjid={{rid}}::oid) AND co.oid > {{lastsysoid}}::oid
 UNION ALL SELECT CASE WHEN prorettype=2279 THEN 'T' ELSE 'p' END, null, proname, null
-    FROM pg_proc pr
-    WHERE pr.oid IN (SELECT objid FROM pg_shdepend WHERE refobjid={{rid}}::oid) AND pr.oid > {{lastsysoid}}::oid
+    FROM pg_catalog.pg_proc pr
+    WHERE pr.oid IN (SELECT objid FROM pg_catalog.pg_shdepend WHERE refobjid={{rid}}::oid) AND pr.oid > {{lastsysoid}}::oid
 UNION ALL SELECT 'o', null, oprname || '('::text || COALESCE(tl.typname, ''::text) || CASE WHEN tl.oid IS NOT NULL
         AND tr.oid IS NOT NULL THEN ','::text END || COALESCE(tr.typname, ''::text) || ')'::text, null
-    FROM pg_operator op
-    LEFT JOIN pg_type tl ON tl.oid=op.oprleft
-    LEFT JOIN pg_type tr ON tr.oid=op.oprright
-    WHERE op.oid IN (SELECT objid FROM pg_shdepend WHERE refobjid={{rid}}::oid) AND op.oid > {{lastsysoid}}::oid
+    FROM pg_catalog.pg_operator op
+    LEFT JOIN pg_catalog.pg_type tl ON tl.oid=op.oprleft
+    LEFT JOIN pg_catalog.pg_type tr ON tr.oid=op.oprright
+    WHERE op.oid IN (SELECT objid FROM pg_catalog.pg_shdepend WHERE refobjid={{rid}}::oid) AND op.oid > {{lastsysoid}}::oid
 ORDER BY 1,2,3
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.1_plus/nodes.sql b/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.1_plus/nodes.sql
index 8729936e1..1f450b07e 100644
--- a/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.1_plus/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.1_plus/nodes.sql
@@ -1,7 +1,7 @@
 SELECT
 	r.oid, r.rolname, r.rolcanlogin, r.rolsuper
 FROM
-	pg_roles r
+	pg_catalog.pg_roles r
 {% if rid %}
 WHERE r.oid = {{ rid|qtLiteral }}::oid
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.1_plus/permission.sql b/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.1_plus/permission.sql
index 111dedd81..a9180095e 100644
--- a/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.1_plus/permission.sql
+++ b/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.1_plus/permission.sql
@@ -1,5 +1,5 @@
 SELECT
     rolname, rolcanlogin, rolcatupdate, rolsuper
 FROM
-    pg_roles
+    pg_catalog.pg_roles
 WHERE oid = {{ rid }}::OID
diff --git a/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.1_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.1_plus/properties.sql
index c99789b3d..d7d90dd25 100644
--- a/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.1_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.1_plus/properties.sql
@@ -1,16 +1,16 @@
 SELECT
 	r.oid, r.*,
 	pg_catalog.shobj_description(r.oid, 'pg_authid') AS description,
-	ARRAY(
+	pg_catalog.ARRAY(
 		SELECT
 			CASE WHEN am.admin_option THEN '1' ELSE '0' END || rm.rolname
 		FROM
-			(SELECT * FROM pg_auth_members WHERE member = r.oid) am
+			(SELECT * FROM pg_catalog.pg_auth_members WHERE member = r.oid) am
 			LEFT JOIN pg_catalog.pg_roles rm ON (rm.oid = am.roleid)
 	) rolmembership,
-	(SELECT array_agg(provider || '=' || label) FROM pg_shseclabel sl1 WHERE sl1.objoid=r.oid) AS seclabels
+	(SELECT pg_catalog.array_agg(provider || '=' || label) FROM pg_catalog.pg_shseclabel sl1 WHERE sl1.objoid=r.oid) AS seclabels
 FROM
-	pg_roles r
+	pg_catalog.pg_roles r
 {% if rid %}
 WHERE r.oid = {{ rid|qtLiteral }}::oid
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.1_plus/sql.sql b/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.1_plus/sql.sql
index 0fcad2679..172301bcb 100644
--- a/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.1_plus/sql.sql
+++ b/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.1_plus/sql.sql
@@ -1,5 +1,5 @@
 SELECT
-	array_to_string(array_agg(sql), E'\n\n')
+	pg_catalog.array_to_string(array_agg(sql), E'\n\n')
 FROM
 (SELECT
 	    '-- Role: '	||
@@ -8,7 +8,7 @@ FROM
 		pg_catalog.quote_ident(rolname) || E';\n\nCREATE ROLE ' ||
 		pg_catalog.quote_ident(rolname) || E' WITH\n  ' ||
 		CASE WHEN rolcanlogin THEN 'LOGIN' ELSE 'NOLOGIN' END || E'\n  ' ||
-		CASE WHEN rolcanlogin AND rolpassword LIKE 'md5%%' THEN 'ENCRYPTED PASSWORD ' || quote_literal(rolpassword) || E'\n  ' ELSE '' END ||
+		CASE WHEN rolcanlogin AND rolpassword LIKE 'md5%%' THEN 'ENCRYPTED PASSWORD ' || pg_catalog.quote_literal(rolpassword) || E'\n  ' ELSE '' END ||
 		CASE WHEN rolsuper THEN 'SUPERUSER' ELSE 'NOSUPERUSER' END || E'\n  ' ||
 		CASE WHEN rolinherit THEN 'INHERIT' ELSE 'NOINHERIT' END || E'\n  ' ||
 		CASE WHEN rolcreatedb THEN 'CREATEDB' ELSE 'NOCREATEDB' END || E'\n  ' ||
@@ -16,26 +16,26 @@ FROM
 		-- PostgreSQL >=  9.1
 		CASE WHEN rolreplication THEN 'REPLICATION' ELSE 'NOREPLICATION' END ||
 		CASE WHEN rolconnlimit > 0 THEN E'\n  CONNECTION LIMIT ' || rolconnlimit ELSE '' END ||
-		CASE WHEN rolvaliduntil IS NOT NULL THEN E'\n  VALID UNTIL ' || quote_literal(rolvaliduntil::text) ELSE '' END || ';' ||
+		CASE WHEN rolvaliduntil IS NOT NULL THEN E'\n  VALID UNTIL ' || pg_catalog.quote_literal(rolvaliduntil::text) ELSE '' END || ';' ||
 		-- PostgreSQL < 9.5
 		CASE WHEN rolsuper AND NOT rolcatupdate THEN E'\n\nUPDATE pg_authid SET rolcatupdate=false WHERE rolname=' || pg_catalog.quote_literal(rolname) || ';' ELSE '' END AS sql
 FROM
-	pg_roles r
+	pg_catalog.pg_roles r
 WHERE
 	r.oid=%(rid)s::OID
 UNION ALL
 (SELECT
-	array_to_string(array_agg(sql), E'\n')
+	pg_catalog.array_to_string(array_agg(sql), E'\n')
 FROM
 (SELECT
-	'GRANT ' || array_to_string(array_agg(rolname), ', ') || ' TO ' || pg_catalog.quote_ident(pg_get_userbyid(%(rid)s::OID)) ||
+	'GRANT ' || pg_catalog.array_to_string(pg_catalog.array_agg(rolname), ', ') || ' TO ' || pg_catalog.quote_ident(pg_catalog.pg_get_userbyid(%(rid)s::OID)) ||
 	CASE WHEN admin_option THEN ' WITH ADMIN OPTION;' ELSE ';' END AS sql
 FROM
 	(SELECT
-		quote_ident(r.rolname) AS rolname, m.admin_option AS admin_option
+		pg_catalog.quote_ident(r.rolname) AS rolname, m.admin_option AS admin_option
 	FROM
-		pg_auth_members m
-		LEFT JOIN pg_roles r ON (m.roleid = r.oid)
+		pg_catalog.pg_auth_members m
+		LEFT JOIN pg_catalog.pg_roles r ON (m.roleid = r.oid)
 	WHERE
 		m.member=%(rid)s::OID
 	ORDER BY
@@ -44,16 +44,16 @@ FROM
 GROUP BY admin_option) s)
 UNION ALL
 (SELECT
-	array_to_string(array_agg(sql), E'\n') AS sql
+	pg_catalog.array_to_string(array_agg(sql), E'\n') AS sql
 FROM
 (SELECT
-	'ALTER ROLE ' || pg_catalog.quote_ident(rolname) || ' SET ' || param || ' TO ' || CASE WHEN param IN ('search_path', 'temp_tablespaces') THEN value ELSE quote_literal(value) END || ';' AS sql
+	'ALTER ROLE ' || pg_catalog.quote_ident(rolname) || ' SET ' || param || ' TO ' || CASE WHEN param IN ('search_path', 'temp_tablespaces') THEN value ELSE pg_catalog.quote_literal(value) END || ';' AS sql
 FROM
 (SELECT
-	rolcanlogin, rolname, split_part(rolconfig, '=', 1) AS param, replace(rolconfig, split_part(rolconfig, '=', 1) || '=', '') AS value
+	rolcanlogin, rolname, pg_catalog.split_part(rolconfig, '=', 1) AS param, pg_catalog.replace(rolconfig, pg_catalog.split_part(rolconfig, '=', 1) || '=', '') AS value
 FROM
 	(SELECT
-			unnest(rolconfig) AS rolconfig, rolcanlogin, rolname
+			pg_catalog.unnest(rolconfig) AS rolconfig, rolcanlogin, rolname
 	FROM
 		pg_catalog.pg_roles
 	WHERE
@@ -63,22 +63,22 @@ FROM
 -- PostgreSQL >= 9.0
 UNION ALL
 (SELECT
-	array_to_string(array_agg(sql), E'\n') AS sql
+	pg_catalog.array_to_string(array_agg(sql), E'\n') AS sql
 FROM
 	(SELECT
-		'ALTER ROLE ' || pg_catalog.quote_ident(pg_get_userbyid(%(rid)s::OID)) ||
+		'ALTER ROLE ' || pg_catalog.quote_ident(pg_catalog.pg_get_userbyid(%(rid)s::OID)) ||
 		' IN DATABASE ' || pg_catalog.quote_ident(datname) ||
 		' SET ' || param|| ' TO ' ||
 		CASE
 		WHEN param IN ('search_path', 'temp_tablespaces') THEN value
-		ELSE quote_literal(value)
+		ELSE pg_catalog.quote_literal(value)
 		END || ';' AS sql
 	FROM
 		(SELECT
-			datname, split_part(rolconfig, '=', 1) AS param, replace(rolconfig, split_part(rolconfig, '=', 1) || '=', '') AS value
+			datname, pg_catalog.split_part(rolconfig, '=', 1) AS param, pg_catalog.replace(rolconfig, pg_catalog.split_part(rolconfig, '=', 1) || '=', '') AS value
 		FROM
 			(SELECT
-				d.datname, unnest(c.setconfig) AS rolconfig
+				d.datname, pg_catalog.unnest(c.setconfig) AS rolconfig
 			FROM
 				(SELECT *
 				FROM
@@ -92,7 +92,7 @@ FROM
 )
 UNION ALL
 (SELECT
-	'COMMENT ON ROLE ' || pg_catalog.quote_ident(pg_get_userbyid(%(rid)s::OID)) || ' IS ' ||  pg_catalog.quote_literal(description) || ';' AS sql
+	'COMMENT ON ROLE ' || pg_catalog.quote_ident(pg_catalog.pg_get_userbyid(%(rid)s::OID)) || ' IS ' ||  pg_catalog.quote_literal(description) || ';' AS sql
 FROM
 	(SELECT	pg_catalog.shobj_description(%(rid)s::OID, 'pg_authid') AS description) a
 WHERE
@@ -100,7 +100,7 @@ WHERE
 -- PostgreSQL >= 9.2
 UNION ALL
 (SELECT
-	array_to_string(array_agg(sql), E'\n') AS sql
+	pg_catalog.array_to_string(array_agg(sql), E'\n') AS sql
 FROM
 	(SELECT
 		'SECURITY LABEL FOR ' || provider ||
@@ -112,7 +112,7 @@ FROM
 		FROM
 			(SELECT *
 			FROM
-				pg_shseclabel sl1
+				pg_catalog.pg_shseclabel sl1
 			WHERE sl1.objoid=%(rid)s::OID) s
 			LEFT JOIN pg_catalog.pg_roles r ON (s.objoid=r.oid)) a) b
 )) AS a
diff --git a/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.1_plus/variables.sql b/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.1_plus/variables.sql
index b8620c185..2226cd8e1 100644
--- a/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.1_plus/variables.sql
+++ b/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.1_plus/variables.sql
@@ -1,8 +1,8 @@
 SELECT
-    split_part(rolconfig, '=', 1) AS name, replace(rolconfig, split_part(rolconfig, '=', 1) || '=', '') AS value, NULL::text AS database
+    pg_catalog.split_part(rolconfig, '=', 1) AS name, pg_catalog.replace(rolconfig, pg_catalog.split_part(rolconfig, '=', 1) || '=', '') AS value, NULL::text AS database
 FROM
     (SELECT
-            unnest(rolconfig) AS rolconfig, rolcanlogin, rolname
+            pg_catalog.unnest(rolconfig) AS rolconfig, rolcanlogin, rolname
     FROM
         pg_catalog.pg_roles
     WHERE
@@ -11,10 +11,10 @@ FROM
 
 UNION ALL
 SELECT
-    split_part(rolconfig, '=', 1) AS name, replace(rolconfig, split_part(rolconfig, '=', 1) || '=', '') AS value, datname AS database
+    pg_catalog.split_part(rolconfig, '=', 1) AS name, pg_catalog.replace(rolconfig, pg_catalog.split_part(rolconfig, '=', 1) || '=', '') AS value, datname AS database
 FROM
     (SELECT
-        d.datname, unnest(c.setconfig) AS rolconfig
+        d.datname, pg_catalog.unnest(c.setconfig) AS rolconfig
     FROM
         (SELECT *
         FROM pg_catalog.pg_db_role_setting dr
diff --git a/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.4_plus/dependents.sql b/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.4_plus/dependents.sql
index 8e398878c..77c50ac8f 100644
--- a/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.4_plus/dependents.sql
+++ b/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.4_plus/dependents.sql
@@ -2,39 +2,39 @@
 SELECT 'd' as type, datname,
     datallowconn AND pg_catalog.has_database_privilege(datname, 'CONNECT') AS datallowconn,
     datdba, datlastsysoid
-FROM pg_database db
+FROM pg_catalog.pg_database db
 UNION
 SELECT 'M', spcname, null, null, null
-    FROM pg_tablespace where spcowner={{rid}}::oid
+    FROM pg_catalog.pg_tablespace where spcowner={{rid}}::oid
 ORDER BY 1, 2
 {% endif %}
 
 {% if fetch_dependents %}
 SELECT cl.relkind, COALESCE(cin.nspname, cln.nspname) as nspname,
     COALESCE(ci.relname, cl.relname) as relname, cl.relname as indname
-FROM pg_class cl
-JOIN pg_namespace cln ON cl.relnamespace=cln.oid
-LEFT OUTER JOIN pg_index ind ON ind.indexrelid=cl.oid
-LEFT OUTER JOIN pg_class ci ON ind.indrelid=ci.oid
-LEFT OUTER JOIN pg_namespace cin ON ci.relnamespace=cin.oid
-WHERE cl.oid IN (SELECT objid FROM pg_shdepend WHERE refobjid={{rid}}::oid) AND cl.oid > {{lastsysoid}}::oid
+FROM pg_catalog.pg_class cl
+JOIN pg_catalog.pg_namespace cln ON cl.relnamespace=cln.oid
+LEFT OUTER JOIN pg_catalog.pg_index ind ON ind.indexrelid=cl.oid
+LEFT OUTER JOIN pg_catalog.pg_class ci ON ind.indrelid=ci.oid
+LEFT OUTER JOIN pg_catalog.pg_namespace cin ON ci.relnamespace=cin.oid
+WHERE cl.oid IN (SELECT objid FROM pg_catalog.pg_shdepend WHERE refobjid={{rid}}::oid) AND cl.oid > {{lastsysoid}}::oid
 UNION ALL SELECT 'n', null, nspname, null
-    FROM pg_namespace nsp
-    WHERE nsp.oid IN (SELECT objid FROM pg_shdepend WHERE refobjid={{rid}}::oid) AND nsp.oid > {{lastsysoid}}::oid
+    FROM pg_catalog.pg_namespace nsp
+    WHERE nsp.oid IN (SELECT objid FROM pg_catalog.pg_shdepend WHERE refobjid={{rid}}::oid) AND nsp.oid > {{lastsysoid}}::oid
 UNION ALL SELECT CASE WHEN typtype='d' THEN 'd' ELSE 'y' END, null, typname, null
-    FROM pg_type ty
-    WHERE ty.oid IN (SELECT objid FROM pg_shdepend WHERE refobjid={{rid}}::oid) AND ty.oid > {{lastsysoid}}::oid
+    FROM pg_catalog.pg_type ty
+    WHERE ty.oid IN (SELECT objid FROM pg_catalog.pg_shdepend WHERE refobjid={{rid}}::oid) AND ty.oid > {{lastsysoid}}::oid
 UNION ALL SELECT 'C', null, conname, null
-    FROM pg_conversion co
-    WHERE co.oid IN (SELECT objid FROM pg_shdepend WHERE refobjid={{rid}}::oid) AND co.oid > {{lastsysoid}}::oid
+    FROM pg_catalog.pg_conversion co
+    WHERE co.oid IN (SELECT objid FROM pg_catalog.pg_shdepend WHERE refobjid={{rid}}::oid) AND co.oid > {{lastsysoid}}::oid
 UNION ALL SELECT CASE WHEN prorettype=2279 THEN 'T' ELSE 'p' END, null, proname, null
-    FROM pg_proc pr
-    WHERE pr.oid IN (SELECT objid FROM pg_shdepend WHERE refobjid={{rid}}::oid) AND pr.oid > {{lastsysoid}}::oid
+    FROM pg_catalog.pg_proc pr
+    WHERE pr.oid IN (SELECT objid FROM pg_catalog.pg_shdepend WHERE refobjid={{rid}}::oid) AND pr.oid > {{lastsysoid}}::oid
 UNION ALL SELECT 'o', null, oprname || '('::text || COALESCE(tl.typname, ''::text) || CASE WHEN tl.oid IS NOT NULL
         AND tr.oid IS NOT NULL THEN ','::text END || COALESCE(tr.typname, ''::text) || ')'::text, null
-    FROM pg_operator op
-    LEFT JOIN pg_type tl ON tl.oid=op.oprleft
-    LEFT JOIN pg_type tr ON tr.oid=op.oprright
-    WHERE op.oid IN (SELECT objid FROM pg_shdepend WHERE refobjid={{rid}}::oid) AND op.oid > {{lastsysoid}}::oid
+    FROM pg_catalog.pg_operator op
+    LEFT JOIN pg_catalog.pg_type tl ON tl.oid=op.oprleft
+    LEFT JOIN pg_catalog.pg_type tr ON tr.oid=op.oprright
+    WHERE op.oid IN (SELECT objid FROM pg_catalog.pg_shdepend WHERE refobjid={{rid}}::oid) AND op.oid > {{lastsysoid}}::oid
 ORDER BY 1,2,3
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.4_plus/nodes.sql b/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.4_plus/nodes.sql
index 8729936e1..1f450b07e 100644
--- a/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.4_plus/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.4_plus/nodes.sql
@@ -1,7 +1,7 @@
 SELECT
 	r.oid, r.rolname, r.rolcanlogin, r.rolsuper
 FROM
-	pg_roles r
+	pg_catalog.pg_roles r
 {% if rid %}
 WHERE r.oid = {{ rid|qtLiteral }}::oid
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.4_plus/permission.sql b/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.4_plus/permission.sql
index 8fef065fb..ae8edeb7b 100644
--- a/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.4_plus/permission.sql
+++ b/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.4_plus/permission.sql
@@ -1,5 +1,5 @@
 SELECT
     rolname, rolcanlogin, rolsuper AS rolcatupdate, rolsuper
 FROM
-    pg_roles
+    pg_catalog.pg_roles
 WHERE oid = {{ rid }}::OID
diff --git a/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.4_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.4_plus/properties.sql
index 4699e10da..0f07798a6 100644
--- a/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.4_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.4_plus/properties.sql
@@ -5,13 +5,13 @@ SELECT
 		SELECT
 			CASE WHEN am.admin_option THEN '1' ELSE '0' END || rm.rolname
 		FROM
-			(SELECT * FROM pg_auth_members WHERE member = r.oid) am
+			(SELECT * FROM pg_catalog.pg_auth_members WHERE member = r.oid) am
 			LEFT JOIN pg_catalog.pg_roles rm ON (rm.oid = am.roleid)
 		ORDER BY rm.rolname
 	) AS rolmembership,
-	(SELECT array_agg(provider || '=' || label) FROM pg_shseclabel sl1 WHERE sl1.objoid=r.oid) AS seclabels
+	(SELECT pg_catalog.array_agg(provider || '=' || label) FROM pg_catalog.pg_shseclabel sl1 WHERE sl1.objoid=r.oid) AS seclabels
 FROM
-	pg_roles r
+	pg_catalog.pg_roles r
 {% if rid %}
 WHERE r.oid = {{ rid|qtLiteral }}::oid
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.4_plus/sql.sql b/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.4_plus/sql.sql
index 0120ed2bb..34578de2f 100644
--- a/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.4_plus/sql.sql
+++ b/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.4_plus/sql.sql
@@ -1,5 +1,5 @@
 SELECT
-	array_to_string(array_agg(sql), E'\n\n') AS sql
+	pg_catalog.array_to_string(array_agg(sql), E'\n\n') AS sql
 FROM
 (SELECT
 	    '-- Role: ' ||
@@ -19,26 +19,26 @@ FROM
         (SELECT CASE
             WHEN (rolpassword LIKE 'md5%%' or rolpassword LIKE 'SCRAM%%') THEN E'\n  ENCRYPTED PASSWORD ''' || rolpassword || ''''
             WHEN rolpassword IS NOT NULL THEN E'\n  PASSWORD ''' || rolpassword || ''''
-            ELSE '' END FROM pg_authid au WHERE au.oid=r.oid) ||
+            ELSE '' END FROM pg_catalog.pg_authid au WHERE au.oid=r.oid) ||
 {% endif %}
-		CASE WHEN rolvaliduntil IS NOT NULL THEN E'\n  VALID UNTIL ' || quote_literal(rolvaliduntil::text) ELSE '' END || ';' AS sql
+		CASE WHEN rolvaliduntil IS NOT NULL THEN E'\n  VALID UNTIL ' || pg_catalog.quote_literal(rolvaliduntil::text) ELSE '' END || ';' AS sql
 FROM
-	pg_roles r
+	pg_catalog.pg_roles r
 WHERE
 	r.oid=%(rid)s::OID
 UNION ALL
 (SELECT
-	array_to_string(array_agg(sql), E'\n') AS sql
+	pg_catalog.array_to_string(array_agg(sql), E'\n') AS sql
 FROM
 (SELECT
-	'GRANT ' || array_to_string(array_agg(rolname order by rolname), ', ') || ' TO ' || pg_catalog.quote_ident(pg_get_userbyid(%(rid)s::OID)) ||
+	'GRANT ' || pg_catalog.array_to_string(pg_catalog.array_agg(rolname order by rolname), ', ') || ' TO ' || pg_catalog.quote_ident(pg_catalog.pg_get_userbyid(%(rid)s::OID)) ||
 	CASE WHEN admin_option THEN ' WITH ADMIN OPTION;' ELSE ';' END AS sql
 FROM
 	(SELECT
-		quote_ident(r.rolname) AS rolname, m.admin_option AS admin_option
+		pg_catalog.quote_ident(r.rolname) AS rolname, m.admin_option AS admin_option
 	FROM
-		pg_auth_members m
-		LEFT JOIN pg_roles r ON (m.roleid = r.oid)
+		pg_catalog.pg_auth_members m
+		LEFT JOIN pg_catalog.pg_roles r ON (m.roleid = r.oid)
 	WHERE
 		m.member=%(rid)s::OID
 	ORDER BY
@@ -47,16 +47,16 @@ FROM
 GROUP BY admin_option) s)
 UNION ALL
 (SELECT
-	array_to_string(array_agg(sql), E'\n') AS sql
+	pg_catalog.array_to_string(array_agg(sql), E'\n') AS sql
 FROM
 (SELECT
-	'ALTER ROLE ' || pg_catalog.quote_ident(rolname) || ' SET ' || param || ' TO ' || CASE WHEN param IN ('search_path', 'temp_tablespaces') THEN value ELSE quote_literal(value) END || ';' AS sql
+	'ALTER ROLE ' || pg_catalog.quote_ident(rolname) || ' SET ' || param || ' TO ' || CASE WHEN param IN ('search_path', 'temp_tablespaces') THEN value ELSE pg_catalog.quote_literal(value) END || ';' AS sql
 FROM
 (SELECT
-	rolcanlogin, rolname, split_part(rolconfig, '=', 1) AS param, replace(rolconfig, split_part(rolconfig, '=', 1) || '=', '') AS value
+	rolcanlogin, rolname, pg_catalog.split_part(rolconfig, '=', 1) AS param, pg_catalog.replace(rolconfig, pg_catalog.split_part(rolconfig, '=', 1) || '=', '') AS value
 FROM
 	(SELECT
-			unnest(rolconfig) AS rolconfig, rolcanlogin, rolname
+			pg_catalog.unnest(rolconfig) AS rolconfig, rolcanlogin, rolname
 	FROM
 		pg_catalog.pg_roles
 	WHERE
@@ -66,7 +66,7 @@ FROM
 -- PostgreSQL >= 9.0
 UNION ALL
 (SELECT
-	array_to_string(array_agg(sql), E'\n') AS sql
+	pg_catalog.array_to_string(array_agg(sql), E'\n') AS sql
 FROM
 	(SELECT
 		'ALTER ROLE ' || pg_catalog.quote_ident(pg_get_userbyid(%(rid)s::OID)) ||
@@ -74,11 +74,11 @@ FROM
 		' SET ' || param|| ' TO ' ||
 		CASE
 		WHEN param IN ('search_path', 'temp_tablespaces') THEN value
-		ELSE quote_literal(value)
+		ELSE pg_catalog.quote_literal(value)
 		END || ';' AS sql
 	FROM
 		(SELECT
-			datname, split_part(rolconfig, '=', 1) AS param, replace(rolconfig, split_part(rolconfig, '=', 1) || '=', '') AS value
+			datname, pg_catalog.split_part(rolconfig, '=', 1) AS param, pg_catalog.replace(rolconfig, pg_catalog.split_part(rolconfig, '=', 1) || '=', '') AS value
 		FROM
 			(SELECT
 				d.datname, unnest(c.setconfig) AS rolconfig
@@ -103,7 +103,7 @@ WHERE
 -- PostgreSQL >= 9.2
 UNION ALL
 (SELECT
-	array_to_string(array_agg(sql), E'\n') AS sql
+	pg_catalog.array_to_string(array_agg(sql), E'\n') AS sql
 FROM
 	(SELECT
 		'SECURITY LABEL FOR ' || provider ||
@@ -115,7 +115,7 @@ FROM
 		FROM
 			(SELECT *
 			FROM
-				pg_shseclabel sl1
+				pg_catalog.pg_shseclabel sl1
 			WHERE sl1.objoid=%(rid)s::OID) s
 			LEFT JOIN pg_catalog.pg_roles r ON (s.objoid=r.oid)) a) b
 )) AS a
diff --git a/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.4_plus/variables.sql b/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.4_plus/variables.sql
index b8620c185..2226cd8e1 100644
--- a/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.4_plus/variables.sql
+++ b/web/pgadmin/browser/server_groups/servers/roles/templates/roles/sql/9.4_plus/variables.sql
@@ -1,8 +1,8 @@
 SELECT
-    split_part(rolconfig, '=', 1) AS name, replace(rolconfig, split_part(rolconfig, '=', 1) || '=', '') AS value, NULL::text AS database
+    pg_catalog.split_part(rolconfig, '=', 1) AS name, pg_catalog.replace(rolconfig, pg_catalog.split_part(rolconfig, '=', 1) || '=', '') AS value, NULL::text AS database
 FROM
     (SELECT
-            unnest(rolconfig) AS rolconfig, rolcanlogin, rolname
+            pg_catalog.unnest(rolconfig) AS rolconfig, rolcanlogin, rolname
     FROM
         pg_catalog.pg_roles
     WHERE
@@ -11,10 +11,10 @@ FROM
 
 UNION ALL
 SELECT
-    split_part(rolconfig, '=', 1) AS name, replace(rolconfig, split_part(rolconfig, '=', 1) || '=', '') AS value, datname AS database
+    pg_catalog.split_part(rolconfig, '=', 1) AS name, pg_catalog.replace(rolconfig, pg_catalog.split_part(rolconfig, '=', 1) || '=', '') AS value, datname AS database
 FROM
     (SELECT
-        d.datname, unnest(c.setconfig) AS rolconfig
+        d.datname, pg_catalog.unnest(c.setconfig) AS rolconfig
     FROM
         (SELECT *
         FROM pg_catalog.pg_db_role_setting dr
diff --git a/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/9.2_plus/nodes.sql b/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/9.2_plus/nodes.sql
index 37d453835..637415ac6 100644
--- a/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/9.2_plus/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/9.2_plus/nodes.sql
@@ -1,7 +1,7 @@
 SELECT
     ts.oid AS oid, spcname AS name, spcowner as owner
 FROM
-    pg_tablespace ts
+    pg_catalog.pg_tablespace ts
 {% if tsid %}
 WHERE
     ts.oid={{ tsid|qtLiteral }}::OID
diff --git a/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/9.2_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/9.2_plus/properties.sql
index 2fc4ae020..1c57e95cb 100644
--- a/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/9.2_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/9.2_plus/properties.sql
@@ -1,15 +1,15 @@
 {### SQL to fetch tablespace object properties ###}
 SELECT
-    ts.oid, spcname AS name, spcoptions, pg_get_userbyid(spcowner) as spcuser,
+    ts.oid, spcname AS name, spcoptions, pg_catalog.pg_get_userbyid(spcowner) as spcuser,
     pg_catalog.pg_tablespace_location(ts.oid) AS spclocation,
-    array_to_string(spcacl::text[], ', ') as acl,
+    pg_catalog.array_to_string(spcacl::text[], ', ') as acl,
     pg_catalog.shobj_description(oid, 'pg_tablespace') AS description,
     (SELECT
-        array_agg(provider || '=' || label)
-    FROM pg_shseclabel sl1
+        pg_catalog.array_agg(provider || '=' || label)
+    FROM pg_catalog.pg_shseclabel sl1
     WHERE sl1.objoid=ts.oid) AS seclabels
 FROM
-    pg_tablespace ts
+    pg_catalog.pg_tablespace ts
 {% if tsid %}
 WHERE ts.oid={{ tsid|qtLiteral }}::OID
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/9.6_plus/variables.sql b/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/9.6_plus/variables.sql
index aba2dbc0e..72fd0bf07 100644
--- a/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/9.6_plus/variables.sql
+++ b/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/9.6_plus/variables.sql
@@ -1,4 +1,4 @@
 {### SQL to fetch tablespace object options ###}
 SELECT name, vartype, min_val, max_val, enumvals
-FROM pg_settings
-WHERE name IN ('seq_page_cost', 'random_page_cost', 'effective_io_concurrency');
\ No newline at end of file
+FROM pg_catalog.pg_settings
+WHERE name IN ('seq_page_cost', 'random_page_cost', 'effective_io_concurrency');
diff --git a/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/acl.sql b/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/acl.sql
index fedd2fb52..e38fd3025 100644
--- a/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/acl.sql
+++ b/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/acl.sql
@@ -1,6 +1,6 @@
 {### SQL to fetch privileges for tablespace ###}
 SELECT 'spcacl' as deftype, COALESCE(gt.rolname, 'PUBLIC') grantee, g.rolname grantor,
-    array_agg(privilege_type) as privileges, array_agg(is_grantable) as grantable
+    pg_catalog.array_agg(privilege_type) as privileges, pg_catalog.array_agg(is_grantable) as grantable
 FROM
   (SELECT
     d.grantee, d.grantor, d.is_grantable,
@@ -10,14 +10,14 @@ FROM
     END AS privilege_type
   FROM
     (SELECT ts.spcacl
-        FROM pg_tablespace ts
+        FROM pg_catalog.pg_tablespace ts
         {% if tsid %}
         WHERE ts.oid={{ tsid|qtLiteral }}::OID
         {% endif %}
     ) acl,
     (SELECT (d).grantee AS grantee, (d).grantor AS grantor, (d).is_grantable
         AS is_grantable, (d).privilege_type AS privilege_type FROM (SELECT
-        aclexplode(ts.spcacl) as d FROM pg_tablespace ts
+        pg_catalog.aclexplode(ts.spcacl) as d FROM pg_catalog.pg_tablespace ts
         {% if tsid %}
         WHERE ts.oid={{ tsid|qtLiteral }}::OID
         {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/dependents.sql b/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/dependents.sql
index 52ddc7689..3fac56c77 100644
--- a/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/dependents.sql
+++ b/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/dependents.sql
@@ -2,19 +2,19 @@
 SELECT datname,
     datallowconn AND pg_catalog.has_database_privilege(datname, 'CONNECT') AS datallowconn,
     dattablespace
-FROM pg_database db
+FROM pg_catalog.pg_database db
 ORDER BY datname
 {% endif %}
 
 {% if fetch_dependents %}
 SELECT cl.relkind, COALESCE(cin.nspname, cln.nspname) as nspname,
     COALESCE(ci.relname, cl.relname) as relname, cl.relname as indname
-FROM pg_class cl
-JOIN pg_namespace cln ON cl.relnamespace=cln.oid
-LEFT OUTER JOIN pg_index ind ON ind.indexrelid=cl.oid
-LEFT OUTER JOIN pg_class ci ON ind.indrelid=ci.oid
-LEFT OUTER JOIN pg_namespace cin ON ci.relnamespace=cin.oid,
-pg_database WHERE datname = current_database() AND
+FROM pg_catalog.pg_class cl
+JOIN pg_catalog.pg_namespace cln ON cl.relnamespace=cln.oid
+LEFT OUTER JOIN pg_catalog.pg_index ind ON ind.indexrelid=cl.oid
+LEFT OUTER JOIN pg_catalog.pg_class ci ON ind.indrelid=ci.oid
+LEFT OUTER JOIN pg_catalog.pg_namespace cin ON ci.relnamespace=cin.oid,
+pg_catalog.pg_database WHERE datname = current_database() AND
 (cl.reltablespace = {{tsid}}::oid OR (cl.reltablespace=0 AND dattablespace = {{tsid}}::oid))
 ORDER BY 1,2,3
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/nodes.sql b/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/nodes.sql
index f0ac205cf..b65390168 100644
--- a/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/nodes.sql
+++ b/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/nodes.sql
@@ -1,7 +1,7 @@
 SELECT
     ts.oid, spcname AS name, spcowner as owner
 FROM
-    pg_tablespace ts
+    pg_catalog.pg_tablespace ts
 {% if tsid %}
 WHERE
     ts.oid={{ tsid|qtLiteral }}::OID
diff --git a/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/properties.sql b/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/properties.sql
index fbf3ec334..a876eaca0 100644
--- a/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/properties.sql
@@ -1,11 +1,11 @@
 {### SQL to fetch tablespace object properties ###}
 SELECT
     ts.oid, spcname AS name, spclocation, spcoptions,
-    pg_get_userbyid(spcowner) as spcuser,
+    pg_catalog.pg_get_userbyid(spcowner) as spcuser,
     pg_catalog.shobj_description(oid, 'pg_tablespace') AS description,
-    array_to_string(spcacl::text[], ', ') as acl
+    pg_catalog.array_to_string(spcacl::text[], ', ') as acl
 FROM
-    pg_tablespace ts
+    pg_catalog.pg_tablespace ts
 {% if tsid %}
 WHERE ts.oid={{ tsid|qtLiteral }}::OID
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/stats.sql b/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/stats.sql
index 5fc429ec1..408644a79 100644
--- a/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/stats.sql
@@ -1,9 +1,9 @@
 {### SQL to fetch tablespace object stats ###}
 {% if tsid %}
-SELECT pg_tablespace_size({{ tsid|qtLiteral }}::OID) AS {{ conn|qtIdent(_('Size')) }}
+SELECT pg_catalog.pg_tablespace_size({{ tsid|qtLiteral }}::OID) AS {{ conn|qtIdent(_('Size')) }}
 {% else %}
 SELECT ts.spcname AS {{ conn|qtIdent(_('Name')) }},
-    pg_tablespace_size(ts.oid) AS {{ conn|qtIdent(_('Size')) }}
+    pg_catalog.pg_tablespace_size(ts.oid) AS {{ conn|qtIdent(_('Size')) }}
 FROM
     pg_catalog.pg_tablespace ts;
 {% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/variables.sql b/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/variables.sql
index d476a050c..a7279d547 100644
--- a/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/variables.sql
+++ b/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/variables.sql
@@ -1,4 +1,4 @@
 {### SQL to fetch tablespace object options ###}
 SELECT name, vartype, min_val, max_val, enumvals
-FROM pg_settings
-WHERE name IN ('seq_page_cost', 'random_page_cost');
\ No newline at end of file
+FROM pg_catalog.pg_settings
+WHERE name IN ('seq_page_cost', 'random_page_cost');
diff --git a/web/pgadmin/browser/server_groups/servers/templates/connect/sql/10_plus/check_recovery.sql b/web/pgadmin/browser/server_groups/servers/templates/connect/sql/10_plus/check_recovery.sql
index fd27aaab7..cf553b23d 100644
--- a/web/pgadmin/browser/server_groups/servers/templates/connect/sql/10_plus/check_recovery.sql
+++ b/web/pgadmin/browser/server_groups/servers/templates/connect/sql/10_plus/check_recovery.sql
@@ -1,9 +1,9 @@
 SELECT CASE WHEN usesuper
-       THEN pg_is_in_recovery()
+       THEN pg_catalog.pg_is_in_recovery()
        ELSE FALSE
        END as inrecovery,
-       CASE WHEN usesuper AND pg_is_in_recovery()
+       CASE WHEN usesuper AND pg_catalog.pg_is_in_recovery()
        THEN pg_is_wal_replay_paused()
        ELSE FALSE
        END as isreplaypaused
-FROM pg_user WHERE usename=current_user
\ No newline at end of file
+FROM pg_catalog.pg_user WHERE usename=current_user
diff --git a/web/pgadmin/browser/server_groups/servers/templates/connect/sql/9.0_plus/check_recovery.sql b/web/pgadmin/browser/server_groups/servers/templates/connect/sql/9.0_plus/check_recovery.sql
index 740f191c9..03c4d6188 100644
--- a/web/pgadmin/browser/server_groups/servers/templates/connect/sql/9.0_plus/check_recovery.sql
+++ b/web/pgadmin/browser/server_groups/servers/templates/connect/sql/9.0_plus/check_recovery.sql
@@ -1,9 +1,9 @@
 SELECT CASE WHEN usesuper
-       THEN pg_is_in_recovery()
+       THEN pg_catalog.pg_is_in_recovery()
        ELSE FALSE
        END as inrecovery,
-       CASE WHEN usesuper AND pg_is_in_recovery()
+       CASE WHEN usesuper AND pg_catalog.pg_is_in_recovery()
        THEN pg_is_xlog_replay_paused()
        ELSE FALSE
        END as isreplaypaused
-FROM pg_user WHERE usename=current_user
\ No newline at end of file
+FROM pg_catalog.pg_user WHERE usename=current_user
diff --git a/web/pgadmin/browser/server_groups/servers/templates/depends/pg/10_plus/dependents.sql b/web/pgadmin/browser/server_groups/servers/templates/depends/pg/10_plus/dependents.sql
index 8ca0b8a61..6d3621df1 100644
--- a/web/pgadmin/browser/server_groups/servers/templates/depends/pg/10_plus/dependents.sql
+++ b/web/pgadmin/browser/server_groups/servers/templates/depends/pg/10_plus/dependents.sql
@@ -26,53 +26,53 @@ SELECT DISTINCT dep.deptype, dep.classid, cl.relkind, ad.adbin, ad.adsrc,
     CASE WHEN cl.relname IS NOT NULL AND att.attname IS NOT NULL THEN cl.relname || COALESCE('.' || att.attname, '')
     ELSE COALESCE(cl.relname, co.conname, pr.proname, tg.tgname, ty.typname, la.lanname, rw.rulename, ns.nspname,
                   fs.srvname, fdw.fdwname, evt.evtname, col.collname, ftsc.cfgname, ftsd.dictname, ftsp.prsname,
-                  ftst.tmplname, ext.extname, pl.polname, quote_ident(pubns.nspname)||'.'||quote_ident(pubcl.relname))
+                  ftst.tmplname, ext.extname, pl.polname, pg_catalog.quote_ident(pubns.nspname)||'.'||pg_catalog.quote_ident(pubcl.relname))
     END AS refname,
     COALESCE(nsc.nspname, nso.nspname, nsp.nspname, nst.nspname, nsrw.nspname, colns.nspname, ftscns.nspname,
         ftsdns.nspname, ftspns.nspname, ftstns.nspname) AS nspname,
     CASE WHEN inhits.inhparent IS NOT NULL THEN '1' ELSE '0' END AS is_inherits,
     CASE WHEN inhed.inhparent IS NOT NULL THEN '1' ELSE '0' END AS is_inherited
-FROM pg_depend dep
-LEFT JOIN pg_class cl ON dep.objid=cl.oid
-LEFT JOIN pg_attribute att ON dep.objid=att.attrelid AND dep.objsubid=att.attnum
-LEFT JOIN pg_namespace nsc ON cl.relnamespace=nsc.oid
-LEFT JOIN pg_proc pr ON dep.objid=pr.oid
-LEFT JOIN pg_namespace nsp ON pr.pronamespace=nsp.oid
-LEFT JOIN pg_trigger tg ON dep.objid=tg.oid
-LEFT JOIN pg_type ty ON dep.objid=ty.oid
-LEFT JOIN pg_namespace nst ON ty.typnamespace=nst.oid
-LEFT JOIN pg_constraint co ON dep.objid=co.oid
-LEFT JOIN pg_class coc ON co.conrelid=coc.oid
-LEFT JOIN pg_namespace nso ON co.connamespace=nso.oid
-LEFT JOIN pg_rewrite rw ON dep.objid=rw.oid
-LEFT JOIN pg_class clrw ON clrw.oid=rw.ev_class
-LEFT JOIN pg_namespace nsrw ON clrw.relnamespace=nsrw.oid
-LEFT JOIN pg_language la ON dep.objid=la.oid
-LEFT JOIN pg_namespace ns ON dep.objid=ns.oid
-LEFT JOIN pg_attrdef ad ON ad.oid=dep.objid
-LEFT JOIN pg_foreign_server fs ON fs.oid=dep.objid
-LEFT JOIN pg_foreign_data_wrapper fdw ON fdw.oid=dep.objid
-LEFT JOIN pg_type prtyp ON prtyp.oid = pr.prorettype
-LEFT JOIN pg_inherits inhits ON (inhits.inhrelid=dep.objid)
-LEFT JOIN pg_inherits inhed ON (inhed.inhparent=dep.objid)
-LEFT JOIN pg_event_trigger evt ON evt.oid=dep.objid
-LEFT JOIN pg_collation col ON col.oid=dep.objid
-LEFT JOIN pg_namespace colns ON col.collnamespace=colns.oid
-LEFT JOIN pg_ts_config ftsc ON ftsc.oid=dep.objid
-LEFT JOIN pg_namespace ftscns ON ftsc.cfgnamespace=ftscns.oid
-LEFT JOIN pg_ts_dict ftsd ON ftsd.oid=dep.objid
-LEFT JOIN pg_namespace ftsdns ON ftsd.dictnamespace=ftsdns.oid
-LEFT JOIN pg_ts_parser ftsp ON ftsp.oid=dep.objid
-LEFT JOIN pg_namespace ftspns ON ftsp.prsnamespace=ftspns.oid
-LEFT JOIN pg_ts_template ftst ON ftst.oid=dep.objid
-LEFT JOIN pg_namespace ftstns ON ftst.tmplnamespace=ftstns.oid
-LEFT JOIN pg_extension ext ON ext.oid=dep.objid
-LEFT JOIN pg_policy pl ON pl.oid=dep.objid
-LEFT JOIN pg_publication_rel pub_rel ON pub_rel.oid = dep.objid
-LEFT JOIN pg_class pubcl ON pubcl.oid = pub_rel.prrelid
-LEFT JOIN pg_namespace pubns ON pubns.oid=pubcl.relnamespace
+FROM pg_catalog.pg_depend dep
+LEFT JOIN pg_catalog.pg_class cl ON dep.objid=cl.oid
+LEFT JOIN pg_catalog.pg_attribute att ON dep.objid=att.attrelid AND dep.objsubid=att.attnum
+LEFT JOIN pg_catalog.pg_namespace nsc ON cl.relnamespace=nsc.oid
+LEFT JOIN pg_catalog.pg_proc pr ON dep.objid=pr.oid
+LEFT JOIN pg_catalog.pg_namespace nsp ON pr.pronamespace=nsp.oid
+LEFT JOIN pg_catalog.pg_trigger tg ON dep.objid=tg.oid
+LEFT JOIN pg_catalog.pg_type ty ON dep.objid=ty.oid
+LEFT JOIN pg_catalog.pg_namespace nst ON ty.typnamespace=nst.oid
+LEFT JOIN pg_catalog.pg_constraint co ON dep.objid=co.oid
+LEFT JOIN pg_catalog.pg_class coc ON co.conrelid=coc.oid
+LEFT JOIN pg_catalog.pg_namespace nso ON co.connamespace=nso.oid
+LEFT JOIN pg_catalog.pg_rewrite rw ON dep.objid=rw.oid
+LEFT JOIN pg_catalog.pg_class clrw ON clrw.oid=rw.ev_class
+LEFT JOIN pg_catalog.pg_namespace nsrw ON clrw.relnamespace=nsrw.oid
+LEFT JOIN pg_catalog.pg_language la ON dep.objid=la.oid
+LEFT JOIN pg_catalog.pg_namespace ns ON dep.objid=ns.oid
+LEFT JOIN pg_catalog.pg_attrdef ad ON ad.oid=dep.objid
+LEFT JOIN pg_catalog.pg_foreign_server fs ON fs.oid=dep.objid
+LEFT JOIN pg_catalog.pg_foreign_data_wrapper fdw ON fdw.oid=dep.objid
+LEFT JOIN pg_catalog.pg_type prtyp ON prtyp.oid = pr.prorettype
+LEFT JOIN pg_catalog.pg_inherits inhits ON (inhits.inhrelid=dep.objid)
+LEFT JOIN pg_catalog.pg_inherits inhed ON (inhed.inhparent=dep.objid)
+LEFT JOIN pg_catalog.pg_event_trigger evt ON evt.oid=dep.objid
+LEFT JOIN pg_catalog.pg_collation col ON col.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace colns ON col.collnamespace=colns.oid
+LEFT JOIN pg_catalog.pg_ts_config ftsc ON ftsc.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftscns ON ftsc.cfgnamespace=ftscns.oid
+LEFT JOIN pg_catalog.pg_ts_dict ftsd ON ftsd.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftsdns ON ftsd.dictnamespace=ftsdns.oid
+LEFT JOIN pg_catalog.pg_ts_parser ftsp ON ftsp.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftspns ON ftsp.prsnamespace=ftspns.oid
+LEFT JOIN pg_catalog.pg_ts_template ftst ON ftst.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftstns ON ftst.tmplnamespace=ftstns.oid
+LEFT JOIN pg_catalog.pg_extension ext ON ext.oid=dep.objid
+LEFT JOIN pg_catalog.pg_policy pl ON pl.oid=dep.objid
+LEFT JOIN pg_catalog.pg_publication_rel pub_rel ON pub_rel.oid = dep.objid
+LEFT JOIN pg_catalog.pg_class pubcl ON pubcl.oid = pub_rel.prrelid
+LEFT JOIN pg_catalog.pg_namespace pubns ON pubns.oid=pubcl.relnamespace
 {{where_clause}} AND
-classid IN ( SELECT oid FROM pg_class WHERE relname IN
+classid IN ( SELECT oid FROM pg_catalog.pg_class WHERE relname IN
    ('pg_class', 'pg_constraint', 'pg_conversion', 'pg_language', 'pg_proc', 'pg_rewrite', 'pg_namespace',
    'pg_trigger', 'pg_type', 'pg_attrdef', 'pg_event_trigger', 'pg_foreign_server', 'pg_foreign_data_wrapper',
    'pg_collation', 'pg_ts_config', 'pg_ts_dict', 'pg_ts_parser', 'pg_ts_template', 'pg_extension', 'pg_policy', 'pg_subscription', 'pg_publication_rel'))
diff --git a/web/pgadmin/browser/server_groups/servers/templates/depends/pg/11_plus/dependencies.sql b/web/pgadmin/browser/server_groups/servers/templates/depends/pg/11_plus/dependencies.sql
index f286fa8a3..5b7f4ce94 100644
--- a/web/pgadmin/browser/server_groups/servers/templates/depends/pg/11_plus/dependencies.sql
+++ b/web/pgadmin/browser/server_groups/servers/templates/depends/pg/11_plus/dependencies.sql
@@ -31,44 +31,44 @@ SELECT DISTINCT dep.deptype, dep.refclassid, dep.refobjid, cl.relkind, ad.adbin,
         ftsdns.nspname, ftspns.nspname, ftstns.nspname) AS nspname,
     CASE WHEN inhits.inhparent IS NOT NULL THEN '1' ELSE '0' END AS is_inherits,
     CASE WHEN inhed.inhparent IS NOT NULL THEN '1' ELSE '0' END AS is_inherited
-FROM pg_depend dep
-LEFT JOIN pg_class cl ON dep.refobjid=cl.oid
-LEFT JOIN pg_attribute att ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
-LEFT JOIN pg_namespace nsc ON cl.relnamespace=nsc.oid
-LEFT JOIN pg_proc pr ON dep.refobjid=pr.oid
-LEFT JOIN pg_namespace nsp ON pr.pronamespace=nsp.oid
-LEFT JOIN pg_trigger tg ON dep.refobjid=tg.oid
-LEFT JOIN pg_type ty ON dep.refobjid=ty.oid
-LEFT JOIN pg_namespace nst ON ty.typnamespace=nst.oid
-LEFT JOIN pg_constraint co ON dep.refobjid=co.oid
-LEFT JOIN pg_class coc ON co.conrelid=coc.oid
-LEFT JOIN pg_namespace nso ON co.connamespace=nso.oid
-LEFT JOIN pg_rewrite rw ON dep.refobjid=rw.oid
-LEFT JOIN pg_class clrw ON clrw.oid=rw.ev_class
-LEFT JOIN pg_namespace nsrw ON clrw.relnamespace=nsrw.oid
-LEFT JOIN pg_language la ON dep.refobjid=la.oid
-LEFT JOIN pg_namespace ns ON dep.refobjid=ns.oid
-LEFT JOIN pg_attrdef ad ON ad.adrelid=att.attrelid AND ad.adnum=att.attnum
-LEFT JOIN pg_foreign_server fs ON fs.oid=dep.refobjid
-LEFT JOIN pg_foreign_data_wrapper fdw ON fdw.oid=dep.refobjid
-LEFT JOIN pg_type prtyp ON prtyp.oid = pr.prorettype
-LEFT JOIN pg_inherits inhits ON (inhits.inhrelid=dep.refobjid)
-LEFT JOIN pg_inherits inhed ON (inhed.inhparent=dep.refobjid)
-LEFT JOIN pg_event_trigger evt ON evt.oid=dep.refobjid
-LEFT JOIN pg_collation col ON col.oid=dep.refobjid
-LEFT JOIN pg_namespace colns ON col.collnamespace=colns.oid
-LEFT JOIN pg_ts_config ftsc ON ftsc.oid=dep.refobjid
-LEFT JOIN pg_namespace ftscns ON ftsc.cfgnamespace=ftscns.oid
-LEFT JOIN pg_ts_dict ftsd ON ftsd.oid=dep.refobjid
-LEFT JOIN pg_namespace ftsdns ON ftsd.dictnamespace=ftsdns.oid
-LEFT JOIN pg_ts_parser ftsp ON ftsp.oid=dep.refobjid
-LEFT JOIN pg_namespace ftspns ON ftsp.prsnamespace=ftspns.oid
-LEFT JOIN pg_ts_template ftst ON ftst.oid=dep.refobjid
-LEFT JOIN pg_namespace ftstns ON ftst.tmplnamespace=ftstns.oid
-LEFT JOIN pg_extension ext ON ext.oid=dep.refobjid
-LEFT JOIN pg_policy pl ON pl.oid=dep.refobjid
+FROM pg_catalog.pg_depend dep
+LEFT JOIN pg_catalog.pg_class cl ON dep.refobjid=cl.oid
+LEFT JOIN pg_catalog.pg_attribute att ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
+LEFT JOIN pg_catalog.pg_namespace nsc ON cl.relnamespace=nsc.oid
+LEFT JOIN pg_catalog.pg_proc pr ON dep.refobjid=pr.oid
+LEFT JOIN pg_catalog.pg_namespace nsp ON pr.pronamespace=nsp.oid
+LEFT JOIN pg_catalog.pg_trigger tg ON dep.refobjid=tg.oid
+LEFT JOIN pg_catalog.pg_type ty ON dep.refobjid=ty.oid
+LEFT JOIN pg_catalog.pg_namespace nst ON ty.typnamespace=nst.oid
+LEFT JOIN pg_catalog.pg_constraint co ON dep.refobjid=co.oid
+LEFT JOIN pg_catalog.pg_class coc ON co.conrelid=coc.oid
+LEFT JOIN pg_catalog.pg_namespace nso ON co.connamespace=nso.oid
+LEFT JOIN pg_catalog.pg_rewrite rw ON dep.refobjid=rw.oid
+LEFT JOIN pg_catalog.pg_class clrw ON clrw.oid=rw.ev_class
+LEFT JOIN pg_catalog.pg_namespace nsrw ON clrw.relnamespace=nsrw.oid
+LEFT JOIN pg_catalog.pg_language la ON dep.refobjid=la.oid
+LEFT JOIN pg_catalog.pg_namespace ns ON dep.refobjid=ns.oid
+LEFT JOIN pg_catalog.pg_attrdef ad ON ad.adrelid=att.attrelid AND ad.adnum=att.attnum
+LEFT JOIN pg_catalog.pg_foreign_server fs ON fs.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_foreign_data_wrapper fdw ON fdw.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_type prtyp ON prtyp.oid = pr.prorettype
+LEFT JOIN pg_catalog.pg_inherits inhits ON (inhits.inhrelid=dep.refobjid)
+LEFT JOIN pg_catalog.pg_inherits inhed ON (inhed.inhparent=dep.refobjid)
+LEFT JOIN pg_catalog.pg_event_trigger evt ON evt.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_collation col ON col.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace colns ON col.collnamespace=colns.oid
+LEFT JOIN pg_catalog.pg_ts_config ftsc ON ftsc.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace ftscns ON ftsc.cfgnamespace=ftscns.oid
+LEFT JOIN pg_catalog.pg_ts_dict ftsd ON ftsd.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace ftsdns ON ftsd.dictnamespace=ftsdns.oid
+LEFT JOIN pg_catalog.pg_ts_parser ftsp ON ftsp.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace ftspns ON ftsp.prsnamespace=ftspns.oid
+LEFT JOIN pg_catalog.pg_ts_template ftst ON ftst.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace ftstns ON ftst.tmplnamespace=ftstns.oid
+LEFT JOIN pg_catalog.pg_extension ext ON ext.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_policy pl ON pl.oid=dep.refobjid
 {{where_clause}} AND
-refclassid IN ( SELECT oid FROM pg_class WHERE relname IN
+refclassid IN ( SELECT oid FROM pg_catalog.pg_class WHERE relname IN
    ('pg_class', 'pg_constraint', 'pg_conversion', 'pg_language', 'pg_proc', 'pg_rewrite', 'pg_namespace',
    'pg_trigger', 'pg_type', 'pg_attrdef', 'pg_event_trigger', 'pg_foreign_server', 'pg_foreign_data_wrapper',
    'pg_collation', 'pg_ts_config', 'pg_ts_dict', 'pg_ts_parser', 'pg_ts_template', 'pg_extension', 'pg_policy'))
@@ -80,10 +80,10 @@ SELECT DISTINCT dep.deptype, dep.refclassid, dep.refobjid, cl.relkind, ad.adbin,
 	CASE WHEN cl.relname IS NOT NULL OR att.attname IS NOT NULL THEN cl.relname || COALESCE('.' || att.attname, '')
     ELSE cl.relname END AS refname,
     nsc.nspname AS nspname, '0' AS is_inherits, '0' AS is_inherited
-FROM pg_depend dep
-LEFT JOIN pg_class cl ON dep.refobjid=cl.oid
-LEFT JOIN pg_attribute att ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
-LEFT JOIN pg_namespace nsc ON cl.relnamespace=nsc.oid
-LEFT JOIN pg_attrdef ad ON ad.adrelid=att.attrelid AND ad.adnum=att.attnum
-WHERE dep.objid IN (SELECT oid FROM pg_rewrite WHERE ev_class={{object_id}}) AND cl.relkind not in ('v', 'm')
+FROM pg_catalog.pg_depend dep
+LEFT JOIN pg_catalog.pg_class cl ON dep.refobjid=cl.oid
+LEFT JOIN pg_catalog.pg_attribute att ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
+LEFT JOIN pg_catalog.pg_namespace nsc ON cl.relnamespace=nsc.oid
+LEFT JOIN pg_catalog.pg_attrdef ad ON ad.adrelid=att.attrelid AND ad.adnum=att.attnum
+WHERE dep.objid IN (SELECT oid FROM pg_catalog.pg_rewrite WHERE ev_class={{object_id}}) AND cl.relkind not in ('v', 'm')
 ORDER BY refclassid, relkind
diff --git a/web/pgadmin/browser/server_groups/servers/templates/depends/pg/11_plus/dependents.sql b/web/pgadmin/browser/server_groups/servers/templates/depends/pg/11_plus/dependents.sql
index 6f2e48288..ddbc6a4bf 100644
--- a/web/pgadmin/browser/server_groups/servers/templates/depends/pg/11_plus/dependents.sql
+++ b/web/pgadmin/browser/server_groups/servers/templates/depends/pg/11_plus/dependents.sql
@@ -31,42 +31,42 @@ SELECT DISTINCT dep.deptype, dep.classid, cl.relkind, ad.adbin, ad.adsrc,
         ftsdns.nspname, ftspns.nspname, ftstns.nspname) AS nspname,
     CASE WHEN inhits.inhparent IS NOT NULL THEN '1' ELSE '0' END AS is_inherits,
     CASE WHEN inhed.inhparent IS NOT NULL THEN '1' ELSE '0' END AS is_inherited
-FROM pg_depend dep
-LEFT JOIN pg_class cl ON dep.objid=cl.oid
-LEFT JOIN pg_attribute att ON dep.objid=att.attrelid AND dep.objsubid=att.attnum
-LEFT JOIN pg_namespace nsc ON cl.relnamespace=nsc.oid
-LEFT JOIN pg_proc pr ON dep.objid=pr.oid
-LEFT JOIN pg_namespace nsp ON pr.pronamespace=nsp.oid
-LEFT JOIN pg_trigger tg ON dep.objid=tg.oid
-LEFT JOIN pg_type ty ON dep.objid=ty.oid
-LEFT JOIN pg_namespace nst ON ty.typnamespace=nst.oid
-LEFT JOIN pg_constraint co ON dep.objid=co.oid
-LEFT JOIN pg_class coc ON co.conrelid=coc.oid
-LEFT JOIN pg_namespace nso ON co.connamespace=nso.oid
-LEFT JOIN pg_rewrite rw ON dep.objid=rw.oid
-LEFT JOIN pg_class clrw ON clrw.oid=rw.ev_class
-LEFT JOIN pg_namespace nsrw ON clrw.relnamespace=nsrw.oid
-LEFT JOIN pg_language la ON dep.objid=la.oid
-LEFT JOIN pg_namespace ns ON dep.objid=ns.oid
-LEFT JOIN pg_attrdef ad ON ad.oid=dep.objid
-LEFT JOIN pg_foreign_server fs ON fs.oid=dep.objid
-LEFT JOIN pg_foreign_data_wrapper fdw ON fdw.oid=dep.objid
-LEFT JOIN pg_type prtyp ON prtyp.oid = pr.prorettype
-LEFT JOIN pg_inherits inhits ON (inhits.inhrelid=dep.objid)
-LEFT JOIN pg_inherits inhed ON (inhed.inhparent=dep.objid)
-LEFT JOIN pg_event_trigger evt ON evt.oid=dep.objid
-LEFT JOIN pg_collation col ON col.oid=dep.objid
-LEFT JOIN pg_namespace colns ON col.collnamespace=colns.oid
-LEFT JOIN pg_ts_config ftsc ON ftsc.oid=dep.objid
-LEFT JOIN pg_namespace ftscns ON ftsc.cfgnamespace=ftscns.oid
-LEFT JOIN pg_ts_dict ftsd ON ftsd.oid=dep.objid
-LEFT JOIN pg_namespace ftsdns ON ftsd.dictnamespace=ftsdns.oid
-LEFT JOIN pg_ts_parser ftsp ON ftsp.oid=dep.objid
-LEFT JOIN pg_namespace ftspns ON ftsp.prsnamespace=ftspns.oid
-LEFT JOIN pg_ts_template ftst ON ftst.oid=dep.objid
-LEFT JOIN pg_namespace ftstns ON ftst.tmplnamespace=ftstns.oid
-LEFT JOIN pg_extension ext ON ext.oid=dep.objid
-LEFT JOIN pg_policy pl ON pl.oid=dep.objid
+FROM pg_catalog.pg_depend dep
+LEFT JOIN pg_catalog.pg_class cl ON dep.objid=cl.oid
+LEFT JOIN pg_catalog.pg_attribute att ON dep.objid=att.attrelid AND dep.objsubid=att.attnum
+LEFT JOIN pg_catalog.pg_namespace nsc ON cl.relnamespace=nsc.oid
+LEFT JOIN pg_catalog.pg_proc pr ON dep.objid=pr.oid
+LEFT JOIN pg_catalog.pg_namespace nsp ON pr.pronamespace=nsp.oid
+LEFT JOIN pg_catalog.pg_trigger tg ON dep.objid=tg.oid
+LEFT JOIN pg_catalog.pg_type ty ON dep.objid=ty.oid
+LEFT JOIN pg_catalog.pg_namespace nst ON ty.typnamespace=nst.oid
+LEFT JOIN pg_catalog.pg_constraint co ON dep.objid=co.oid
+LEFT JOIN pg_catalog.pg_class coc ON co.conrelid=coc.oid
+LEFT JOIN pg_catalog.pg_namespace nso ON co.connamespace=nso.oid
+LEFT JOIN pg_catalog.pg_rewrite rw ON dep.objid=rw.oid
+LEFT JOIN pg_catalog.pg_class clrw ON clrw.oid=rw.ev_class
+LEFT JOIN pg_catalog.pg_namespace nsrw ON clrw.relnamespace=nsrw.oid
+LEFT JOIN pg_catalog.pg_language la ON dep.objid=la.oid
+LEFT JOIN pg_catalog.pg_namespace ns ON dep.objid=ns.oid
+LEFT JOIN pg_catalog.pg_attrdef ad ON ad.oid=dep.objid
+LEFT JOIN pg_catalog.pg_foreign_server fs ON fs.oid=dep.objid
+LEFT JOIN pg_catalog.pg_foreign_data_wrapper fdw ON fdw.oid=dep.objid
+LEFT JOIN pg_catalog.pg_type prtyp ON prtyp.oid = pr.prorettype
+LEFT JOIN pg_catalog.pg_inherits inhits ON (inhits.inhrelid=dep.objid)
+LEFT JOIN pg_catalog.pg_inherits inhed ON (inhed.inhparent=dep.objid)
+LEFT JOIN pg_catalog.pg_event_trigger evt ON evt.oid=dep.objid
+LEFT JOIN pg_catalog.pg_collation col ON col.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace colns ON col.collnamespace=colns.oid
+LEFT JOIN pg_catalog.pg_ts_config ftsc ON ftsc.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftscns ON ftsc.cfgnamespace=ftscns.oid
+LEFT JOIN pg_catalog.pg_ts_dict ftsd ON ftsd.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftsdns ON ftsd.dictnamespace=ftsdns.oid
+LEFT JOIN pg_catalog.pg_ts_parser ftsp ON ftsp.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftspns ON ftsp.prsnamespace=ftspns.oid
+LEFT JOIN pg_catalog.pg_ts_template ftst ON ftst.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftstns ON ftst.tmplnamespace=ftstns.oid
+LEFT JOIN pg_catalog.pg_extension ext ON ext.oid=dep.objid
+LEFT JOIN pg_catalog.pg_policy pl ON pl.oid=dep.objid
 {{where_clause}} AND
 classid IN ( SELECT oid FROM pg_class WHERE relname IN
    ('pg_class', 'pg_constraint', 'pg_conversion', 'pg_language', 'pg_proc', 'pg_rewrite', 'pg_namespace',
diff --git a/web/pgadmin/browser/server_groups/servers/templates/depends/pg/12_plus/dependencies.sql b/web/pgadmin/browser/server_groups/servers/templates/depends/pg/12_plus/dependencies.sql
index ffc7cab60..fab0b7253 100644
--- a/web/pgadmin/browser/server_groups/servers/templates/depends/pg/12_plus/dependencies.sql
+++ b/web/pgadmin/browser/server_groups/servers/templates/depends/pg/12_plus/dependencies.sql
@@ -1,4 +1,4 @@
-SELECT DISTINCT dep.deptype, dep.refclassid, dep.refobjid, cl.relkind, ad.adbin, pg_get_expr(ad.adbin, ad.adrelid) as adsrc,
+SELECT DISTINCT dep.deptype, dep.refclassid, dep.refobjid, cl.relkind, ad.adbin, pg_catalog.pg_get_expr(ad.adbin, ad.adrelid) as adsrc,
     CASE WHEN cl.relkind IS NOT NULL THEN CASE WHEN cl.relkind = 'r' THEN cl.relkind || COALESCE(dep.refobjsubid::text, '') ELSE cl.relkind END
         WHEN tg.oid IS NOT NULL THEN 'Tr'::text
         WHEN ty.oid IS NOT NULL THEN CASE WHEN ty.typtype = 'd' THEN 'd'::text ELSE 'Ty'::text END
@@ -31,59 +31,59 @@ SELECT DISTINCT dep.deptype, dep.refclassid, dep.refobjid, cl.relkind, ad.adbin,
         ftsdns.nspname, ftspns.nspname, ftstns.nspname) AS nspname,
     CASE WHEN inhits.inhparent IS NOT NULL THEN '1' ELSE '0' END AS is_inherits,
     CASE WHEN inhed.inhparent IS NOT NULL THEN '1' ELSE '0' END AS is_inherited
-FROM pg_depend dep
-LEFT JOIN pg_class cl ON dep.refobjid=cl.oid
-LEFT JOIN pg_attribute att ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
-LEFT JOIN pg_namespace nsc ON cl.relnamespace=nsc.oid
-LEFT JOIN pg_proc pr ON dep.refobjid=pr.oid
-LEFT JOIN pg_namespace nsp ON pr.pronamespace=nsp.oid
-LEFT JOIN pg_trigger tg ON dep.refobjid=tg.oid
-LEFT JOIN pg_type ty ON dep.refobjid=ty.oid
-LEFT JOIN pg_namespace nst ON ty.typnamespace=nst.oid
-LEFT JOIN pg_constraint co ON dep.refobjid=co.oid
-LEFT JOIN pg_class coc ON co.conrelid=coc.oid
-LEFT JOIN pg_namespace nso ON co.connamespace=nso.oid
-LEFT JOIN pg_rewrite rw ON dep.refobjid=rw.oid
-LEFT JOIN pg_class clrw ON clrw.oid=rw.ev_class
-LEFT JOIN pg_namespace nsrw ON clrw.relnamespace=nsrw.oid
-LEFT JOIN pg_language la ON dep.refobjid=la.oid
-LEFT JOIN pg_namespace ns ON dep.refobjid=ns.oid
-LEFT JOIN pg_attrdef ad ON ad.adrelid=att.attrelid AND ad.adnum=att.attnum
-LEFT JOIN pg_foreign_server fs ON fs.oid=dep.refobjid
-LEFT JOIN pg_foreign_data_wrapper fdw ON fdw.oid=dep.refobjid
-LEFT JOIN pg_type prtyp ON prtyp.oid = pr.prorettype
-LEFT JOIN pg_inherits inhits ON (inhits.inhrelid=dep.refobjid)
-LEFT JOIN pg_inherits inhed ON (inhed.inhparent=dep.refobjid)
-LEFT JOIN pg_event_trigger evt ON evt.oid=dep.refobjid
-LEFT JOIN pg_collation col ON col.oid=dep.refobjid
-LEFT JOIN pg_namespace colns ON col.collnamespace=colns.oid
-LEFT JOIN pg_ts_config ftsc ON ftsc.oid=dep.refobjid
-LEFT JOIN pg_namespace ftscns ON ftsc.cfgnamespace=ftscns.oid
-LEFT JOIN pg_ts_dict ftsd ON ftsd.oid=dep.refobjid
-LEFT JOIN pg_namespace ftsdns ON ftsd.dictnamespace=ftsdns.oid
-LEFT JOIN pg_ts_parser ftsp ON ftsp.oid=dep.refobjid
-LEFT JOIN pg_namespace ftspns ON ftsp.prsnamespace=ftspns.oid
-LEFT JOIN pg_ts_template ftst ON ftst.oid=dep.refobjid
-LEFT JOIN pg_namespace ftstns ON ftst.tmplnamespace=ftstns.oid
-LEFT JOIN pg_extension ext ON ext.oid=dep.refobjid
-LEFT JOIN pg_policy pl ON pl.oid=dep.refobjid
+FROM pg_catalog.pg_depend dep
+LEFT JOIN pg_catalog.pg_class cl ON dep.refobjid=cl.oid
+LEFT JOIN pg_catalog.pg_attribute att ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
+LEFT JOIN pg_catalog.pg_namespace nsc ON cl.relnamespace=nsc.oid
+LEFT JOIN pg_catalog.pg_proc pr ON dep.refobjid=pr.oid
+LEFT JOIN pg_catalog.pg_namespace nsp ON pr.pronamespace=nsp.oid
+LEFT JOIN pg_catalog.pg_trigger tg ON dep.refobjid=tg.oid
+LEFT JOIN pg_catalog.pg_type ty ON dep.refobjid=ty.oid
+LEFT JOIN pg_catalog.pg_namespace nst ON ty.typnamespace=nst.oid
+LEFT JOIN pg_catalog.pg_constraint co ON dep.refobjid=co.oid
+LEFT JOIN pg_catalog.pg_class coc ON co.conrelid=coc.oid
+LEFT JOIN pg_catalog.pg_namespace nso ON co.connamespace=nso.oid
+LEFT JOIN pg_catalog.pg_rewrite rw ON dep.refobjid=rw.oid
+LEFT JOIN pg_catalog.pg_class clrw ON clrw.oid=rw.ev_class
+LEFT JOIN pg_catalog.pg_namespace nsrw ON clrw.relnamespace=nsrw.oid
+LEFT JOIN pg_catalog.pg_language la ON dep.refobjid=la.oid
+LEFT JOIN pg_catalog.pg_namespace ns ON dep.refobjid=ns.oid
+LEFT JOIN pg_catalog.pg_attrdef ad ON ad.adrelid=att.attrelid AND ad.adnum=att.attnum
+LEFT JOIN pg_catalog.pg_foreign_server fs ON fs.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_foreign_data_wrapper fdw ON fdw.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_type prtyp ON prtyp.oid = pr.prorettype
+LEFT JOIN pg_catalog.pg_inherits inhits ON (inhits.inhrelid=dep.refobjid)
+LEFT JOIN pg_catalog.pg_inherits inhed ON (inhed.inhparent=dep.refobjid)
+LEFT JOIN pg_catalog.pg_event_trigger evt ON evt.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_collation col ON col.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace colns ON col.collnamespace=colns.oid
+LEFT JOIN pg_catalog.pg_ts_config ftsc ON ftsc.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace ftscns ON ftsc.cfgnamespace=ftscns.oid
+LEFT JOIN pg_catalog.pg_ts_dict ftsd ON ftsd.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace ftsdns ON ftsd.dictnamespace=ftsdns.oid
+LEFT JOIN pg_catalog.pg_ts_parser ftsp ON ftsp.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace ftspns ON ftsp.prsnamespace=ftspns.oid
+LEFT JOIN pg_catalog.pg_ts_template ftst ON ftst.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace ftstns ON ftst.tmplnamespace=ftstns.oid
+LEFT JOIN pg_catalog.pg_extension ext ON ext.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_policy pl ON pl.oid=dep.refobjid
 {{where_clause}} AND
-refclassid IN ( SELECT oid FROM pg_class WHERE relname IN
+refclassid IN ( SELECT oid FROM pg_catalog.pg_class WHERE relname IN
    ('pg_class', 'pg_constraint', 'pg_conversion', 'pg_language', 'pg_proc', 'pg_rewrite', 'pg_namespace',
    'pg_trigger', 'pg_type', 'pg_attrdef', 'pg_event_trigger', 'pg_foreign_server', 'pg_foreign_data_wrapper',
    'pg_collation', 'pg_ts_config', 'pg_ts_dict', 'pg_ts_parser', 'pg_ts_template', 'pg_extension', 'pg_policy'))
 UNION
-SELECT DISTINCT dep.deptype, dep.refclassid, dep.refobjid, cl.relkind, ad.adbin, pg_get_expr(ad.adbin, ad.adrelid) as adsrc,
+SELECT DISTINCT dep.deptype, dep.refclassid, dep.refobjid, cl.relkind, ad.adbin, pg_catalog.pg_get_expr(ad.adbin, ad.adrelid) as adsrc,
     CASE WHEN cl.relkind IS NOT NULL THEN CASE WHEN cl.relkind = 'r' THEN cl.relkind || COALESCE(dep.refobjsubid::text, '') ELSE cl.relkind END
     ELSE '' END AS type,
 	NULL AS ownertable,
 	CASE WHEN cl.relname IS NOT NULL OR att.attname IS NOT NULL THEN cl.relname || COALESCE('.' || att.attname, '')
     ELSE cl.relname END AS refname,
     nsc.nspname AS nspname, '0' AS is_inherits, '0' AS is_inherited
-FROM pg_depend dep
-LEFT JOIN pg_class cl ON dep.refobjid=cl.oid
-LEFT JOIN pg_attribute att ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
-LEFT JOIN pg_namespace nsc ON cl.relnamespace=nsc.oid
-LEFT JOIN pg_attrdef ad ON ad.adrelid=att.attrelid AND ad.adnum=att.attnum
-WHERE dep.objid IN (SELECT oid FROM pg_rewrite WHERE ev_class={{object_id}}) AND cl.relkind not in ('v', 'm')
+FROM pg_catalog.pg_depend dep
+LEFT JOIN pg_catalog.pg_class cl ON dep.refobjid=cl.oid
+LEFT JOIN pg_catalog.pg_attribute att ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
+LEFT JOIN pg_catalog.pg_namespace nsc ON cl.relnamespace=nsc.oid
+LEFT JOIN pg_catalog.pg_attrdef ad ON ad.adrelid=att.attrelid AND ad.adnum=att.attnum
+WHERE dep.objid IN (SELECT oid FROM pg_catalog.pg_rewrite WHERE ev_class={{object_id}}) AND cl.relkind not in ('v', 'm')
 ORDER BY refclassid, relkind
diff --git a/web/pgadmin/browser/server_groups/servers/templates/depends/pg/12_plus/dependents.sql b/web/pgadmin/browser/server_groups/servers/templates/depends/pg/12_plus/dependents.sql
index ef76c885d..da42f4306 100644
--- a/web/pgadmin/browser/server_groups/servers/templates/depends/pg/12_plus/dependents.sql
+++ b/web/pgadmin/browser/server_groups/servers/templates/depends/pg/12_plus/dependents.sql
@@ -31,44 +31,44 @@ SELECT DISTINCT dep.deptype, dep.classid, cl.relkind, ad.adbin, pg_get_expr(ad.a
         ftsdns.nspname, ftspns.nspname, ftstns.nspname) AS nspname,
     CASE WHEN inhits.inhparent IS NOT NULL THEN '1' ELSE '0' END AS is_inherits,
     CASE WHEN inhed.inhparent IS NOT NULL THEN '1' ELSE '0' END AS is_inherited
-FROM pg_depend dep
-LEFT JOIN pg_class cl ON dep.objid=cl.oid
-LEFT JOIN pg_attribute att ON dep.objid=att.attrelid AND dep.objsubid=att.attnum
-LEFT JOIN pg_namespace nsc ON cl.relnamespace=nsc.oid
-LEFT JOIN pg_proc pr ON dep.objid=pr.oid
-LEFT JOIN pg_namespace nsp ON pr.pronamespace=nsp.oid
-LEFT JOIN pg_trigger tg ON dep.objid=tg.oid
-LEFT JOIN pg_type ty ON dep.objid=ty.oid
-LEFT JOIN pg_namespace nst ON ty.typnamespace=nst.oid
-LEFT JOIN pg_constraint co ON dep.objid=co.oid
-LEFT JOIN pg_class coc ON co.conrelid=coc.oid
-LEFT JOIN pg_namespace nso ON co.connamespace=nso.oid
-LEFT JOIN pg_rewrite rw ON dep.objid=rw.oid
-LEFT JOIN pg_class clrw ON clrw.oid=rw.ev_class
-LEFT JOIN pg_namespace nsrw ON clrw.relnamespace=nsrw.oid
-LEFT JOIN pg_language la ON dep.objid=la.oid
-LEFT JOIN pg_namespace ns ON dep.objid=ns.oid
-LEFT JOIN pg_attrdef ad ON ad.oid=dep.objid
-LEFT JOIN pg_foreign_server fs ON fs.oid=dep.objid
-LEFT JOIN pg_foreign_data_wrapper fdw ON fdw.oid=dep.objid
-LEFT JOIN pg_type prtyp ON prtyp.oid = pr.prorettype
-LEFT JOIN pg_inherits inhits ON (inhits.inhrelid=dep.objid)
-LEFT JOIN pg_inherits inhed ON (inhed.inhparent=dep.objid)
-LEFT JOIN pg_event_trigger evt ON evt.oid=dep.objid
-LEFT JOIN pg_collation col ON col.oid=dep.objid
-LEFT JOIN pg_namespace colns ON col.collnamespace=colns.oid
-LEFT JOIN pg_ts_config ftsc ON ftsc.oid=dep.objid
-LEFT JOIN pg_namespace ftscns ON ftsc.cfgnamespace=ftscns.oid
-LEFT JOIN pg_ts_dict ftsd ON ftsd.oid=dep.objid
-LEFT JOIN pg_namespace ftsdns ON ftsd.dictnamespace=ftsdns.oid
-LEFT JOIN pg_ts_parser ftsp ON ftsp.oid=dep.objid
-LEFT JOIN pg_namespace ftspns ON ftsp.prsnamespace=ftspns.oid
-LEFT JOIN pg_ts_template ftst ON ftst.oid=dep.objid
-LEFT JOIN pg_namespace ftstns ON ftst.tmplnamespace=ftstns.oid
-LEFT JOIN pg_extension ext ON ext.oid=dep.objid
-LEFT JOIN pg_policy pl ON pl.oid=dep.objid
+FROM pg_catalog.pg_depend dep
+LEFT JOIN pg_catalog.pg_class cl ON dep.objid=cl.oid
+LEFT JOIN pg_catalog.pg_attribute att ON dep.objid=att.attrelid AND dep.objsubid=att.attnum
+LEFT JOIN pg_catalog.pg_namespace nsc ON cl.relnamespace=nsc.oid
+LEFT JOIN pg_catalog.pg_proc pr ON dep.objid=pr.oid
+LEFT JOIN pg_catalog.pg_namespace nsp ON pr.pronamespace=nsp.oid
+LEFT JOIN pg_catalog.pg_trigger tg ON dep.objid=tg.oid
+LEFT JOIN pg_catalog.pg_type ty ON dep.objid=ty.oid
+LEFT JOIN pg_catalog.pg_namespace nst ON ty.typnamespace=nst.oid
+LEFT JOIN pg_catalog.pg_constraint co ON dep.objid=co.oid
+LEFT JOIN pg_catalog.pg_class coc ON co.conrelid=coc.oid
+LEFT JOIN pg_catalog.pg_namespace nso ON co.connamespace=nso.oid
+LEFT JOIN pg_catalog.pg_rewrite rw ON dep.objid=rw.oid
+LEFT JOIN pg_catalog.pg_class clrw ON clrw.oid=rw.ev_class
+LEFT JOIN pg_catalog.pg_namespace nsrw ON clrw.relnamespace=nsrw.oid
+LEFT JOIN pg_catalog.pg_language la ON dep.objid=la.oid
+LEFT JOIN pg_catalog.pg_namespace ns ON dep.objid=ns.oid
+LEFT JOIN pg_catalog.pg_attrdef ad ON ad.oid=dep.objid
+LEFT JOIN pg_catalog.pg_foreign_server fs ON fs.oid=dep.objid
+LEFT JOIN pg_catalog.pg_foreign_data_wrapper fdw ON fdw.oid=dep.objid
+LEFT JOIN pg_catalog.pg_type prtyp ON prtyp.oid = pr.prorettype
+LEFT JOIN pg_catalog.pg_inherits inhits ON (inhits.inhrelid=dep.objid)
+LEFT JOIN pg_catalog.pg_inherits inhed ON (inhed.inhparent=dep.objid)
+LEFT JOIN pg_catalog.pg_event_trigger evt ON evt.oid=dep.objid
+LEFT JOIN pg_catalog.pg_collation col ON col.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace colns ON col.collnamespace=colns.oid
+LEFT JOIN pg_catalog.pg_ts_config ftsc ON ftsc.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftscns ON ftsc.cfgnamespace=ftscns.oid
+LEFT JOIN pg_catalog.pg_ts_dict ftsd ON ftsd.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftsdns ON ftsd.dictnamespace=ftsdns.oid
+LEFT JOIN pg_catalog.pg_ts_parser ftsp ON ftsp.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftspns ON ftsp.prsnamespace=ftspns.oid
+LEFT JOIN pg_catalog.pg_ts_template ftst ON ftst.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftstns ON ftst.tmplnamespace=ftstns.oid
+LEFT JOIN pg_catalog.pg_extension ext ON ext.oid=dep.objid
+LEFT JOIN pg_catalog.pg_policy pl ON pl.oid=dep.objid
 {{where_clause}} AND
-classid IN ( SELECT oid FROM pg_class WHERE relname IN
+classid IN ( SELECT oid FROM pg_catalog.pg_class WHERE relname IN
    ('pg_class', 'pg_constraint', 'pg_conversion', 'pg_language', 'pg_proc', 'pg_rewrite', 'pg_namespace',
    'pg_trigger', 'pg_type', 'pg_attrdef', 'pg_event_trigger', 'pg_foreign_server', 'pg_foreign_data_wrapper',
    'pg_collation', 'pg_ts_config', 'pg_ts_dict', 'pg_ts_parser', 'pg_ts_template', 'pg_extension', 'pg_policy'))
diff --git a/web/pgadmin/browser/server_groups/servers/templates/depends/pg/9.1_plus/dependencies.sql b/web/pgadmin/browser/server_groups/servers/templates/depends/pg/9.1_plus/dependencies.sql
index 81bb2a676..2e344d1e5 100644
--- a/web/pgadmin/browser/server_groups/servers/templates/depends/pg/9.1_plus/dependencies.sql
+++ b/web/pgadmin/browser/server_groups/servers/templates/depends/pg/9.1_plus/dependencies.sql
@@ -29,42 +29,42 @@ SELECT DISTINCT dep.deptype, dep.refclassid, dep.refobjid, cl.relkind, ad.adbin,
         ftsdns.nspname, ftspns.nspname, ftstns.nspname) AS nspname,
     CASE WHEN inhits.inhparent IS NOT NULL THEN '1' ELSE '0' END AS is_inherits,
     CASE WHEN inhed.inhparent IS NOT NULL THEN '1' ELSE '0' END AS is_inherited
-FROM pg_depend dep
-LEFT JOIN pg_class cl ON dep.refobjid=cl.oid
-LEFT JOIN pg_attribute att ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
-LEFT JOIN pg_namespace nsc ON cl.relnamespace=nsc.oid
-LEFT JOIN pg_proc pr ON dep.refobjid=pr.oid
-LEFT JOIN pg_namespace nsp ON pr.pronamespace=nsp.oid
-LEFT JOIN pg_trigger tg ON dep.refobjid=tg.oid
-LEFT JOIN pg_type ty ON dep.refobjid=ty.oid
-LEFT JOIN pg_namespace nst ON ty.typnamespace=nst.oid
-LEFT JOIN pg_constraint co ON dep.refobjid=co.oid
-LEFT JOIN pg_class coc ON co.conrelid=coc.oid
-LEFT JOIN pg_namespace nso ON co.connamespace=nso.oid
-LEFT JOIN pg_rewrite rw ON dep.refobjid=rw.oid
-LEFT JOIN pg_class clrw ON clrw.oid=rw.ev_class
-LEFT JOIN pg_namespace nsrw ON clrw.relnamespace=nsrw.oid
-LEFT JOIN pg_language la ON dep.refobjid=la.oid
-LEFT JOIN pg_namespace ns ON dep.refobjid=ns.oid
-LEFT JOIN pg_attrdef ad ON ad.adrelid=att.attrelid AND ad.adnum=att.attnum
-LEFT JOIN pg_foreign_server fs ON fs.oid=dep.refobjid
-LEFT JOIN pg_foreign_data_wrapper fdw ON fdw.oid=dep.refobjid
-LEFT JOIN pg_type prtyp ON prtyp.oid = pr.prorettype
-LEFT JOIN pg_inherits inhits ON (inhits.inhrelid=dep.refobjid)
-LEFT JOIN pg_inherits inhed ON (inhed.inhparent=dep.refobjid)
-LEFT JOIN pg_collation col ON col.oid=dep.refobjid
-LEFT JOIN pg_namespace colns ON col.collnamespace=colns.oid
-LEFT JOIN pg_ts_config ftsc ON ftsc.oid=dep.refobjid
-LEFT JOIN pg_namespace ftscns ON ftsc.cfgnamespace=ftscns.oid
-LEFT JOIN pg_ts_dict ftsd ON ftsd.oid=dep.refobjid
-LEFT JOIN pg_namespace ftsdns ON ftsd.dictnamespace=ftsdns.oid
-LEFT JOIN pg_ts_parser ftsp ON ftsp.oid=dep.refobjid
-LEFT JOIN pg_namespace ftspns ON ftsp.prsnamespace=ftspns.oid
-LEFT JOIN pg_ts_template ftst ON ftst.oid=dep.refobjid
-LEFT JOIN pg_namespace ftstns ON ftst.tmplnamespace=ftstns.oid
-LEFT JOIN pg_extension ext ON ext.oid=dep.refobjid
+FROM pg_catalog.pg_depend dep
+LEFT JOIN pg_catalog.pg_class cl ON dep.refobjid=cl.oid
+LEFT JOIN pg_catalog.pg_attribute att ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
+LEFT JOIN pg_catalog.pg_namespace nsc ON cl.relnamespace=nsc.oid
+LEFT JOIN pg_catalog.pg_proc pr ON dep.refobjid=pr.oid
+LEFT JOIN pg_catalog.pg_namespace nsp ON pr.pronamespace=nsp.oid
+LEFT JOIN pg_catalog.pg_trigger tg ON dep.refobjid=tg.oid
+LEFT JOIN pg_catalog.pg_type ty ON dep.refobjid=ty.oid
+LEFT JOIN pg_catalog.pg_namespace nst ON ty.typnamespace=nst.oid
+LEFT JOIN pg_catalog.pg_constraint co ON dep.refobjid=co.oid
+LEFT JOIN pg_catalog.pg_class coc ON co.conrelid=coc.oid
+LEFT JOIN pg_catalog.pg_namespace nso ON co.connamespace=nso.oid
+LEFT JOIN pg_catalog.pg_rewrite rw ON dep.refobjid=rw.oid
+LEFT JOIN pg_catalog.pg_class clrw ON clrw.oid=rw.ev_class
+LEFT JOIN pg_catalog.pg_namespace nsrw ON clrw.relnamespace=nsrw.oid
+LEFT JOIN pg_catalog.pg_language la ON dep.refobjid=la.oid
+LEFT JOIN pg_catalog.pg_namespace ns ON dep.refobjid=ns.oid
+LEFT JOIN pg_catalog.pg_attrdef ad ON ad.adrelid=att.attrelid AND ad.adnum=att.attnum
+LEFT JOIN pg_catalog.pg_foreign_server fs ON fs.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_foreign_data_wrapper fdw ON fdw.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_type prtyp ON prtyp.oid = pr.prorettype
+LEFT JOIN pg_catalog.pg_inherits inhits ON (inhits.inhrelid=dep.refobjid)
+LEFT JOIN pg_catalog.pg_inherits inhed ON (inhed.inhparent=dep.refobjid)
+LEFT JOIN pg_catalog.pg_collation col ON col.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace colns ON col.collnamespace=colns.oid
+LEFT JOIN pg_catalog.pg_ts_config ftsc ON ftsc.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace ftscns ON ftsc.cfgnamespace=ftscns.oid
+LEFT JOIN pg_catalog.pg_ts_dict ftsd ON ftsd.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace ftsdns ON ftsd.dictnamespace=ftsdns.oid
+LEFT JOIN pg_catalog.pg_ts_parser ftsp ON ftsp.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace ftspns ON ftsp.prsnamespace=ftspns.oid
+LEFT JOIN pg_catalog.pg_ts_template ftst ON ftst.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace ftstns ON ftst.tmplnamespace=ftstns.oid
+LEFT JOIN pg_catalog.pg_extension ext ON ext.oid=dep.refobjid
 {{where_clause}} AND
-refclassid IN ( SELECT oid FROM pg_class WHERE relname IN
+refclassid IN ( SELECT oid FROM pg_catalog.pg_class WHERE relname IN
    ('pg_class', 'pg_constraint', 'pg_conversion', 'pg_language', 'pg_proc', 'pg_rewrite', 'pg_namespace',
    'pg_trigger', 'pg_type', 'pg_attrdef', 'pg_foreign_server', 'pg_foreign_data_wrapper',
    'pg_collation', 'pg_ts_config', 'pg_ts_dict', 'pg_ts_parser', 'pg_ts_template', 'pg_extension'))
@@ -76,10 +76,10 @@ SELECT DISTINCT dep.deptype, dep.refclassid, dep.refobjid, cl.relkind, ad.adbin,
 	CASE WHEN cl.relname IS NOT NULL OR att.attname IS NOT NULL THEN cl.relname || COALESCE('.' || att.attname, '')
     ELSE cl.relname END AS refname,
     nsc.nspname AS nspname, '0' AS is_inherits, '0' AS is_inherited
-FROM pg_depend dep
-LEFT JOIN pg_class cl ON dep.refobjid=cl.oid
-LEFT JOIN pg_attribute att ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
-LEFT JOIN pg_namespace nsc ON cl.relnamespace=nsc.oid
-LEFT JOIN pg_attrdef ad ON ad.adrelid=att.attrelid AND ad.adnum=att.attnum
-WHERE dep.objid IN (SELECT oid FROM pg_rewrite WHERE ev_class={{object_id}}) AND cl.relkind not in ('v', 'm')
+FROM pg_catalog.pg_depend dep
+LEFT JOIN pg_catalog.pg_class cl ON dep.refobjid=cl.oid
+LEFT JOIN pg_catalog.pg_attribute att ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
+LEFT JOIN pg_catalog.pg_namespace nsc ON cl.relnamespace=nsc.oid
+LEFT JOIN pg_catalog.pg_attrdef ad ON ad.adrelid=att.attrelid AND ad.adnum=att.attnum
+WHERE dep.objid IN (SELECT oid FROM pg_catalog.pg_rewrite WHERE ev_class={{object_id}}) AND cl.relkind not in ('v', 'm')
 ORDER BY refclassid, relkind
diff --git a/web/pgadmin/browser/server_groups/servers/templates/depends/pg/9.1_plus/dependents.sql b/web/pgadmin/browser/server_groups/servers/templates/depends/pg/9.1_plus/dependents.sql
index 71b0a1edb..d870882b4 100644
--- a/web/pgadmin/browser/server_groups/servers/templates/depends/pg/9.1_plus/dependents.sql
+++ b/web/pgadmin/browser/server_groups/servers/templates/depends/pg/9.1_plus/dependents.sql
@@ -29,42 +29,42 @@ SELECT DISTINCT dep.deptype, dep.classid, cl.relkind, ad.adbin, ad.adsrc,
         ftsdns.nspname, ftspns.nspname, ftstns.nspname) AS nspname,
     CASE WHEN inhits.inhparent IS NOT NULL THEN '1' ELSE '0' END AS is_inherits,
     CASE WHEN inhed.inhparent IS NOT NULL THEN '1' ELSE '0' END AS is_inherited
-FROM pg_depend dep
-LEFT JOIN pg_class cl ON dep.objid=cl.oid
-LEFT JOIN pg_attribute att ON dep.objid=att.attrelid AND dep.objsubid=att.attnum
-LEFT JOIN pg_namespace nsc ON cl.relnamespace=nsc.oid
-LEFT JOIN pg_proc pr ON dep.objid=pr.oid
-LEFT JOIN pg_namespace nsp ON pr.pronamespace=nsp.oid
-LEFT JOIN pg_trigger tg ON dep.objid=tg.oid
-LEFT JOIN pg_type ty ON dep.objid=ty.oid
-LEFT JOIN pg_namespace nst ON ty.typnamespace=nst.oid
-LEFT JOIN pg_constraint co ON dep.objid=co.oid
-LEFT JOIN pg_class coc ON co.conrelid=coc.oid
-LEFT JOIN pg_namespace nso ON co.connamespace=nso.oid
-LEFT JOIN pg_rewrite rw ON dep.objid=rw.oid
-LEFT JOIN pg_class clrw ON clrw.oid=rw.ev_class
-LEFT JOIN pg_namespace nsrw ON clrw.relnamespace=nsrw.oid
-LEFT JOIN pg_language la ON dep.objid=la.oid
-LEFT JOIN pg_namespace ns ON dep.objid=ns.oid
-LEFT JOIN pg_attrdef ad ON ad.oid=dep.objid
-LEFT JOIN pg_foreign_server fs ON fs.oid=dep.objid
-LEFT JOIN pg_foreign_data_wrapper fdw ON fdw.oid=dep.objid
-LEFT JOIN pg_type prtyp ON prtyp.oid = pr.prorettype
-LEFT JOIN pg_inherits inhits ON (inhits.inhrelid=dep.objid)
-LEFT JOIN pg_inherits inhed ON (inhed.inhparent=dep.objid)
-LEFT JOIN pg_collation col ON col.oid=dep.objid
-LEFT JOIN pg_namespace colns ON col.collnamespace=colns.oid
-LEFT JOIN pg_ts_config ftsc ON ftsc.oid=dep.objid
-LEFT JOIN pg_namespace ftscns ON ftsc.cfgnamespace=ftscns.oid
-LEFT JOIN pg_ts_dict ftsd ON ftsd.oid=dep.objid
-LEFT JOIN pg_namespace ftsdns ON ftsd.dictnamespace=ftsdns.oid
-LEFT JOIN pg_ts_parser ftsp ON ftsp.oid=dep.objid
-LEFT JOIN pg_namespace ftspns ON ftsp.prsnamespace=ftspns.oid
-LEFT JOIN pg_ts_template ftst ON ftst.oid=dep.objid
-LEFT JOIN pg_namespace ftstns ON ftst.tmplnamespace=ftstns.oid
-LEFT JOIN pg_extension ext ON ext.oid=dep.objid
+FROM pg_catalog.pg_depend dep
+LEFT JOIN pg_catalog.pg_class cl ON dep.objid=cl.oid
+LEFT JOIN pg_catalog.pg_attribute att ON dep.objid=att.attrelid AND dep.objsubid=att.attnum
+LEFT JOIN pg_catalog.pg_namespace nsc ON cl.relnamespace=nsc.oid
+LEFT JOIN pg_catalog.pg_proc pr ON dep.objid=pr.oid
+LEFT JOIN pg_catalog.pg_namespace nsp ON pr.pronamespace=nsp.oid
+LEFT JOIN pg_catalog.pg_trigger tg ON dep.objid=tg.oid
+LEFT JOIN pg_catalog.pg_type ty ON dep.objid=ty.oid
+LEFT JOIN pg_catalog.pg_namespace nst ON ty.typnamespace=nst.oid
+LEFT JOIN pg_catalog.pg_constraint co ON dep.objid=co.oid
+LEFT JOIN pg_catalog.pg_class coc ON co.conrelid=coc.oid
+LEFT JOIN pg_catalog.pg_namespace nso ON co.connamespace=nso.oid
+LEFT JOIN pg_catalog.pg_rewrite rw ON dep.objid=rw.oid
+LEFT JOIN pg_catalog.pg_class clrw ON clrw.oid=rw.ev_class
+LEFT JOIN pg_catalog.pg_namespace nsrw ON clrw.relnamespace=nsrw.oid
+LEFT JOIN pg_catalog.pg_language la ON dep.objid=la.oid
+LEFT JOIN pg_catalog.pg_namespace ns ON dep.objid=ns.oid
+LEFT JOIN pg_catalog.pg_attrdef ad ON ad.oid=dep.objid
+LEFT JOIN pg_catalog.pg_foreign_server fs ON fs.oid=dep.objid
+LEFT JOIN pg_catalog.pg_foreign_data_wrapper fdw ON fdw.oid=dep.objid
+LEFT JOIN pg_catalog.pg_type prtyp ON prtyp.oid = pr.prorettype
+LEFT JOIN pg_catalog.pg_inherits inhits ON (inhits.inhrelid=dep.objid)
+LEFT JOIN pg_catalog.pg_inherits inhed ON (inhed.inhparent=dep.objid)
+LEFT JOIN pg_catalog.pg_collation col ON col.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace colns ON col.collnamespace=colns.oid
+LEFT JOIN pg_catalog.pg_ts_config ftsc ON ftsc.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftscns ON ftsc.cfgnamespace=ftscns.oid
+LEFT JOIN pg_catalog.pg_ts_dict ftsd ON ftsd.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftsdns ON ftsd.dictnamespace=ftsdns.oid
+LEFT JOIN pg_catalog.pg_ts_parser ftsp ON ftsp.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftspns ON ftsp.prsnamespace=ftspns.oid
+LEFT JOIN pg_catalog.pg_ts_template ftst ON ftst.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftstns ON ftst.tmplnamespace=ftstns.oid
+LEFT JOIN pg_catalog.pg_extension ext ON ext.oid=dep.objid
 {{where_clause}} AND
-classid IN ( SELECT oid FROM pg_class WHERE relname IN
+classid IN ( SELECT oid FROM pg_catalog.pg_class WHERE relname IN
    ('pg_class', 'pg_constraint', 'pg_conversion', 'pg_language', 'pg_proc', 'pg_rewrite', 'pg_namespace',
    'pg_trigger', 'pg_type', 'pg_attrdef', 'pg_foreign_server', 'pg_foreign_data_wrapper',
    'pg_collation', 'pg_ts_config', 'pg_ts_dict', 'pg_ts_parser', 'pg_ts_template', 'pg_extension'))
diff --git a/web/pgadmin/browser/server_groups/servers/templates/depends/pg/9.3_plus/dependencies.sql b/web/pgadmin/browser/server_groups/servers/templates/depends/pg/9.3_plus/dependencies.sql
index d3908051e..41c8c9e5f 100644
--- a/web/pgadmin/browser/server_groups/servers/templates/depends/pg/9.3_plus/dependencies.sql
+++ b/web/pgadmin/browser/server_groups/servers/templates/depends/pg/9.3_plus/dependencies.sql
@@ -30,43 +30,43 @@ SELECT DISTINCT dep.deptype, dep.refclassid, dep.refobjid, cl.relkind, ad.adbin,
         ftsdns.nspname, ftspns.nspname, ftstns.nspname) AS nspname,
     CASE WHEN inhits.inhparent IS NOT NULL THEN '1' ELSE '0' END AS is_inherits,
     CASE WHEN inhed.inhparent IS NOT NULL THEN '1' ELSE '0' END AS is_inherited
-FROM pg_depend dep
-LEFT JOIN pg_class cl ON dep.refobjid=cl.oid
-LEFT JOIN pg_attribute att ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
-LEFT JOIN pg_namespace nsc ON cl.relnamespace=nsc.oid
-LEFT JOIN pg_proc pr ON dep.refobjid=pr.oid
-LEFT JOIN pg_namespace nsp ON pr.pronamespace=nsp.oid
-LEFT JOIN pg_trigger tg ON dep.refobjid=tg.oid
-LEFT JOIN pg_type ty ON dep.refobjid=ty.oid
-LEFT JOIN pg_namespace nst ON ty.typnamespace=nst.oid
-LEFT JOIN pg_constraint co ON dep.refobjid=co.oid
-LEFT JOIN pg_class coc ON co.conrelid=coc.oid
-LEFT JOIN pg_namespace nso ON co.connamespace=nso.oid
-LEFT JOIN pg_rewrite rw ON dep.refobjid=rw.oid
-LEFT JOIN pg_class clrw ON clrw.oid=rw.ev_class
-LEFT JOIN pg_namespace nsrw ON clrw.relnamespace=nsrw.oid
-LEFT JOIN pg_language la ON dep.refobjid=la.oid
-LEFT JOIN pg_namespace ns ON dep.refobjid=ns.oid
-LEFT JOIN pg_attrdef ad ON ad.adrelid=att.attrelid AND ad.adnum=att.attnum
-LEFT JOIN pg_foreign_server fs ON fs.oid=dep.refobjid
-LEFT JOIN pg_foreign_data_wrapper fdw ON fdw.oid=dep.refobjid
-LEFT JOIN pg_type prtyp ON prtyp.oid = pr.prorettype
-LEFT JOIN pg_inherits inhits ON (inhits.inhrelid=dep.refobjid)
-LEFT JOIN pg_inherits inhed ON (inhed.inhparent=dep.refobjid)
-LEFT JOIN pg_event_trigger evt ON evt.oid=dep.refobjid
-LEFT JOIN pg_collation col ON col.oid=dep.refobjid
-LEFT JOIN pg_namespace colns ON col.collnamespace=colns.oid
-LEFT JOIN pg_ts_config ftsc ON ftsc.oid=dep.refobjid
-LEFT JOIN pg_namespace ftscns ON ftsc.cfgnamespace=ftscns.oid
-LEFT JOIN pg_ts_dict ftsd ON ftsd.oid=dep.refobjid
-LEFT JOIN pg_namespace ftsdns ON ftsd.dictnamespace=ftsdns.oid
-LEFT JOIN pg_ts_parser ftsp ON ftsp.oid=dep.refobjid
-LEFT JOIN pg_namespace ftspns ON ftsp.prsnamespace=ftspns.oid
-LEFT JOIN pg_ts_template ftst ON ftst.oid=dep.refobjid
-LEFT JOIN pg_namespace ftstns ON ftst.tmplnamespace=ftstns.oid
-LEFT JOIN pg_extension ext ON ext.oid=dep.refobjid
+FROM pg_catalog.pg_depend dep
+LEFT JOIN pg_catalog.pg_class cl ON dep.refobjid=cl.oid
+LEFT JOIN pg_catalog.pg_attribute att ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
+LEFT JOIN pg_catalog.pg_namespace nsc ON cl.relnamespace=nsc.oid
+LEFT JOIN pg_catalog.pg_proc pr ON dep.refobjid=pr.oid
+LEFT JOIN pg_catalog.pg_namespace nsp ON pr.pronamespace=nsp.oid
+LEFT JOIN pg_catalog.pg_trigger tg ON dep.refobjid=tg.oid
+LEFT JOIN pg_catalog.pg_type ty ON dep.refobjid=ty.oid
+LEFT JOIN pg_catalog.pg_namespace nst ON ty.typnamespace=nst.oid
+LEFT JOIN pg_catalog.pg_constraint co ON dep.refobjid=co.oid
+LEFT JOIN pg_catalog.pg_class coc ON co.conrelid=coc.oid
+LEFT JOIN pg_catalog.pg_namespace nso ON co.connamespace=nso.oid
+LEFT JOIN pg_catalog.pg_rewrite rw ON dep.refobjid=rw.oid
+LEFT JOIN pg_catalog.pg_class clrw ON clrw.oid=rw.ev_class
+LEFT JOIN pg_catalog.pg_namespace nsrw ON clrw.relnamespace=nsrw.oid
+LEFT JOIN pg_catalog.pg_language la ON dep.refobjid=la.oid
+LEFT JOIN pg_catalog.pg_namespace ns ON dep.refobjid=ns.oid
+LEFT JOIN pg_catalog.pg_attrdef ad ON ad.adrelid=att.attrelid AND ad.adnum=att.attnum
+LEFT JOIN pg_catalog.pg_foreign_server fs ON fs.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_foreign_data_wrapper fdw ON fdw.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_type prtyp ON prtyp.oid = pr.prorettype
+LEFT JOIN pg_catalog.pg_inherits inhits ON (inhits.inhrelid=dep.refobjid)
+LEFT JOIN pg_catalog.pg_inherits inhed ON (inhed.inhparent=dep.refobjid)
+LEFT JOIN pg_catalog.pg_event_trigger evt ON evt.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_collation col ON col.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace colns ON col.collnamespace=colns.oid
+LEFT JOIN pg_catalog.pg_ts_config ftsc ON ftsc.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace ftscns ON ftsc.cfgnamespace=ftscns.oid
+LEFT JOIN pg_catalog.pg_ts_dict ftsd ON ftsd.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace ftsdns ON ftsd.dictnamespace=ftsdns.oid
+LEFT JOIN pg_catalog.pg_ts_parser ftsp ON ftsp.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace ftspns ON ftsp.prsnamespace=ftspns.oid
+LEFT JOIN pg_catalog.pg_ts_template ftst ON ftst.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace ftstns ON ftst.tmplnamespace=ftstns.oid
+LEFT JOIN pg_catalog.pg_extension ext ON ext.oid=dep.refobjid
 {{where_clause}} AND
-refclassid IN ( SELECT oid FROM pg_class WHERE relname IN
+refclassid IN ( SELECT oid FROM pg_catalog.pg_class WHERE relname IN
    ('pg_class', 'pg_constraint', 'pg_conversion', 'pg_language', 'pg_proc', 'pg_rewrite', 'pg_namespace',
    'pg_trigger', 'pg_type', 'pg_attrdef', 'pg_event_trigger', 'pg_foreign_server', 'pg_foreign_data_wrapper',
    'pg_collation', 'pg_ts_config', 'pg_ts_dict', 'pg_ts_parser', 'pg_ts_template', 'pg_extension'))
@@ -78,10 +78,10 @@ SELECT DISTINCT dep.deptype, dep.refclassid, dep.refobjid, cl.relkind, ad.adbin,
 	CASE WHEN cl.relname IS NOT NULL OR att.attname IS NOT NULL THEN cl.relname || COALESCE('.' || att.attname, '')
     ELSE cl.relname END AS refname,
     nsc.nspname AS nspname, '0' AS is_inherits, '0' AS is_inherited
-FROM pg_depend dep
-LEFT JOIN pg_class cl ON dep.refobjid=cl.oid
-LEFT JOIN pg_attribute att ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
-LEFT JOIN pg_namespace nsc ON cl.relnamespace=nsc.oid
-LEFT JOIN pg_attrdef ad ON ad.adrelid=att.attrelid AND ad.adnum=att.attnum
-WHERE dep.objid IN (SELECT oid FROM pg_rewrite WHERE ev_class={{object_id}}) AND cl.relkind not in ('v', 'm')
+FROM pg_catalog.pg_depend dep
+LEFT JOIN pg_catalog.pg_class cl ON dep.refobjid=cl.oid
+LEFT JOIN pg_catalog.pg_attribute att ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
+LEFT JOIN pg_catalog.pg_namespace nsc ON cl.relnamespace=nsc.oid
+LEFT JOIN pg_catalog.pg_attrdef ad ON ad.adrelid=att.attrelid AND ad.adnum=att.attnum
+WHERE dep.objid IN (SELECT oid FROM pg_catalog.pg_rewrite WHERE ev_class={{object_id}}) AND cl.relkind not in ('v', 'm')
 ORDER BY refclassid, relkind
diff --git a/web/pgadmin/browser/server_groups/servers/templates/depends/pg/9.3_plus/dependents.sql b/web/pgadmin/browser/server_groups/servers/templates/depends/pg/9.3_plus/dependents.sql
index 0b85a3759..59f2047eb 100644
--- a/web/pgadmin/browser/server_groups/servers/templates/depends/pg/9.3_plus/dependents.sql
+++ b/web/pgadmin/browser/server_groups/servers/templates/depends/pg/9.3_plus/dependents.sql
@@ -30,43 +30,43 @@ SELECT DISTINCT dep.deptype, dep.classid, cl.relkind, ad.adbin, ad.adsrc,
         ftsdns.nspname, ftspns.nspname, ftstns.nspname) AS nspname,
     CASE WHEN inhits.inhparent IS NOT NULL THEN '1' ELSE '0' END AS is_inherits,
     CASE WHEN inhed.inhparent IS NOT NULL THEN '1' ELSE '0' END AS is_inherited
-FROM pg_depend dep
-LEFT JOIN pg_class cl ON dep.objid=cl.oid
-LEFT JOIN pg_attribute att ON dep.objid=att.attrelid AND dep.objsubid=att.attnum
-LEFT JOIN pg_namespace nsc ON cl.relnamespace=nsc.oid
-LEFT JOIN pg_proc pr ON dep.objid=pr.oid
-LEFT JOIN pg_namespace nsp ON pr.pronamespace=nsp.oid
-LEFT JOIN pg_trigger tg ON dep.objid=tg.oid
-LEFT JOIN pg_type ty ON dep.objid=ty.oid
-LEFT JOIN pg_namespace nst ON ty.typnamespace=nst.oid
-LEFT JOIN pg_constraint co ON dep.objid=co.oid
-LEFT JOIN pg_class coc ON co.conrelid=coc.oid
-LEFT JOIN pg_namespace nso ON co.connamespace=nso.oid
-LEFT JOIN pg_rewrite rw ON dep.objid=rw.oid
-LEFT JOIN pg_class clrw ON clrw.oid=rw.ev_class
-LEFT JOIN pg_namespace nsrw ON clrw.relnamespace=nsrw.oid
-LEFT JOIN pg_language la ON dep.objid=la.oid
-LEFT JOIN pg_namespace ns ON dep.objid=ns.oid
-LEFT JOIN pg_attrdef ad ON ad.oid=dep.objid
-LEFT JOIN pg_foreign_server fs ON fs.oid=dep.objid
-LEFT JOIN pg_foreign_data_wrapper fdw ON fdw.oid=dep.objid
-LEFT JOIN pg_type prtyp ON prtyp.oid = pr.prorettype
-LEFT JOIN pg_inherits inhits ON (inhits.inhrelid=dep.objid)
-LEFT JOIN pg_inherits inhed ON (inhed.inhparent=dep.objid)
-LEFT JOIN pg_event_trigger evt ON evt.oid=dep.objid
-LEFT JOIN pg_collation col ON col.oid=dep.objid
-LEFT JOIN pg_namespace colns ON col.collnamespace=colns.oid
-LEFT JOIN pg_ts_config ftsc ON ftsc.oid=dep.objid
-LEFT JOIN pg_namespace ftscns ON ftsc.cfgnamespace=ftscns.oid
-LEFT JOIN pg_ts_dict ftsd ON ftsd.oid=dep.objid
-LEFT JOIN pg_namespace ftsdns ON ftsd.dictnamespace=ftsdns.oid
-LEFT JOIN pg_ts_parser ftsp ON ftsp.oid=dep.objid
-LEFT JOIN pg_namespace ftspns ON ftsp.prsnamespace=ftspns.oid
-LEFT JOIN pg_ts_template ftst ON ftst.oid=dep.objid
-LEFT JOIN pg_namespace ftstns ON ftst.tmplnamespace=ftstns.oid
-LEFT JOIN pg_extension ext ON ext.oid=dep.objid
+FROM pg_catalog.pg_depend dep
+LEFT JOIN pg_catalog.pg_class cl ON dep.objid=cl.oid
+LEFT JOIN pg_catalog.pg_attribute att ON dep.objid=att.attrelid AND dep.objsubid=att.attnum
+LEFT JOIN pg_catalog.pg_namespace nsc ON cl.relnamespace=nsc.oid
+LEFT JOIN pg_catalog.pg_proc pr ON dep.objid=pr.oid
+LEFT JOIN pg_catalog.pg_namespace nsp ON pr.pronamespace=nsp.oid
+LEFT JOIN pg_catalog.pg_trigger tg ON dep.objid=tg.oid
+LEFT JOIN pg_catalog.pg_type ty ON dep.objid=ty.oid
+LEFT JOIN pg_catalog.pg_namespace nst ON ty.typnamespace=nst.oid
+LEFT JOIN pg_catalog.pg_constraint co ON dep.objid=co.oid
+LEFT JOIN pg_catalog.pg_class coc ON co.conrelid=coc.oid
+LEFT JOIN pg_catalog.pg_namespace nso ON co.connamespace=nso.oid
+LEFT JOIN pg_catalog.pg_rewrite rw ON dep.objid=rw.oid
+LEFT JOIN pg_catalog.pg_class clrw ON clrw.oid=rw.ev_class
+LEFT JOIN pg_catalog.pg_namespace nsrw ON clrw.relnamespace=nsrw.oid
+LEFT JOIN pg_catalog.pg_language la ON dep.objid=la.oid
+LEFT JOIN pg_catalog.pg_namespace ns ON dep.objid=ns.oid
+LEFT JOIN pg_catalog.pg_attrdef ad ON ad.oid=dep.objid
+LEFT JOIN pg_catalog.pg_foreign_server fs ON fs.oid=dep.objid
+LEFT JOIN pg_catalog.pg_foreign_data_wrapper fdw ON fdw.oid=dep.objid
+LEFT JOIN pg_catalog.pg_type prtyp ON prtyp.oid = pr.prorettype
+LEFT JOIN pg_catalog.pg_inherits inhits ON (inhits.inhrelid=dep.objid)
+LEFT JOIN pg_catalog.pg_inherits inhed ON (inhed.inhparent=dep.objid)
+LEFT JOIN pg_catalog.pg_event_trigger evt ON evt.oid=dep.objid
+LEFT JOIN pg_catalog.pg_collation col ON col.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace colns ON col.collnamespace=colns.oid
+LEFT JOIN pg_catalog.pg_ts_config ftsc ON ftsc.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftscns ON ftsc.cfgnamespace=ftscns.oid
+LEFT JOIN pg_catalog.pg_ts_dict ftsd ON ftsd.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftsdns ON ftsd.dictnamespace=ftsdns.oid
+LEFT JOIN pg_catalog.pg_ts_parser ftsp ON ftsp.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftspns ON ftsp.prsnamespace=ftspns.oid
+LEFT JOIN pg_catalog.pg_ts_template ftst ON ftst.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftstns ON ftst.tmplnamespace=ftstns.oid
+LEFT JOIN pg_catalog.pg_extension ext ON ext.oid=dep.objid
 {{where_clause}} AND
-classid IN ( SELECT oid FROM pg_class WHERE relname IN
+classid IN ( SELECT oid FROM pg_catalog.pg_class WHERE relname IN
    ('pg_class', 'pg_constraint', 'pg_conversion', 'pg_language', 'pg_proc', 'pg_rewrite', 'pg_namespace',
    'pg_trigger', 'pg_type', 'pg_attrdef', 'pg_event_trigger', 'pg_foreign_server', 'pg_foreign_data_wrapper',
    'pg_collation', 'pg_ts_config', 'pg_ts_dict', 'pg_ts_parser', 'pg_ts_template', 'pg_extension'))
diff --git a/web/pgadmin/browser/server_groups/servers/templates/depends/pg/9.5_plus/dependencies.sql b/web/pgadmin/browser/server_groups/servers/templates/depends/pg/9.5_plus/dependencies.sql
index 6552f0c95..8e270c604 100644
--- a/web/pgadmin/browser/server_groups/servers/templates/depends/pg/9.5_plus/dependencies.sql
+++ b/web/pgadmin/browser/server_groups/servers/templates/depends/pg/9.5_plus/dependencies.sql
@@ -31,44 +31,44 @@ SELECT DISTINCT dep.deptype, dep.refclassid, dep.refobjid, cl.relkind, ad.adbin,
         ftsdns.nspname, ftspns.nspname, ftstns.nspname) AS nspname,
     CASE WHEN inhits.inhparent IS NOT NULL THEN '1' ELSE '0' END AS is_inherits,
     CASE WHEN inhed.inhparent IS NOT NULL THEN '1' ELSE '0' END AS is_inherited
-FROM pg_depend dep
-LEFT JOIN pg_class cl ON dep.refobjid=cl.oid
-LEFT JOIN pg_attribute att ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
-LEFT JOIN pg_namespace nsc ON cl.relnamespace=nsc.oid
-LEFT JOIN pg_proc pr ON dep.refobjid=pr.oid
-LEFT JOIN pg_namespace nsp ON pr.pronamespace=nsp.oid
-LEFT JOIN pg_trigger tg ON dep.refobjid=tg.oid
-LEFT JOIN pg_type ty ON dep.refobjid=ty.oid
-LEFT JOIN pg_namespace nst ON ty.typnamespace=nst.oid
-LEFT JOIN pg_constraint co ON dep.refobjid=co.oid
-LEFT JOIN pg_class coc ON co.conrelid=coc.oid
-LEFT JOIN pg_namespace nso ON co.connamespace=nso.oid
-LEFT JOIN pg_rewrite rw ON dep.refobjid=rw.oid
-LEFT JOIN pg_class clrw ON clrw.oid=rw.ev_class
-LEFT JOIN pg_namespace nsrw ON clrw.relnamespace=nsrw.oid
-LEFT JOIN pg_language la ON dep.refobjid=la.oid
-LEFT JOIN pg_namespace ns ON dep.refobjid=ns.oid
-LEFT JOIN pg_attrdef ad ON ad.adrelid=att.attrelid AND ad.adnum=att.attnum
-LEFT JOIN pg_foreign_server fs ON fs.oid=dep.refobjid
-LEFT JOIN pg_foreign_data_wrapper fdw ON fdw.oid=dep.refobjid
-LEFT JOIN pg_type prtyp ON prtyp.oid = pr.prorettype
-LEFT JOIN pg_inherits inhits ON (inhits.inhrelid=dep.refobjid)
-LEFT JOIN pg_inherits inhed ON (inhed.inhparent=dep.refobjid)
-LEFT JOIN pg_event_trigger evt ON evt.oid=dep.refobjid
-LEFT JOIN pg_collation col ON col.oid=dep.refobjid
-LEFT JOIN pg_namespace colns ON col.collnamespace=colns.oid
-LEFT JOIN pg_ts_config ftsc ON ftsc.oid=dep.refobjid
-LEFT JOIN pg_namespace ftscns ON ftsc.cfgnamespace=ftscns.oid
-LEFT JOIN pg_ts_dict ftsd ON ftsd.oid=dep.refobjid
-LEFT JOIN pg_namespace ftsdns ON ftsd.dictnamespace=ftsdns.oid
-LEFT JOIN pg_ts_parser ftsp ON ftsp.oid=dep.refobjid
-LEFT JOIN pg_namespace ftspns ON ftsp.prsnamespace=ftspns.oid
-LEFT JOIN pg_ts_template ftst ON ftst.oid=dep.refobjid
-LEFT JOIN pg_namespace ftstns ON ftst.tmplnamespace=ftstns.oid
-LEFT JOIN pg_extension ext ON ext.oid=dep.refobjid
-LEFT JOIN pg_policy pl ON pl.oid=dep.refobjid
+FROM pg_catalog.pg_depend dep
+LEFT JOIN pg_catalog.pg_class cl ON dep.refobjid=cl.oid
+LEFT JOIN pg_catalog.pg_attribute att ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
+LEFT JOIN pg_catalog.pg_namespace nsc ON cl.relnamespace=nsc.oid
+LEFT JOIN pg_catalog.pg_proc pr ON dep.refobjid=pr.oid
+LEFT JOIN pg_catalog.pg_namespace nsp ON pr.pronamespace=nsp.oid
+LEFT JOIN pg_catalog.pg_trigger tg ON dep.refobjid=tg.oid
+LEFT JOIN pg_catalog.pg_type ty ON dep.refobjid=ty.oid
+LEFT JOIN pg_catalog.pg_namespace nst ON ty.typnamespace=nst.oid
+LEFT JOIN pg_catalog.pg_constraint co ON dep.refobjid=co.oid
+LEFT JOIN pg_catalog.pg_class coc ON co.conrelid=coc.oid
+LEFT JOIN pg_catalog.pg_namespace nso ON co.connamespace=nso.oid
+LEFT JOIN pg_catalog.pg_rewrite rw ON dep.refobjid=rw.oid
+LEFT JOIN pg_catalog.pg_class clrw ON clrw.oid=rw.ev_class
+LEFT JOIN pg_catalog.pg_namespace nsrw ON clrw.relnamespace=nsrw.oid
+LEFT JOIN pg_catalog.pg_language la ON dep.refobjid=la.oid
+LEFT JOIN pg_catalog.pg_namespace ns ON dep.refobjid=ns.oid
+LEFT JOIN pg_catalog.pg_attrdef ad ON ad.adrelid=att.attrelid AND ad.adnum=att.attnum
+LEFT JOIN pg_catalog.pg_foreign_server fs ON fs.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_foreign_data_wrapper fdw ON fdw.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_type prtyp ON prtyp.oid = pr.prorettype
+LEFT JOIN pg_catalog.pg_inherits inhits ON (inhits.inhrelid=dep.refobjid)
+LEFT JOIN pg_catalog.pg_inherits inhed ON (inhed.inhparent=dep.refobjid)
+LEFT JOIN pg_catalog.pg_event_trigger evt ON evt.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_collation col ON col.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace colns ON col.collnamespace=colns.oid
+LEFT JOIN pg_catalog.pg_ts_config ftsc ON ftsc.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace ftscns ON ftsc.cfgnamespace=ftscns.oid
+LEFT JOIN pg_catalog.pg_ts_dict ftsd ON ftsd.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace ftsdns ON ftsd.dictnamespace=ftsdns.oid
+LEFT JOIN pg_catalog.pg_ts_parser ftsp ON ftsp.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace ftspns ON ftsp.prsnamespace=ftspns.oid
+LEFT JOIN pg_catalog.pg_ts_template ftst ON ftst.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace ftstns ON ftst.tmplnamespace=ftstns.oid
+LEFT JOIN pg_catalog.pg_extension ext ON ext.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_policy pl ON pl.oid=dep.refobjid
 {{where_clause}} AND
-refclassid IN ( SELECT oid FROM pg_class WHERE relname IN
+refclassid IN ( SELECT oid FROM pg_catalog.pg_class WHERE relname IN
    ('pg_class', 'pg_constraint', 'pg_conversion', 'pg_language', 'pg_proc', 'pg_rewrite', 'pg_namespace',
    'pg_trigger', 'pg_type', 'pg_attrdef', 'pg_event_trigger', 'pg_foreign_server', 'pg_foreign_data_wrapper',
    'pg_collation', 'pg_ts_config', 'pg_ts_dict', 'pg_ts_parser', 'pg_ts_template', 'pg_extension', 'pg_policy'))
@@ -80,10 +80,10 @@ SELECT DISTINCT dep.deptype, dep.refclassid, dep.refobjid, cl.relkind, ad.adbin,
 	CASE WHEN cl.relname IS NOT NULL OR att.attname IS NOT NULL THEN cl.relname || COALESCE('.' || att.attname, '')
     ELSE cl.relname END AS refname,
     nsc.nspname AS nspname, '0' AS is_inherits, '0' AS is_inherited
-FROM pg_depend dep
-LEFT JOIN pg_class cl ON dep.refobjid=cl.oid
-LEFT JOIN pg_attribute att ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
-LEFT JOIN pg_namespace nsc ON cl.relnamespace=nsc.oid
-LEFT JOIN pg_attrdef ad ON ad.adrelid=att.attrelid AND ad.adnum=att.attnum
-WHERE dep.objid IN (SELECT oid FROM pg_rewrite WHERE ev_class={{object_id}}) AND cl.relkind not in ('v', 'm')
+FROM pg_catalog.pg_depend dep
+LEFT JOIN pg_catalog.pg_class cl ON dep.refobjid=cl.oid
+LEFT JOIN pg_catalog.pg_attribute att ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
+LEFT JOIN pg_catalog.pg_namespace nsc ON cl.relnamespace=nsc.oid
+LEFT JOIN pg_catalog.pg_attrdef ad ON ad.adrelid=att.attrelid AND ad.adnum=att.attnum
+WHERE dep.objid IN (SELECT oid FROM pg_catalog.pg_rewrite WHERE ev_class={{object_id}}) AND cl.relkind not in ('v', 'm')
 ORDER BY refclassid, relkind
diff --git a/web/pgadmin/browser/server_groups/servers/templates/depends/pg/9.5_plus/dependents.sql b/web/pgadmin/browser/server_groups/servers/templates/depends/pg/9.5_plus/dependents.sql
index 7ee93100d..a3f162721 100644
--- a/web/pgadmin/browser/server_groups/servers/templates/depends/pg/9.5_plus/dependents.sql
+++ b/web/pgadmin/browser/server_groups/servers/templates/depends/pg/9.5_plus/dependents.sql
@@ -31,44 +31,44 @@ SELECT DISTINCT dep.deptype, dep.classid, cl.relkind, ad.adbin, ad.adsrc,
         ftsdns.nspname, ftspns.nspname, ftstns.nspname) AS nspname,
     CASE WHEN inhits.inhparent IS NOT NULL THEN '1' ELSE '0' END AS is_inherits,
     CASE WHEN inhed.inhparent IS NOT NULL THEN '1' ELSE '0' END AS is_inherited
-FROM pg_depend dep
-LEFT JOIN pg_class cl ON dep.objid=cl.oid
-LEFT JOIN pg_attribute att ON dep.objid=att.attrelid AND dep.objsubid=att.attnum
-LEFT JOIN pg_namespace nsc ON cl.relnamespace=nsc.oid
-LEFT JOIN pg_proc pr ON dep.objid=pr.oid
-LEFT JOIN pg_namespace nsp ON pr.pronamespace=nsp.oid
-LEFT JOIN pg_trigger tg ON dep.objid=tg.oid
-LEFT JOIN pg_type ty ON dep.objid=ty.oid
-LEFT JOIN pg_namespace nst ON ty.typnamespace=nst.oid
-LEFT JOIN pg_constraint co ON dep.objid=co.oid
-LEFT JOIN pg_class coc ON co.conrelid=coc.oid
-LEFT JOIN pg_namespace nso ON co.connamespace=nso.oid
-LEFT JOIN pg_rewrite rw ON dep.objid=rw.oid
-LEFT JOIN pg_class clrw ON clrw.oid=rw.ev_class
-LEFT JOIN pg_namespace nsrw ON clrw.relnamespace=nsrw.oid
-LEFT JOIN pg_language la ON dep.objid=la.oid
-LEFT JOIN pg_namespace ns ON dep.objid=ns.oid
-LEFT JOIN pg_attrdef ad ON ad.oid=dep.objid
-LEFT JOIN pg_foreign_server fs ON fs.oid=dep.objid
-LEFT JOIN pg_foreign_data_wrapper fdw ON fdw.oid=dep.objid
-LEFT JOIN pg_type prtyp ON prtyp.oid = pr.prorettype
-LEFT JOIN pg_inherits inhits ON (inhits.inhrelid=dep.objid)
-LEFT JOIN pg_inherits inhed ON (inhed.inhparent=dep.objid)
-LEFT JOIN pg_event_trigger evt ON evt.oid=dep.objid
-LEFT JOIN pg_collation col ON col.oid=dep.objid
-LEFT JOIN pg_namespace colns ON col.collnamespace=colns.oid
-LEFT JOIN pg_ts_config ftsc ON ftsc.oid=dep.objid
-LEFT JOIN pg_namespace ftscns ON ftsc.cfgnamespace=ftscns.oid
-LEFT JOIN pg_ts_dict ftsd ON ftsd.oid=dep.objid
-LEFT JOIN pg_namespace ftsdns ON ftsd.dictnamespace=ftsdns.oid
-LEFT JOIN pg_ts_parser ftsp ON ftsp.oid=dep.objid
-LEFT JOIN pg_namespace ftspns ON ftsp.prsnamespace=ftspns.oid
-LEFT JOIN pg_ts_template ftst ON ftst.oid=dep.objid
-LEFT JOIN pg_namespace ftstns ON ftst.tmplnamespace=ftstns.oid
-LEFT JOIN pg_extension ext ON ext.oid=dep.objid
-LEFT JOIN pg_policy pl ON pl.oid=dep.objid
+FROM pg_catalog.pg_depend dep
+LEFT JOIN pg_catalog.pg_class cl ON dep.objid=cl.oid
+LEFT JOIN pg_catalog.pg_attribute att ON dep.objid=att.attrelid AND dep.objsubid=att.attnum
+LEFT JOIN pg_catalog.pg_namespace nsc ON cl.relnamespace=nsc.oid
+LEFT JOIN pg_catalog.pg_proc pr ON dep.objid=pr.oid
+LEFT JOIN pg_catalog.pg_namespace nsp ON pr.pronamespace=nsp.oid
+LEFT JOIN pg_catalog.pg_trigger tg ON dep.objid=tg.oid
+LEFT JOIN pg_catalog.pg_type ty ON dep.objid=ty.oid
+LEFT JOIN pg_catalog.pg_namespace nst ON ty.typnamespace=nst.oid
+LEFT JOIN pg_catalog.pg_constraint co ON dep.objid=co.oid
+LEFT JOIN pg_catalog.pg_class coc ON co.conrelid=coc.oid
+LEFT JOIN pg_catalog.pg_namespace nso ON co.connamespace=nso.oid
+LEFT JOIN pg_catalog.pg_rewrite rw ON dep.objid=rw.oid
+LEFT JOIN pg_catalog.pg_class clrw ON clrw.oid=rw.ev_class
+LEFT JOIN pg_catalog.pg_namespace nsrw ON clrw.relnamespace=nsrw.oid
+LEFT JOIN pg_catalog.pg_language la ON dep.objid=la.oid
+LEFT JOIN pg_catalog.pg_namespace ns ON dep.objid=ns.oid
+LEFT JOIN pg_catalog.pg_attrdef ad ON ad.oid=dep.objid
+LEFT JOIN pg_catalog.pg_foreign_server fs ON fs.oid=dep.objid
+LEFT JOIN pg_catalog.pg_foreign_data_wrapper fdw ON fdw.oid=dep.objid
+LEFT JOIN pg_catalog.pg_type prtyp ON prtyp.oid = pr.prorettype
+LEFT JOIN pg_catalog.pg_inherits inhits ON (inhits.inhrelid=dep.objid)
+LEFT JOIN pg_catalog.pg_inherits inhed ON (inhed.inhparent=dep.objid)
+LEFT JOIN pg_catalog.pg_event_trigger evt ON evt.oid=dep.objid
+LEFT JOIN pg_catalog.pg_collation col ON col.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace colns ON col.collnamespace=colns.oid
+LEFT JOIN pg_catalog.pg_ts_config ftsc ON ftsc.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftscns ON ftsc.cfgnamespace=ftscns.oid
+LEFT JOIN pg_catalog.pg_ts_dict ftsd ON ftsd.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftsdns ON ftsd.dictnamespace=ftsdns.oid
+LEFT JOIN pg_catalog.pg_ts_parser ftsp ON ftsp.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftspns ON ftsp.prsnamespace=ftspns.oid
+LEFT JOIN pg_catalog.pg_ts_template ftst ON ftst.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftstns ON ftst.tmplnamespace=ftstns.oid
+LEFT JOIN pg_catalog.pg_extension ext ON ext.oid=dep.objid
+LEFT JOIN pg_catalog.pg_policy pl ON pl.oid=dep.objid
 {{where_clause}} AND
-classid IN ( SELECT oid FROM pg_class WHERE relname IN
+classid IN ( SELECT oid FROM pg_catalog.pg_class WHERE relname IN
    ('pg_class', 'pg_constraint', 'pg_conversion', 'pg_language', 'pg_proc', 'pg_rewrite', 'pg_namespace',
    'pg_trigger', 'pg_type', 'pg_attrdef', 'pg_event_trigger', 'pg_foreign_server', 'pg_foreign_data_wrapper',
    'pg_collation', 'pg_ts_config', 'pg_ts_dict', 'pg_ts_parser', 'pg_ts_template', 'pg_extension', 'pg_policy'))
diff --git a/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/10_plus/dependents.sql b/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/10_plus/dependents.sql
index 24f7bf164..aa231627d 100644
--- a/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/10_plus/dependents.sql
+++ b/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/10_plus/dependents.sql
@@ -27,55 +27,55 @@ SELECT DISTINCT dep.deptype, dep.classid, cl.relkind, ad.adbin, ad.adsrc,
     CASE WHEN cl.relname IS NOT NULL AND att.attname IS NOT NULL THEN cl.relname || COALESCE('.' || att.attname, '')
     ELSE COALESCE(cl.relname, co.conname, pr.proname, tg.tgname, ty.typname, la.lanname, rw.rulename, ns.nspname,
                   fs.srvname, fdw.fdwname, evt.evtname, col.collname, ftsc.cfgname, ftsd.dictname, ftsp.prsname,
-                  ftst.tmplname, ext.extname, syn.synname, pl.polname, quote_ident(pubns.nspname)||'.'||quote_ident(pubcl.relname))
+                  ftst.tmplname, ext.extname, syn.synname, pl.polname, pg_catalog.quote_ident(pubns.nspname)||'.'||pg_catalog.quote_ident(pubcl.relname))
     END AS refname,
     COALESCE(nsc.nspname, nso.nspname, nsp.nspname, nst.nspname, nsrw.nspname, colns.nspname, ftscns.nspname,
         ftsdns.nspname, ftspns.nspname, ftstns.nspname, synns.nspname) AS nspname,
     CASE WHEN inhits.inhparent IS NOT NULL THEN '1' ELSE '0' END AS is_inherits,
     CASE WHEN inhed.inhparent IS NOT NULL THEN '1' ELSE '0' END AS is_inherited
-FROM pg_depend dep
-LEFT JOIN pg_class cl ON dep.objid=cl.oid
-LEFT JOIN pg_attribute att ON dep.objid=att.attrelid AND dep.objsubid=att.attnum
-LEFT JOIN pg_namespace nsc ON cl.relnamespace=nsc.oid
-LEFT JOIN pg_proc pr ON dep.objid=pr.oid
-LEFT JOIN pg_namespace nsp ON pr.pronamespace=nsp.oid
-LEFT JOIN pg_trigger tg ON dep.objid=tg.oid
-LEFT JOIN pg_type ty ON dep.objid=ty.oid
-LEFT JOIN pg_namespace nst ON ty.typnamespace=nst.oid
-LEFT JOIN pg_constraint co ON dep.objid=co.oid
-LEFT JOIN pg_class coc ON co.conrelid=coc.oid
-LEFT JOIN pg_namespace nso ON co.connamespace=nso.oid
-LEFT JOIN pg_rewrite rw ON dep.objid=rw.oid
-LEFT JOIN pg_class clrw ON clrw.oid=rw.ev_class
-LEFT JOIN pg_namespace nsrw ON clrw.relnamespace=nsrw.oid
-LEFT JOIN pg_language la ON dep.objid=la.oid
-LEFT JOIN pg_namespace ns ON dep.objid=ns.oid
-LEFT JOIN pg_attrdef ad ON ad.oid=dep.objid
-LEFT JOIN pg_foreign_server fs ON fs.oid=dep.objid
-LEFT JOIN pg_foreign_data_wrapper fdw ON fdw.oid=dep.objid
-LEFT JOIN pg_type prtyp ON prtyp.oid = pr.prorettype
-LEFT JOIN pg_inherits inhits ON (inhits.inhrelid=dep.objid)
-LEFT JOIN pg_inherits inhed ON (inhed.inhparent=dep.objid)
-LEFT JOIN pg_event_trigger evt ON evt.oid=dep.objid
-LEFT JOIN pg_collation col ON col.oid=dep.objid
-LEFT JOIN pg_namespace colns ON col.collnamespace=colns.oid
-LEFT JOIN pg_ts_config ftsc ON ftsc.oid=dep.objid
-LEFT JOIN pg_namespace ftscns ON ftsc.cfgnamespace=ftscns.oid
-LEFT JOIN pg_ts_dict ftsd ON ftsd.oid=dep.objid
-LEFT JOIN pg_namespace ftsdns ON ftsd.dictnamespace=ftsdns.oid
-LEFT JOIN pg_ts_parser ftsp ON ftsp.oid=dep.objid
-LEFT JOIN pg_namespace ftspns ON ftsp.prsnamespace=ftspns.oid
-LEFT JOIN pg_ts_template ftst ON ftst.oid=dep.objid
-LEFT JOIN pg_namespace ftstns ON ftst.tmplnamespace=ftstns.oid
-LEFT JOIN pg_extension ext ON ext.oid=dep.objid
-LEFT JOIN pg_synonym syn ON syn.oid=dep.objid
-LEFT JOIN pg_namespace synns ON syn.synnamespace=synns.oid
-LEFT JOIN pg_policy pl ON pl.oid=dep.objid
-LEFT JOIN pg_publication_rel pub_rel ON pub_rel.oid = dep.objid
-LEFT JOIN pg_class pubcl ON pubcl.oid = pub_rel.prrelid
-LEFT JOIN pg_namespace pubns ON pubns.oid=pubcl.relnamespace
+FROM pg_catalog.pg_depend dep
+LEFT JOIN pg_catalog.pg_class cl ON dep.objid=cl.oid
+LEFT JOIN pg_catalog.pg_attribute att ON dep.objid=att.attrelid AND dep.objsubid=att.attnum
+LEFT JOIN pg_catalog.pg_namespace nsc ON cl.relnamespace=nsc.oid
+LEFT JOIN pg_catalog.pg_proc pr ON dep.objid=pr.oid
+LEFT JOIN pg_catalog.pg_namespace nsp ON pr.pronamespace=nsp.oid
+LEFT JOIN pg_catalog.pg_trigger tg ON dep.objid=tg.oid
+LEFT JOIN pg_catalog.pg_type ty ON dep.objid=ty.oid
+LEFT JOIN pg_catalog.pg_namespace nst ON ty.typnamespace=nst.oid
+LEFT JOIN pg_catalog.pg_constraint co ON dep.objid=co.oid
+LEFT JOIN pg_catalog.pg_class coc ON co.conrelid=coc.oid
+LEFT JOIN pg_catalog.pg_namespace nso ON co.connamespace=nso.oid
+LEFT JOIN pg_catalog.pg_rewrite rw ON dep.objid=rw.oid
+LEFT JOIN pg_catalog.pg_class clrw ON clrw.oid=rw.ev_class
+LEFT JOIN pg_catalog.pg_namespace nsrw ON clrw.relnamespace=nsrw.oid
+LEFT JOIN pg_catalog.pg_language la ON dep.objid=la.oid
+LEFT JOIN pg_catalog.pg_namespace ns ON dep.objid=ns.oid
+LEFT JOIN pg_catalog.pg_attrdef ad ON ad.oid=dep.objid
+LEFT JOIN pg_catalog.pg_foreign_server fs ON fs.oid=dep.objid
+LEFT JOIN pg_catalog.pg_foreign_data_wrapper fdw ON fdw.oid=dep.objid
+LEFT JOIN pg_catalog.pg_type prtyp ON prtyp.oid = pr.prorettype
+LEFT JOIN pg_catalog.pg_inherits inhits ON (inhits.inhrelid=dep.objid)
+LEFT JOIN pg_catalog.pg_inherits inhed ON (inhed.inhparent=dep.objid)
+LEFT JOIN pg_catalog.pg_event_trigger evt ON evt.oid=dep.objid
+LEFT JOIN pg_catalog.pg_collation col ON col.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace colns ON col.collnamespace=colns.oid
+LEFT JOIN pg_catalog.pg_ts_config ftsc ON ftsc.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftscns ON ftsc.cfgnamespace=ftscns.oid
+LEFT JOIN pg_catalog.pg_ts_dict ftsd ON ftsd.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftsdns ON ftsd.dictnamespace=ftsdns.oid
+LEFT JOIN pg_catalog.pg_ts_parser ftsp ON ftsp.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftspns ON ftsp.prsnamespace=ftspns.oid
+LEFT JOIN pg_catalog.pg_ts_template ftst ON ftst.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftstns ON ftst.tmplnamespace=ftstns.oid
+LEFT JOIN pg_catalog.pg_extension ext ON ext.oid=dep.objid
+LEFT JOIN pg_catalog.pg_synonym syn ON syn.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace synns ON syn.synnamespace=synns.oid
+LEFT JOIN pg_catalog.pg_policy pl ON pl.oid=dep.objid
+LEFT JOIN pg_catalog.pg_publication_rel pub_rel ON pub_rel.oid = dep.objid
+LEFT JOIN pg_catalog.pg_class pubcl ON pubcl.oid = pub_rel.prrelid
+LEFT JOIN pg_catalog.pg_namespace pubns ON pubns.oid=pubcl.relnamespace
 {{where_clause}} AND
-classid IN ( SELECT oid FROM pg_class WHERE relname IN
+classid IN ( SELECT oid FROM pg_catalog.pg_class WHERE relname IN
    ('pg_class', 'pg_constraint', 'pg_conversion', 'pg_language', 'pg_proc', 'pg_rewrite', 'pg_namespace',
    'pg_trigger', 'pg_type', 'pg_attrdef', 'pg_event_trigger', 'pg_foreign_server', 'pg_foreign_data_wrapper',
    'pg_collation', 'pg_ts_config', 'pg_ts_dict', 'pg_ts_parser', 'pg_ts_template', 'pg_extension', 'pg_policy', 'pg_subscription', 'pg_publication_rel'))
diff --git a/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/11_plus/dependencies.sql b/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/11_plus/dependencies.sql
index 1dffdb0f2..8dcff32de 100644
--- a/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/11_plus/dependencies.sql
+++ b/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/11_plus/dependencies.sql
@@ -32,46 +32,46 @@ SELECT DISTINCT dep.deptype, dep.refclassid, dep.refobjid, cl.relkind, ad.adbin,
         ftsdns.nspname, ftspns.nspname, ftstns.nspname, synns.nspname) AS nspname,
     CASE WHEN inhits.inhparent IS NOT NULL THEN '1' ELSE '0' END AS is_inherits,
     CASE WHEN inhed.inhparent IS NOT NULL THEN '1' ELSE '0' END AS is_inherited
-FROM pg_depend dep
-LEFT JOIN pg_class cl ON dep.refobjid=cl.oid
-LEFT JOIN pg_attribute att ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
-LEFT JOIN pg_namespace nsc ON cl.relnamespace=nsc.oid
-LEFT JOIN pg_proc pr ON dep.refobjid=pr.oid
-LEFT JOIN pg_namespace nsp ON pr.pronamespace=nsp.oid
-LEFT JOIN pg_trigger tg ON dep.refobjid=tg.oid
-LEFT JOIN pg_type ty ON dep.refobjid=ty.oid
-LEFT JOIN pg_namespace nst ON ty.typnamespace=nst.oid
-LEFT JOIN pg_constraint co ON dep.refobjid=co.oid
-LEFT JOIN pg_class coc ON co.conrelid=coc.oid
-LEFT JOIN pg_namespace nso ON co.connamespace=nso.oid
-LEFT JOIN pg_rewrite rw ON dep.refobjid=rw.oid
-LEFT JOIN pg_class clrw ON clrw.oid=rw.ev_class
-LEFT JOIN pg_namespace nsrw ON clrw.relnamespace=nsrw.oid
-LEFT JOIN pg_language la ON dep.refobjid=la.oid
-LEFT JOIN pg_namespace ns ON dep.refobjid=ns.oid
-LEFT JOIN pg_attrdef ad ON ad.adrelid=att.attrelid AND ad.adnum=att.attnum
-LEFT JOIN pg_foreign_server fs ON fs.oid=dep.refobjid
-LEFT JOIN pg_foreign_data_wrapper fdw ON fdw.oid=dep.refobjid
-LEFT JOIN pg_type prtyp ON prtyp.oid = pr.prorettype
-LEFT JOIN pg_inherits inhits ON (inhits.inhrelid=dep.refobjid)
-LEFT JOIN pg_inherits inhed ON (inhed.inhparent=dep.refobjid)
-LEFT JOIN pg_event_trigger evt ON evt.oid=dep.refobjid
-LEFT JOIN pg_collation col ON col.oid=dep.refobjid
-LEFT JOIN pg_namespace colns ON col.collnamespace=colns.oid
-LEFT JOIN pg_ts_config ftsc ON ftsc.oid=dep.refobjid
-LEFT JOIN pg_namespace ftscns ON ftsc.cfgnamespace=ftscns.oid
-LEFT JOIN pg_ts_dict ftsd ON ftsd.oid=dep.refobjid
-LEFT JOIN pg_namespace ftsdns ON ftsd.dictnamespace=ftsdns.oid
-LEFT JOIN pg_ts_parser ftsp ON ftsp.oid=dep.refobjid
-LEFT JOIN pg_namespace ftspns ON ftsp.prsnamespace=ftspns.oid
-LEFT JOIN pg_ts_template ftst ON ftst.oid=dep.refobjid
-LEFT JOIN pg_namespace ftstns ON ftst.tmplnamespace=ftstns.oid
-LEFT JOIN pg_extension ext ON ext.oid=dep.refobjid
-LEFT JOIN pg_synonym syn ON syn.oid=dep.refobjid
-LEFT JOIN pg_namespace synns ON syn.synnamespace=synns.oid
-LEFT JOIN pg_policy pl ON pl.oid=dep.refobjid
+FROM pg_catalog.pg_depend dep
+LEFT JOIN pg_catalog.pg_class cl ON dep.refobjid=cl.oid
+LEFT JOIN pg_catalog.pg_attribute att ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
+LEFT JOIN pg_catalog.pg_namespace nsc ON cl.relnamespace=nsc.oid
+LEFT JOIN pg_catalog.pg_proc pr ON dep.refobjid=pr.oid
+LEFT JOIN pg_catalog.pg_namespace nsp ON pr.pronamespace=nsp.oid
+LEFT JOIN pg_catalog.pg_trigger tg ON dep.refobjid=tg.oid
+LEFT JOIN pg_catalog.pg_type ty ON dep.refobjid=ty.oid
+LEFT JOIN pg_catalog.pg_namespace nst ON ty.typnamespace=nst.oid
+LEFT JOIN pg_catalog.pg_constraint co ON dep.refobjid=co.oid
+LEFT JOIN pg_catalog.pg_class coc ON co.conrelid=coc.oid
+LEFT JOIN pg_catalog.pg_namespace nso ON co.connamespace=nso.oid
+LEFT JOIN pg_catalog.pg_rewrite rw ON dep.refobjid=rw.oid
+LEFT JOIN pg_catalog.pg_class clrw ON clrw.oid=rw.ev_class
+LEFT JOIN pg_catalog.pg_namespace nsrw ON clrw.relnamespace=nsrw.oid
+LEFT JOIN pg_catalog.pg_language la ON dep.refobjid=la.oid
+LEFT JOIN pg_catalog.pg_namespace ns ON dep.refobjid=ns.oid
+LEFT JOIN pg_catalog.pg_attrdef ad ON ad.adrelid=att.attrelid AND ad.adnum=att.attnum
+LEFT JOIN pg_catalog.pg_foreign_server fs ON fs.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_foreign_data_wrapper fdw ON fdw.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_type prtyp ON prtyp.oid = pr.prorettype
+LEFT JOIN pg_catalog.pg_inherits inhits ON (inhits.inhrelid=dep.refobjid)
+LEFT JOIN pg_catalog.pg_inherits inhed ON (inhed.inhparent=dep.refobjid)
+LEFT JOIN pg_catalog.pg_event_trigger evt ON evt.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_collation col ON col.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace colns ON col.collnamespace=colns.oid
+LEFT JOIN pg_catalog.pg_ts_config ftsc ON ftsc.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace ftscns ON ftsc.cfgnamespace=ftscns.oid
+LEFT JOIN pg_catalog.pg_ts_dict ftsd ON ftsd.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace ftsdns ON ftsd.dictnamespace=ftsdns.oid
+LEFT JOIN pg_catalog.pg_ts_parser ftsp ON ftsp.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace ftspns ON ftsp.prsnamespace=ftspns.oid
+LEFT JOIN pg_catalog.pg_ts_template ftst ON ftst.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace ftstns ON ftst.tmplnamespace=ftstns.oid
+LEFT JOIN pg_catalog.pg_extension ext ON ext.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_synonym syn ON syn.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace synns ON syn.synnamespace=synns.oid
+LEFT JOIN pg_catalog.pg_policy pl ON pl.oid=dep.refobjid
 {{where_clause}} AND
-refclassid IN ( SELECT oid FROM pg_class WHERE relname IN
+refclassid IN ( SELECT oid FROM pg_catalog.pg_class WHERE relname IN
    ('pg_class', 'pg_constraint', 'pg_conversion', 'pg_language', 'pg_proc', 'pg_rewrite', 'pg_namespace',
    'pg_trigger', 'pg_type', 'pg_attrdef', 'pg_event_trigger', 'pg_foreign_server', 'pg_foreign_data_wrapper',
    'pg_collation', 'pg_ts_config', 'pg_ts_dict', 'pg_ts_parser', 'pg_ts_template', 'pg_extension',
@@ -84,10 +84,10 @@ SELECT DISTINCT dep.deptype, dep.refclassid, dep.refobjid, cl.relkind, ad.adbin,
 	CASE WHEN cl.relname IS NOT NULL OR att.attname IS NOT NULL THEN cl.relname || COALESCE('.' || att.attname, '')
     ELSE cl.relname END AS refname,
     nsc.nspname AS nspname, '0' AS is_inherits, '0' AS is_inherited
-FROM pg_depend dep
-LEFT JOIN pg_class cl ON dep.refobjid=cl.oid
-LEFT JOIN pg_attribute att ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
-LEFT JOIN pg_namespace nsc ON cl.relnamespace=nsc.oid
-LEFT JOIN pg_attrdef ad ON ad.adrelid=att.attrelid AND ad.adnum=att.attnum
-WHERE dep.objid IN (SELECT oid FROM pg_rewrite WHERE ev_class={{object_id}}) AND cl.relkind not in ('v', 'm')
+FROM pg_catalog.pg_depend dep
+LEFT JOIN pg_catalog.pg_class cl ON dep.refobjid=cl.oid
+LEFT JOIN pg_catalog.pg_attribute att ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
+LEFT JOIN pg_catalog.pg_namespace nsc ON cl.relnamespace=nsc.oid
+LEFT JOIN pg_catalog.pg_attrdef ad ON ad.adrelid=att.attrelid AND ad.adnum=att.attnum
+WHERE dep.objid IN (SELECT oid FROM pg_catalog.pg_rewrite WHERE ev_class={{object_id}}) AND cl.relkind not in ('v', 'm')
 ORDER BY refclassid, relkind
diff --git a/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/11_plus/dependents.sql b/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/11_plus/dependents.sql
index b6e368731..1f6d0dfba 100644
--- a/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/11_plus/dependents.sql
+++ b/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/11_plus/dependents.sql
@@ -32,46 +32,46 @@ SELECT DISTINCT dep.deptype, dep.classid, cl.relkind, ad.adbin, ad.adsrc,
         ftsdns.nspname, ftspns.nspname, ftstns.nspname, synns.nspname) AS nspname,
     CASE WHEN inhits.inhparent IS NOT NULL THEN '1' ELSE '0' END AS is_inherits,
     CASE WHEN inhed.inhparent IS NOT NULL THEN '1' ELSE '0' END AS is_inherited
-FROM pg_depend dep
-LEFT JOIN pg_class cl ON dep.objid=cl.oid
-LEFT JOIN pg_attribute att ON dep.objid=att.attrelid AND dep.objsubid=att.attnum
-LEFT JOIN pg_namespace nsc ON cl.relnamespace=nsc.oid
-LEFT JOIN pg_proc pr ON dep.objid=pr.oid
-LEFT JOIN pg_namespace nsp ON pr.pronamespace=nsp.oid
-LEFT JOIN pg_trigger tg ON dep.objid=tg.oid
-LEFT JOIN pg_type ty ON dep.objid=ty.oid
-LEFT JOIN pg_namespace nst ON ty.typnamespace=nst.oid
-LEFT JOIN pg_constraint co ON dep.objid=co.oid
-LEFT JOIN pg_class coc ON co.conrelid=coc.oid
-LEFT JOIN pg_namespace nso ON co.connamespace=nso.oid
-LEFT JOIN pg_rewrite rw ON dep.objid=rw.oid
-LEFT JOIN pg_class clrw ON clrw.oid=rw.ev_class
-LEFT JOIN pg_namespace nsrw ON clrw.relnamespace=nsrw.oid
-LEFT JOIN pg_language la ON dep.objid=la.oid
-LEFT JOIN pg_namespace ns ON dep.objid=ns.oid
-LEFT JOIN pg_attrdef ad ON ad.oid=dep.objid
-LEFT JOIN pg_foreign_server fs ON fs.oid=dep.objid
-LEFT JOIN pg_foreign_data_wrapper fdw ON fdw.oid=dep.objid
-LEFT JOIN pg_type prtyp ON prtyp.oid = pr.prorettype
-LEFT JOIN pg_inherits inhits ON (inhits.inhrelid=dep.objid)
-LEFT JOIN pg_inherits inhed ON (inhed.inhparent=dep.objid)
-LEFT JOIN pg_event_trigger evt ON evt.oid=dep.objid
-LEFT JOIN pg_collation col ON col.oid=dep.objid
-LEFT JOIN pg_namespace colns ON col.collnamespace=colns.oid
-LEFT JOIN pg_ts_config ftsc ON ftsc.oid=dep.objid
-LEFT JOIN pg_namespace ftscns ON ftsc.cfgnamespace=ftscns.oid
-LEFT JOIN pg_ts_dict ftsd ON ftsd.oid=dep.objid
-LEFT JOIN pg_namespace ftsdns ON ftsd.dictnamespace=ftsdns.oid
-LEFT JOIN pg_ts_parser ftsp ON ftsp.oid=dep.objid
-LEFT JOIN pg_namespace ftspns ON ftsp.prsnamespace=ftspns.oid
-LEFT JOIN pg_ts_template ftst ON ftst.oid=dep.objid
-LEFT JOIN pg_namespace ftstns ON ftst.tmplnamespace=ftstns.oid
-LEFT JOIN pg_extension ext ON ext.oid=dep.objid
-LEFT JOIN pg_synonym syn ON syn.oid=dep.objid
-LEFT JOIN pg_namespace synns ON syn.synnamespace=synns.oid
-LEFT JOIN pg_policy pl ON pl.oid=dep.objid
+FROM pg_catalog.pg_depend dep
+LEFT JOIN pg_catalog.pg_class cl ON dep.objid=cl.oid
+LEFT JOIN pg_catalog.pg_attribute att ON dep.objid=att.attrelid AND dep.objsubid=att.attnum
+LEFT JOIN pg_catalog.pg_namespace nsc ON cl.relnamespace=nsc.oid
+LEFT JOIN pg_catalog.pg_proc pr ON dep.objid=pr.oid
+LEFT JOIN pg_catalog.pg_namespace nsp ON pr.pronamespace=nsp.oid
+LEFT JOIN pg_catalog.pg_trigger tg ON dep.objid=tg.oid
+LEFT JOIN pg_catalog.pg_type ty ON dep.objid=ty.oid
+LEFT JOIN pg_catalog.pg_namespace nst ON ty.typnamespace=nst.oid
+LEFT JOIN pg_catalog.pg_constraint co ON dep.objid=co.oid
+LEFT JOIN pg_catalog.pg_class coc ON co.conrelid=coc.oid
+LEFT JOIN pg_catalog.pg_namespace nso ON co.connamespace=nso.oid
+LEFT JOIN pg_catalog.pg_rewrite rw ON dep.objid=rw.oid
+LEFT JOIN pg_catalog.pg_class clrw ON clrw.oid=rw.ev_class
+LEFT JOIN pg_catalog.pg_namespace nsrw ON clrw.relnamespace=nsrw.oid
+LEFT JOIN pg_catalog.pg_language la ON dep.objid=la.oid
+LEFT JOIN pg_catalog.pg_namespace ns ON dep.objid=ns.oid
+LEFT JOIN pg_catalog.pg_attrdef ad ON ad.oid=dep.objid
+LEFT JOIN pg_catalog.pg_foreign_server fs ON fs.oid=dep.objid
+LEFT JOIN pg_catalog.pg_foreign_data_wrapper fdw ON fdw.oid=dep.objid
+LEFT JOIN pg_catalog.pg_type prtyp ON prtyp.oid = pr.prorettype
+LEFT JOIN pg_catalog.pg_inherits inhits ON (inhits.inhrelid=dep.objid)
+LEFT JOIN pg_catalog.pg_inherits inhed ON (inhed.inhparent=dep.objid)
+LEFT JOIN pg_catalog.pg_event_trigger evt ON evt.oid=dep.objid
+LEFT JOIN pg_catalog.pg_collation col ON col.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace colns ON col.collnamespace=colns.oid
+LEFT JOIN pg_catalog.pg_ts_config ftsc ON ftsc.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftscns ON ftsc.cfgnamespace=ftscns.oid
+LEFT JOIN pg_catalog.pg_ts_dict ftsd ON ftsd.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftsdns ON ftsd.dictnamespace=ftsdns.oid
+LEFT JOIN pg_catalog.pg_ts_parser ftsp ON ftsp.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftspns ON ftsp.prsnamespace=ftspns.oid
+LEFT JOIN pg_catalog.pg_ts_template ftst ON ftst.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftstns ON ftst.tmplnamespace=ftstns.oid
+LEFT JOIN pg_catalog.pg_extension ext ON ext.oid=dep.objid
+LEFT JOIN pg_catalog.pg_synonym syn ON syn.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace synns ON syn.synnamespace=synns.oid
+LEFT JOIN pg_catalog.pg_policy pl ON pl.oid=dep.objid
 {{where_clause}} AND
-classid IN ( SELECT oid FROM pg_class WHERE relname IN
+classid IN ( SELECT oid FROM pg_catalog.pg_class WHERE relname IN
    ('pg_class', 'pg_constraint', 'pg_conversion', 'pg_language', 'pg_proc', 'pg_rewrite', 'pg_namespace',
    'pg_trigger', 'pg_type', 'pg_attrdef', 'pg_event_trigger', 'pg_foreign_server', 'pg_foreign_data_wrapper',
    'pg_collation', 'pg_ts_config', 'pg_ts_dict', 'pg_ts_parser', 'pg_ts_template', 'pg_extension',
diff --git a/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/12_plus/dependencies.sql b/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/12_plus/dependencies.sql
index 653bbdb4d..03f7048e8 100644
--- a/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/12_plus/dependencies.sql
+++ b/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/12_plus/dependencies.sql
@@ -1,4 +1,4 @@
-SELECT DISTINCT dep.deptype, dep.refclassid, dep.refobjid, cl.relkind, ad.adbin, pg_get_expr(ad.adbin, ad.adrelid) as adsrc,
+SELECT DISTINCT dep.deptype, dep.refclassid, dep.refobjid, cl.relkind, ad.adbin, pg_catalog.pg_get_expr(ad.adbin, ad.adrelid) as adsrc,
     CASE WHEN cl.relkind IS NOT NULL THEN CASE WHEN cl.relkind = 'r' THEN cl.relkind || COALESCE(dep.refobjsubid::text, '') ELSE cl.relkind END
         WHEN tg.oid IS NOT NULL THEN CASE WHEN tg.tgpackageoid != 0 THEN 'Tc'::text ELSE 'Tr'::text END
         WHEN ty.oid IS NOT NULL THEN CASE WHEN ty.typtype = 'd' THEN 'd'::text ELSE 'Ty'::text END
@@ -32,62 +32,62 @@ SELECT DISTINCT dep.deptype, dep.refclassid, dep.refobjid, cl.relkind, ad.adbin,
         ftsdns.nspname, ftspns.nspname, ftstns.nspname, synns.nspname) AS nspname,
     CASE WHEN inhits.inhparent IS NOT NULL THEN '1' ELSE '0' END AS is_inherits,
     CASE WHEN inhed.inhparent IS NOT NULL THEN '1' ELSE '0' END AS is_inherited
-FROM pg_depend dep
-LEFT JOIN pg_class cl ON dep.refobjid=cl.oid
-LEFT JOIN pg_attribute att ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
-LEFT JOIN pg_namespace nsc ON cl.relnamespace=nsc.oid
-LEFT JOIN pg_proc pr ON dep.refobjid=pr.oid
-LEFT JOIN pg_namespace nsp ON pr.pronamespace=nsp.oid
-LEFT JOIN pg_trigger tg ON dep.refobjid=tg.oid
-LEFT JOIN pg_type ty ON dep.refobjid=ty.oid
-LEFT JOIN pg_namespace nst ON ty.typnamespace=nst.oid
-LEFT JOIN pg_constraint co ON dep.refobjid=co.oid
-LEFT JOIN pg_class coc ON co.conrelid=coc.oid
-LEFT JOIN pg_namespace nso ON co.connamespace=nso.oid
-LEFT JOIN pg_rewrite rw ON dep.refobjid=rw.oid
-LEFT JOIN pg_class clrw ON clrw.oid=rw.ev_class
-LEFT JOIN pg_namespace nsrw ON clrw.relnamespace=nsrw.oid
-LEFT JOIN pg_language la ON dep.refobjid=la.oid
-LEFT JOIN pg_namespace ns ON dep.refobjid=ns.oid
-LEFT JOIN pg_attrdef ad ON ad.adrelid=att.attrelid AND ad.adnum=att.attnum
-LEFT JOIN pg_foreign_server fs ON fs.oid=dep.refobjid
-LEFT JOIN pg_foreign_data_wrapper fdw ON fdw.oid=dep.refobjid
-LEFT JOIN pg_type prtyp ON prtyp.oid = pr.prorettype
-LEFT JOIN pg_inherits inhits ON (inhits.inhrelid=dep.refobjid)
-LEFT JOIN pg_inherits inhed ON (inhed.inhparent=dep.refobjid)
-LEFT JOIN pg_event_trigger evt ON evt.oid=dep.refobjid
-LEFT JOIN pg_collation col ON col.oid=dep.refobjid
-LEFT JOIN pg_namespace colns ON col.collnamespace=colns.oid
-LEFT JOIN pg_ts_config ftsc ON ftsc.oid=dep.refobjid
-LEFT JOIN pg_namespace ftscns ON ftsc.cfgnamespace=ftscns.oid
-LEFT JOIN pg_ts_dict ftsd ON ftsd.oid=dep.refobjid
-LEFT JOIN pg_namespace ftsdns ON ftsd.dictnamespace=ftsdns.oid
-LEFT JOIN pg_ts_parser ftsp ON ftsp.oid=dep.refobjid
-LEFT JOIN pg_namespace ftspns ON ftsp.prsnamespace=ftspns.oid
-LEFT JOIN pg_ts_template ftst ON ftst.oid=dep.refobjid
-LEFT JOIN pg_namespace ftstns ON ftst.tmplnamespace=ftstns.oid
-LEFT JOIN pg_extension ext ON ext.oid=dep.refobjid
-LEFT JOIN pg_synonym syn ON syn.oid=dep.refobjid
-LEFT JOIN pg_namespace synns ON syn.synnamespace=synns.oid
-LEFT JOIN pg_policy pl ON pl.oid=dep.refobjid
+FROM pg_catalog.pg_depend dep
+LEFT JOIN pg_catalog.pg_class cl ON dep.refobjid=cl.oid
+LEFT JOIN pg_catalog.pg_attribute att ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
+LEFT JOIN pg_catalog.pg_namespace nsc ON cl.relnamespace=nsc.oid
+LEFT JOIN pg_catalog.pg_proc pr ON dep.refobjid=pr.oid
+LEFT JOIN pg_catalog.pg_namespace nsp ON pr.pronamespace=nsp.oid
+LEFT JOIN pg_catalog.pg_trigger tg ON dep.refobjid=tg.oid
+LEFT JOIN pg_catalog.pg_type ty ON dep.refobjid=ty.oid
+LEFT JOIN pg_catalog.pg_namespace nst ON ty.typnamespace=nst.oid
+LEFT JOIN pg_catalog.pg_constraint co ON dep.refobjid=co.oid
+LEFT JOIN pg_catalog.pg_class coc ON co.conrelid=coc.oid
+LEFT JOIN pg_catalog.pg_namespace nso ON co.connamespace=nso.oid
+LEFT JOIN pg_catalog.pg_rewrite rw ON dep.refobjid=rw.oid
+LEFT JOIN pg_catalog.pg_class clrw ON clrw.oid=rw.ev_class
+LEFT JOIN pg_catalog.pg_namespace nsrw ON clrw.relnamespace=nsrw.oid
+LEFT JOIN pg_catalog.pg_language la ON dep.refobjid=la.oid
+LEFT JOIN pg_catalog.pg_namespace ns ON dep.refobjid=ns.oid
+LEFT JOIN pg_catalog.pg_attrdef ad ON ad.adrelid=att.attrelid AND ad.adnum=att.attnum
+LEFT JOIN pg_catalog.pg_foreign_server fs ON fs.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_foreign_data_wrapper fdw ON fdw.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_type prtyp ON prtyp.oid = pr.prorettype
+LEFT JOIN pg_catalog.pg_inherits inhits ON (inhits.inhrelid=dep.refobjid)
+LEFT JOIN pg_catalog.pg_inherits inhed ON (inhed.inhparent=dep.refobjid)
+LEFT JOIN pg_catalog.pg_event_trigger evt ON evt.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_collation col ON col.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace colns ON col.collnamespace=colns.oid
+LEFT JOIN pg_catalog.pg_ts_config ftsc ON ftsc.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace ftscns ON ftsc.cfgnamespace=ftscns.oid
+LEFT JOIN pg_catalog.pg_ts_dict ftsd ON ftsd.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace ftsdns ON ftsd.dictnamespace=ftsdns.oid
+LEFT JOIN pg_catalog.pg_ts_parser ftsp ON ftsp.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace ftspns ON ftsp.prsnamespace=ftspns.oid
+LEFT JOIN pg_catalog.pg_ts_template ftst ON ftst.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace ftstns ON ftst.tmplnamespace=ftstns.oid
+LEFT JOIN pg_catalog.pg_extension ext ON ext.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_synonym syn ON syn.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace synns ON syn.synnamespace=synns.oid
+LEFT JOIN pg_catalog.pg_policy pl ON pl.oid=dep.refobjid
 {{where_clause}} AND
-refclassid IN ( SELECT oid FROM pg_class WHERE relname IN
+refclassid IN ( SELECT oid FROM pg_catalog.pg_class WHERE relname IN
    ('pg_class', 'pg_constraint', 'pg_conversion', 'pg_language', 'pg_proc', 'pg_rewrite', 'pg_namespace',
    'pg_trigger', 'pg_type', 'pg_attrdef', 'pg_event_trigger', 'pg_foreign_server', 'pg_foreign_data_wrapper',
    'pg_collation', 'pg_ts_config', 'pg_ts_dict', 'pg_ts_parser', 'pg_ts_template', 'pg_extension',
    'pg_synonym', 'pg_policy'))
 UNION
-SELECT DISTINCT dep.deptype, dep.refclassid, dep.refobjid, cl.relkind, ad.adbin, pg_get_expr(ad.adbin, ad.adrelid) as adsrc,
+SELECT DISTINCT dep.deptype, dep.refclassid, dep.refobjid, cl.relkind, ad.adbin, pg_catalog.pg_get_expr(ad.adbin, ad.adrelid) as adsrc,
     CASE WHEN cl.relkind IS NOT NULL THEN CASE WHEN cl.relkind = 'r' THEN cl.relkind || COALESCE(dep.refobjsubid::text, '') ELSE cl.relkind END
     ELSE '' END AS type,
 	NULL AS ownertable,
 	CASE WHEN cl.relname IS NOT NULL OR att.attname IS NOT NULL THEN cl.relname || COALESCE('.' || att.attname, '')
     ELSE cl.relname END AS refname,
     nsc.nspname AS nspname, '0' AS is_inherits, '0' AS is_inherited
-FROM pg_depend dep
-LEFT JOIN pg_class cl ON dep.refobjid=cl.oid
-LEFT JOIN pg_attribute att ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
-LEFT JOIN pg_namespace nsc ON cl.relnamespace=nsc.oid
-LEFT JOIN pg_attrdef ad ON ad.adrelid=att.attrelid AND ad.adnum=att.attnum
-WHERE dep.objid IN (SELECT oid FROM pg_rewrite WHERE ev_class={{object_id}}) AND cl.relkind not in ('v', 'm')
+FROM pg_catalog.pg_depend dep
+LEFT JOIN pg_catalog.pg_class cl ON dep.refobjid=cl.oid
+LEFT JOIN pg_catalog.pg_attribute att ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
+LEFT JOIN pg_catalog.pg_namespace nsc ON cl.relnamespace=nsc.oid
+LEFT JOIN pg_catalog.pg_attrdef ad ON ad.adrelid=att.attrelid AND ad.adnum=att.attnum
+WHERE dep.objid IN (SELECT oid FROM pg_catalog.pg_rewrite WHERE ev_class={{object_id}}) AND cl.relkind not in ('v', 'm')
 ORDER BY refclassid, relkind
diff --git a/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/12_plus/dependents.sql b/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/12_plus/dependents.sql
index c6781827f..bf7b895b4 100644
--- a/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/12_plus/dependents.sql
+++ b/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/12_plus/dependents.sql
@@ -32,46 +32,46 @@ SELECT DISTINCT dep.deptype, dep.classid, cl.relkind, ad.adbin, pg_get_expr(ad.a
         ftsdns.nspname, ftspns.nspname, ftstns.nspname, synns.nspname) AS nspname,
     CASE WHEN inhits.inhparent IS NOT NULL THEN '1' ELSE '0' END AS is_inherits,
     CASE WHEN inhed.inhparent IS NOT NULL THEN '1' ELSE '0' END AS is_inherited
-FROM pg_depend dep
-LEFT JOIN pg_class cl ON dep.objid=cl.oid
-LEFT JOIN pg_attribute att ON dep.objid=att.attrelid AND dep.objsubid=att.attnum
-LEFT JOIN pg_namespace nsc ON cl.relnamespace=nsc.oid
-LEFT JOIN pg_proc pr ON dep.objid=pr.oid
-LEFT JOIN pg_namespace nsp ON pr.pronamespace=nsp.oid
-LEFT JOIN pg_trigger tg ON dep.objid=tg.oid
-LEFT JOIN pg_type ty ON dep.objid=ty.oid
-LEFT JOIN pg_namespace nst ON ty.typnamespace=nst.oid
-LEFT JOIN pg_constraint co ON dep.objid=co.oid
-LEFT JOIN pg_class coc ON co.conrelid=coc.oid
-LEFT JOIN pg_namespace nso ON co.connamespace=nso.oid
-LEFT JOIN pg_rewrite rw ON dep.objid=rw.oid
-LEFT JOIN pg_class clrw ON clrw.oid=rw.ev_class
-LEFT JOIN pg_namespace nsrw ON clrw.relnamespace=nsrw.oid
-LEFT JOIN pg_language la ON dep.objid=la.oid
-LEFT JOIN pg_namespace ns ON dep.objid=ns.oid
-LEFT JOIN pg_attrdef ad ON ad.oid=dep.objid
-LEFT JOIN pg_foreign_server fs ON fs.oid=dep.objid
-LEFT JOIN pg_foreign_data_wrapper fdw ON fdw.oid=dep.objid
-LEFT JOIN pg_type prtyp ON prtyp.oid = pr.prorettype
-LEFT JOIN pg_inherits inhits ON (inhits.inhrelid=dep.objid)
-LEFT JOIN pg_inherits inhed ON (inhed.inhparent=dep.objid)
-LEFT JOIN pg_event_trigger evt ON evt.oid=dep.objid
-LEFT JOIN pg_collation col ON col.oid=dep.objid
-LEFT JOIN pg_namespace colns ON col.collnamespace=colns.oid
-LEFT JOIN pg_ts_config ftsc ON ftsc.oid=dep.objid
-LEFT JOIN pg_namespace ftscns ON ftsc.cfgnamespace=ftscns.oid
-LEFT JOIN pg_ts_dict ftsd ON ftsd.oid=dep.objid
-LEFT JOIN pg_namespace ftsdns ON ftsd.dictnamespace=ftsdns.oid
-LEFT JOIN pg_ts_parser ftsp ON ftsp.oid=dep.objid
-LEFT JOIN pg_namespace ftspns ON ftsp.prsnamespace=ftspns.oid
-LEFT JOIN pg_ts_template ftst ON ftst.oid=dep.objid
-LEFT JOIN pg_namespace ftstns ON ftst.tmplnamespace=ftstns.oid
-LEFT JOIN pg_extension ext ON ext.oid=dep.objid
-LEFT JOIN pg_synonym syn ON syn.oid=dep.objid
-LEFT JOIN pg_namespace synns ON syn.synnamespace=synns.oid
-LEFT JOIN pg_policy pl ON pl.oid=dep.objid
+FROM pg_catalog.pg_depend dep
+LEFT JOIN pg_catalog.pg_class cl ON dep.objid=cl.oid
+LEFT JOIN pg_catalog.pg_attribute att ON dep.objid=att.attrelid AND dep.objsubid=att.attnum
+LEFT JOIN pg_catalog.pg_namespace nsc ON cl.relnamespace=nsc.oid
+LEFT JOIN pg_catalog.pg_proc pr ON dep.objid=pr.oid
+LEFT JOIN pg_catalog.pg_namespace nsp ON pr.pronamespace=nsp.oid
+LEFT JOIN pg_catalog.pg_trigger tg ON dep.objid=tg.oid
+LEFT JOIN pg_catalog.pg_type ty ON dep.objid=ty.oid
+LEFT JOIN pg_catalog.pg_namespace nst ON ty.typnamespace=nst.oid
+LEFT JOIN pg_catalog.pg_constraint co ON dep.objid=co.oid
+LEFT JOIN pg_catalog.pg_class coc ON co.conrelid=coc.oid
+LEFT JOIN pg_catalog.pg_namespace nso ON co.connamespace=nso.oid
+LEFT JOIN pg_catalog.pg_rewrite rw ON dep.objid=rw.oid
+LEFT JOIN pg_catalog.pg_class clrw ON clrw.oid=rw.ev_class
+LEFT JOIN pg_catalog.pg_namespace nsrw ON clrw.relnamespace=nsrw.oid
+LEFT JOIN pg_catalog.pg_language la ON dep.objid=la.oid
+LEFT JOIN pg_catalog.pg_namespace ns ON dep.objid=ns.oid
+LEFT JOIN pg_catalog.pg_attrdef ad ON ad.oid=dep.objid
+LEFT JOIN pg_catalog.pg_foreign_server fs ON fs.oid=dep.objid
+LEFT JOIN pg_catalog.pg_foreign_data_wrapper fdw ON fdw.oid=dep.objid
+LEFT JOIN pg_catalog.pg_type prtyp ON prtyp.oid = pr.prorettype
+LEFT JOIN pg_catalog.pg_inherits inhits ON (inhits.inhrelid=dep.objid)
+LEFT JOIN pg_catalog.pg_inherits inhed ON (inhed.inhparent=dep.objid)
+LEFT JOIN pg_catalog.pg_event_trigger evt ON evt.oid=dep.objid
+LEFT JOIN pg_catalog.pg_collation col ON col.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace colns ON col.collnamespace=colns.oid
+LEFT JOIN pg_catalog.pg_ts_config ftsc ON ftsc.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftscns ON ftsc.cfgnamespace=ftscns.oid
+LEFT JOIN pg_catalog.pg_ts_dict ftsd ON ftsd.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftsdns ON ftsd.dictnamespace=ftsdns.oid
+LEFT JOIN pg_catalog.pg_ts_parser ftsp ON ftsp.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftspns ON ftsp.prsnamespace=ftspns.oid
+LEFT JOIN pg_catalog.pg_ts_template ftst ON ftst.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftstns ON ftst.tmplnamespace=ftstns.oid
+LEFT JOIN pg_catalog.pg_extension ext ON ext.oid=dep.objid
+LEFT JOIN pg_catalog.pg_synonym syn ON syn.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace synns ON syn.synnamespace=synns.oid
+LEFT JOIN pg_catalog.pg_policy pl ON pl.oid=dep.objid
 {{where_clause}} AND
-classid IN ( SELECT oid FROM pg_class WHERE relname IN
+classid IN ( SELECT oid FROM pg_catalog.pg_class WHERE relname IN
    ('pg_class', 'pg_constraint', 'pg_conversion', 'pg_language', 'pg_proc', 'pg_rewrite', 'pg_namespace',
    'pg_trigger', 'pg_type', 'pg_attrdef', 'pg_event_trigger', 'pg_foreign_server', 'pg_foreign_data_wrapper',
    'pg_collation', 'pg_ts_config', 'pg_ts_dict', 'pg_ts_parser', 'pg_ts_template', 'pg_extension',
diff --git a/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/9.1_plus/dependencies.sql b/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/9.1_plus/dependencies.sql
index 500217673..409f53ce4 100644
--- a/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/9.1_plus/dependencies.sql
+++ b/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/9.1_plus/dependencies.sql
@@ -30,44 +30,44 @@ SELECT DISTINCT dep.deptype, dep.refclassid, dep.refobjid, cl.relkind, ad.adbin,
         ftsdns.nspname, ftspns.nspname, ftstns.nspname, synns.nspname) AS nspname,
     CASE WHEN inhits.inhparent IS NOT NULL THEN '1' ELSE '0' END AS is_inherits,
     CASE WHEN inhed.inhparent IS NOT NULL THEN '1' ELSE '0' END AS is_inherited
-FROM pg_depend dep
-LEFT JOIN pg_class cl ON dep.refobjid=cl.oid
-LEFT JOIN pg_attribute att ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
-LEFT JOIN pg_namespace nsc ON cl.relnamespace=nsc.oid
-LEFT JOIN pg_proc pr ON dep.refobjid=pr.oid
-LEFT JOIN pg_namespace nsp ON pr.pronamespace=nsp.oid
-LEFT JOIN pg_trigger tg ON dep.refobjid=tg.oid
-LEFT JOIN pg_type ty ON dep.refobjid=ty.oid
-LEFT JOIN pg_namespace nst ON ty.typnamespace=nst.oid
-LEFT JOIN pg_constraint co ON dep.refobjid=co.oid
-LEFT JOIN pg_class coc ON co.conrelid=coc.oid
-LEFT JOIN pg_namespace nso ON co.connamespace=nso.oid
-LEFT JOIN pg_rewrite rw ON dep.refobjid=rw.oid
-LEFT JOIN pg_class clrw ON clrw.oid=rw.ev_class
-LEFT JOIN pg_namespace nsrw ON clrw.relnamespace=nsrw.oid
-LEFT JOIN pg_language la ON dep.refobjid=la.oid
-LEFT JOIN pg_namespace ns ON dep.refobjid=ns.oid
-LEFT JOIN pg_attrdef ad ON ad.adrelid=att.attrelid AND ad.adnum=att.attnum
-LEFT JOIN pg_foreign_server fs ON fs.oid=dep.refobjid
-LEFT JOIN pg_foreign_data_wrapper fdw ON fdw.oid=dep.refobjid
-LEFT JOIN pg_type prtyp ON prtyp.oid = pr.prorettype
-LEFT JOIN pg_inherits inhits ON (inhits.inhrelid=dep.refobjid)
-LEFT JOIN pg_inherits inhed ON (inhed.inhparent=dep.refobjid)
-LEFT JOIN pg_collation col ON col.oid=dep.refobjid
-LEFT JOIN pg_namespace colns ON col.collnamespace=colns.oid
-LEFT JOIN pg_ts_config ftsc ON ftsc.oid=dep.refobjid
-LEFT JOIN pg_namespace ftscns ON ftsc.cfgnamespace=ftscns.oid
-LEFT JOIN pg_ts_dict ftsd ON ftsd.oid=dep.refobjid
-LEFT JOIN pg_namespace ftsdns ON ftsd.dictnamespace=ftsdns.oid
-LEFT JOIN pg_ts_parser ftsp ON ftsp.oid=dep.refobjid
-LEFT JOIN pg_namespace ftspns ON ftsp.prsnamespace=ftspns.oid
-LEFT JOIN pg_ts_template ftst ON ftst.oid=dep.refobjid
-LEFT JOIN pg_namespace ftstns ON ftst.tmplnamespace=ftstns.oid
-LEFT JOIN pg_extension ext ON ext.oid=dep.refobjid
-LEFT JOIN pg_synonym syn ON syn.oid=dep.refobjid
-LEFT JOIN pg_namespace synns ON syn.synnamespace=synns.oid
+FROM pg_catalog.pg_depend dep
+LEFT JOIN pg_catalog.pg_class cl ON dep.refobjid=cl.oid
+LEFT JOIN pg_catalog.pg_attribute att ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
+LEFT JOIN pg_catalog.pg_namespace nsc ON cl.relnamespace=nsc.oid
+LEFT JOIN pg_catalog.pg_proc pr ON dep.refobjid=pr.oid
+LEFT JOIN pg_catalog.pg_namespace nsp ON pr.pronamespace=nsp.oid
+LEFT JOIN pg_catalog.pg_trigger tg ON dep.refobjid=tg.oid
+LEFT JOIN pg_catalog.pg_type ty ON dep.refobjid=ty.oid
+LEFT JOIN pg_catalog.pg_namespace nst ON ty.typnamespace=nst.oid
+LEFT JOIN pg_catalog.pg_constraint co ON dep.refobjid=co.oid
+LEFT JOIN pg_catalog.pg_class coc ON co.conrelid=coc.oid
+LEFT JOIN pg_catalog.pg_namespace nso ON co.connamespace=nso.oid
+LEFT JOIN pg_catalog.pg_rewrite rw ON dep.refobjid=rw.oid
+LEFT JOIN pg_catalog.pg_class clrw ON clrw.oid=rw.ev_class
+LEFT JOIN pg_catalog.pg_namespace nsrw ON clrw.relnamespace=nsrw.oid
+LEFT JOIN pg_catalog.pg_language la ON dep.refobjid=la.oid
+LEFT JOIN pg_catalog.pg_namespace ns ON dep.refobjid=ns.oid
+LEFT JOIN pg_catalog.pg_attrdef ad ON ad.adrelid=att.attrelid AND ad.adnum=att.attnum
+LEFT JOIN pg_catalog.pg_foreign_server fs ON fs.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_foreign_data_wrapper fdw ON fdw.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_type prtyp ON prtyp.oid = pr.prorettype
+LEFT JOIN pg_catalog.pg_inherits inhits ON (inhits.inhrelid=dep.refobjid)
+LEFT JOIN pg_catalog.pg_inherits inhed ON (inhed.inhparent=dep.refobjid)
+LEFT JOIN pg_catalog.pg_collation col ON col.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace colns ON col.collnamespace=colns.oid
+LEFT JOIN pg_catalog.pg_ts_config ftsc ON ftsc.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace ftscns ON ftsc.cfgnamespace=ftscns.oid
+LEFT JOIN pg_catalog.pg_ts_dict ftsd ON ftsd.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace ftsdns ON ftsd.dictnamespace=ftsdns.oid
+LEFT JOIN pg_catalog.pg_ts_parser ftsp ON ftsp.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace ftspns ON ftsp.prsnamespace=ftspns.oid
+LEFT JOIN pg_catalog.pg_ts_template ftst ON ftst.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace ftstns ON ftst.tmplnamespace=ftstns.oid
+LEFT JOIN pg_catalog.pg_extension ext ON ext.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_synonym syn ON syn.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace synns ON syn.synnamespace=synns.oid
 {{where_clause}} AND
-refclassid IN ( SELECT oid FROM pg_class WHERE relname IN
+refclassid IN ( SELECT oid FROM pg_catalog.pg_class WHERE relname IN
    ('pg_class', 'pg_constraint', 'pg_conversion', 'pg_language', 'pg_proc', 'pg_rewrite', 'pg_namespace',
    'pg_trigger', 'pg_type', 'pg_attrdef', 'pg_foreign_server', 'pg_foreign_data_wrapper',
    'pg_collation', 'pg_ts_config', 'pg_ts_dict', 'pg_ts_parser', 'pg_ts_template', 'pg_extension',
@@ -80,10 +80,10 @@ SELECT DISTINCT dep.deptype, dep.refclassid, dep.refobjid, cl.relkind, ad.adbin,
 	CASE WHEN cl.relname IS NOT NULL OR att.attname IS NOT NULL THEN cl.relname || COALESCE('.' || att.attname, '')
     ELSE cl.relname END AS refname,
     nsc.nspname AS nspname, '0' AS is_inherits, '0' AS is_inherited
-FROM pg_depend dep
-LEFT JOIN pg_class cl ON dep.refobjid=cl.oid
-LEFT JOIN pg_attribute att ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
-LEFT JOIN pg_namespace nsc ON cl.relnamespace=nsc.oid
-LEFT JOIN pg_attrdef ad ON ad.adrelid=att.attrelid AND ad.adnum=att.attnum
-WHERE dep.objid IN (SELECT oid FROM pg_rewrite WHERE ev_class={{object_id}}) AND cl.relkind not in ('v', 'm')
+FROM pg_catalog.pg_depend dep
+LEFT JOIN pg_catalog.pg_class cl ON dep.refobjid=cl.oid
+LEFT JOIN pg_catalog.pg_attribute att ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
+LEFT JOIN pg_catalog.pg_namespace nsc ON cl.relnamespace=nsc.oid
+LEFT JOIN pg_catalog.pg_attrdef ad ON ad.adrelid=att.attrelid AND ad.adnum=att.attnum
+WHERE dep.objid IN (SELECT oid FROM pg_catalog.pg_rewrite WHERE ev_class={{object_id}}) AND cl.relkind not in ('v', 'm')
 ORDER BY refclassid, relkind
diff --git a/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/9.1_plus/dependents.sql b/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/9.1_plus/dependents.sql
index 8845979e5..b6f9d0525 100644
--- a/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/9.1_plus/dependents.sql
+++ b/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/9.1_plus/dependents.sql
@@ -30,44 +30,44 @@ SELECT DISTINCT dep.deptype, dep.classid, cl.relkind, ad.adbin, ad.adsrc,
         ftsdns.nspname, ftspns.nspname, ftstns.nspname, synns.nspname) AS nspname,
     CASE WHEN inhits.inhparent IS NOT NULL THEN '1' ELSE '0' END AS is_inherits,
     CASE WHEN inhed.inhparent IS NOT NULL THEN '1' ELSE '0' END AS is_inherited
-FROM pg_depend dep
-LEFT JOIN pg_class cl ON dep.objid=cl.oid
-LEFT JOIN pg_attribute att ON dep.objid=att.attrelid AND dep.objsubid=att.attnum
-LEFT JOIN pg_namespace nsc ON cl.relnamespace=nsc.oid
-LEFT JOIN pg_proc pr ON dep.objid=pr.oid
-LEFT JOIN pg_namespace nsp ON pr.pronamespace=nsp.oid
-LEFT JOIN pg_trigger tg ON dep.objid=tg.oid
-LEFT JOIN pg_type ty ON dep.objid=ty.oid
-LEFT JOIN pg_namespace nst ON ty.typnamespace=nst.oid
-LEFT JOIN pg_constraint co ON dep.objid=co.oid
-LEFT JOIN pg_class coc ON co.conrelid=coc.oid
-LEFT JOIN pg_namespace nso ON co.connamespace=nso.oid
-LEFT JOIN pg_rewrite rw ON dep.objid=rw.oid
-LEFT JOIN pg_class clrw ON clrw.oid=rw.ev_class
-LEFT JOIN pg_namespace nsrw ON clrw.relnamespace=nsrw.oid
-LEFT JOIN pg_language la ON dep.objid=la.oid
-LEFT JOIN pg_namespace ns ON dep.objid=ns.oid
-LEFT JOIN pg_attrdef ad ON ad.oid=dep.objid
-LEFT JOIN pg_foreign_server fs ON fs.oid=dep.objid
-LEFT JOIN pg_foreign_data_wrapper fdw ON fdw.oid=dep.objid
-LEFT JOIN pg_type prtyp ON prtyp.oid = pr.prorettype
-LEFT JOIN pg_inherits inhits ON (inhits.inhrelid=dep.objid)
-LEFT JOIN pg_inherits inhed ON (inhed.inhparent=dep.objid)
-LEFT JOIN pg_collation col ON col.oid=dep.objid
-LEFT JOIN pg_namespace colns ON col.collnamespace=colns.oid
-LEFT JOIN pg_ts_config ftsc ON ftsc.oid=dep.objid
-LEFT JOIN pg_namespace ftscns ON ftsc.cfgnamespace=ftscns.oid
-LEFT JOIN pg_ts_dict ftsd ON ftsd.oid=dep.objid
-LEFT JOIN pg_namespace ftsdns ON ftsd.dictnamespace=ftsdns.oid
-LEFT JOIN pg_ts_parser ftsp ON ftsp.oid=dep.objid
-LEFT JOIN pg_namespace ftspns ON ftsp.prsnamespace=ftspns.oid
-LEFT JOIN pg_ts_template ftst ON ftst.oid=dep.objid
-LEFT JOIN pg_namespace ftstns ON ftst.tmplnamespace=ftstns.oid
-LEFT JOIN pg_extension ext ON ext.oid=dep.objid
-LEFT JOIN pg_synonym syn ON syn.oid=dep.objid
-LEFT JOIN pg_namespace synns ON syn.synnamespace=synns.oid
+FROM pg_catalog.pg_depend dep
+LEFT JOIN pg_catalog.pg_class cl ON dep.objid=cl.oid
+LEFT JOIN pg_catalog.pg_attribute att ON dep.objid=att.attrelid AND dep.objsubid=att.attnum
+LEFT JOIN pg_catalog.pg_namespace nsc ON cl.relnamespace=nsc.oid
+LEFT JOIN pg_catalog.pg_proc pr ON dep.objid=pr.oid
+LEFT JOIN pg_catalog.pg_namespace nsp ON pr.pronamespace=nsp.oid
+LEFT JOIN pg_catalog.pg_trigger tg ON dep.objid=tg.oid
+LEFT JOIN pg_catalog.pg_type ty ON dep.objid=ty.oid
+LEFT JOIN pg_catalog.pg_namespace nst ON ty.typnamespace=nst.oid
+LEFT JOIN pg_catalog.pg_constraint co ON dep.objid=co.oid
+LEFT JOIN pg_catalog.pg_class coc ON co.conrelid=coc.oid
+LEFT JOIN pg_catalog.pg_namespace nso ON co.connamespace=nso.oid
+LEFT JOIN pg_catalog.pg_rewrite rw ON dep.objid=rw.oid
+LEFT JOIN pg_catalog.pg_class clrw ON clrw.oid=rw.ev_class
+LEFT JOIN pg_catalog.pg_namespace nsrw ON clrw.relnamespace=nsrw.oid
+LEFT JOIN pg_catalog.pg_language la ON dep.objid=la.oid
+LEFT JOIN pg_catalog.pg_namespace ns ON dep.objid=ns.oid
+LEFT JOIN pg_catalog.pg_attrdef ad ON ad.oid=dep.objid
+LEFT JOIN pg_catalog.pg_foreign_server fs ON fs.oid=dep.objid
+LEFT JOIN pg_catalog.pg_foreign_data_wrapper fdw ON fdw.oid=dep.objid
+LEFT JOIN pg_catalog.pg_type prtyp ON prtyp.oid = pr.prorettype
+LEFT JOIN pg_catalog.pg_inherits inhits ON (inhits.inhrelid=dep.objid)
+LEFT JOIN pg_catalog.pg_inherits inhed ON (inhed.inhparent=dep.objid)
+LEFT JOIN pg_catalog.pg_collation col ON col.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace colns ON col.collnamespace=colns.oid
+LEFT JOIN pg_catalog.pg_ts_config ftsc ON ftsc.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftscns ON ftsc.cfgnamespace=ftscns.oid
+LEFT JOIN pg_catalog.pg_ts_dict ftsd ON ftsd.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftsdns ON ftsd.dictnamespace=ftsdns.oid
+LEFT JOIN pg_catalog.pg_ts_parser ftsp ON ftsp.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftspns ON ftsp.prsnamespace=ftspns.oid
+LEFT JOIN pg_catalog.pg_ts_template ftst ON ftst.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftstns ON ftst.tmplnamespace=ftstns.oid
+LEFT JOIN pg_catalog.pg_extension ext ON ext.oid=dep.objid
+LEFT JOIN pg_catalog.pg_synonym syn ON syn.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace synns ON syn.synnamespace=synns.oid
 {{where_clause}} AND
-classid IN ( SELECT oid FROM pg_class WHERE relname IN
+classid IN ( SELECT oid FROM pg_catalog.pg_class WHERE relname IN
    ('pg_class', 'pg_constraint', 'pg_conversion', 'pg_language', 'pg_proc', 'pg_rewrite', 'pg_namespace',
    'pg_trigger', 'pg_type', 'pg_attrdef', 'pg_foreign_server', 'pg_foreign_data_wrapper',
    'pg_collation', 'pg_ts_config', 'pg_ts_dict', 'pg_ts_parser', 'pg_ts_template', 'pg_extension',
diff --git a/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/9.1_plus/role_dependencies.sql b/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/9.1_plus/role_dependencies.sql
index bd225e39f..65e25e26e 100644
--- a/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/9.1_plus/role_dependencies.sql
+++ b/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/9.1_plus/role_dependencies.sql
@@ -1,8 +1,8 @@
 SELECT rolname AS refname, refclassid, deptype
-FROM pg_shdepend dep
-LEFT JOIN pg_roles r ON refclassid=1260 AND refobjid=r.oid
+FROM pg_catalog.pg_shdepend dep
+LEFT JOIN pg_catalog.pg_roles r ON refclassid=1260 AND refobjid=r.oid
 {{where_clause}}
 {% if db_name %}
- AND dep.dbid = (SELECT oid FROM pg_database WHERE datname = {{ db_name|qtLiteral }})
+ AND dep.dbid = (SELECT oid FROM pg_catalog.pg_database WHERE datname = {{ db_name|qtLiteral }})
 {% endif %}
 ORDER BY 1
diff --git a/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/9.3_plus/dependencies.sql b/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/9.3_plus/dependencies.sql
index c453d9c67..00a5b0e0d 100644
--- a/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/9.3_plus/dependencies.sql
+++ b/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/9.3_plus/dependencies.sql
@@ -31,45 +31,45 @@ SELECT DISTINCT dep.deptype, dep.refclassid, dep.refobjid, cl.relkind, ad.adbin,
         ftsdns.nspname, ftspns.nspname, ftstns.nspname, synns.nspname) AS nspname,
     CASE WHEN inhits.inhparent IS NOT NULL THEN '1' ELSE '0' END AS is_inherits,
     CASE WHEN inhed.inhparent IS NOT NULL THEN '1' ELSE '0' END AS is_inherited
-FROM pg_depend dep
-LEFT JOIN pg_class cl ON dep.refobjid=cl.oid
-LEFT JOIN pg_attribute att ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
-LEFT JOIN pg_namespace nsc ON cl.relnamespace=nsc.oid
-LEFT JOIN pg_proc pr ON dep.refobjid=pr.oid
-LEFT JOIN pg_namespace nsp ON pr.pronamespace=nsp.oid
-LEFT JOIN pg_trigger tg ON dep.refobjid=tg.oid
-LEFT JOIN pg_type ty ON dep.refobjid=ty.oid
-LEFT JOIN pg_namespace nst ON ty.typnamespace=nst.oid
-LEFT JOIN pg_constraint co ON dep.refobjid=co.oid
-LEFT JOIN pg_class coc ON co.conrelid=coc.oid
-LEFT JOIN pg_namespace nso ON co.connamespace=nso.oid
-LEFT JOIN pg_rewrite rw ON dep.refobjid=rw.oid
-LEFT JOIN pg_class clrw ON clrw.oid=rw.ev_class
-LEFT JOIN pg_namespace nsrw ON clrw.relnamespace=nsrw.oid
-LEFT JOIN pg_language la ON dep.refobjid=la.oid
-LEFT JOIN pg_namespace ns ON dep.refobjid=ns.oid
-LEFT JOIN pg_attrdef ad ON ad.adrelid=att.attrelid AND ad.adnum=att.attnum
-LEFT JOIN pg_foreign_server fs ON fs.oid=dep.refobjid
-LEFT JOIN pg_foreign_data_wrapper fdw ON fdw.oid=dep.refobjid
-LEFT JOIN pg_type prtyp ON prtyp.oid = pr.prorettype
-LEFT JOIN pg_inherits inhits ON (inhits.inhrelid=dep.refobjid)
-LEFT JOIN pg_inherits inhed ON (inhed.inhparent=dep.refobjid)
-LEFT JOIN pg_event_trigger evt ON evt.oid=dep.refobjid
-LEFT JOIN pg_collation col ON col.oid=dep.refobjid
-LEFT JOIN pg_namespace colns ON col.collnamespace=colns.oid
-LEFT JOIN pg_ts_config ftsc ON ftsc.oid=dep.refobjid
-LEFT JOIN pg_namespace ftscns ON ftsc.cfgnamespace=ftscns.oid
-LEFT JOIN pg_ts_dict ftsd ON ftsd.oid=dep.refobjid
-LEFT JOIN pg_namespace ftsdns ON ftsd.dictnamespace=ftsdns.oid
-LEFT JOIN pg_ts_parser ftsp ON ftsp.oid=dep.refobjid
-LEFT JOIN pg_namespace ftspns ON ftsp.prsnamespace=ftspns.oid
-LEFT JOIN pg_ts_template ftst ON ftst.oid=dep.refobjid
-LEFT JOIN pg_namespace ftstns ON ftst.tmplnamespace=ftstns.oid
-LEFT JOIN pg_extension ext ON ext.oid=dep.refobjid
-LEFT JOIN pg_synonym syn ON syn.oid=dep.refobjid
-LEFT JOIN pg_namespace synns ON syn.synnamespace=synns.oid
+FROM pg_catalog.pg_depend dep
+LEFT JOIN pg_catalog.pg_class cl ON dep.refobjid=cl.oid
+LEFT JOIN pg_catalog.pg_attribute att ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
+LEFT JOIN pg_catalog.pg_namespace nsc ON cl.relnamespace=nsc.oid
+LEFT JOIN pg_catalog.pg_proc pr ON dep.refobjid=pr.oid
+LEFT JOIN pg_catalog.pg_namespace nsp ON pr.pronamespace=nsp.oid
+LEFT JOIN pg_catalog.pg_trigger tg ON dep.refobjid=tg.oid
+LEFT JOIN pg_catalog.pg_type ty ON dep.refobjid=ty.oid
+LEFT JOIN pg_catalog.pg_namespace nst ON ty.typnamespace=nst.oid
+LEFT JOIN pg_catalog.pg_constraint co ON dep.refobjid=co.oid
+LEFT JOIN pg_catalog.pg_class coc ON co.conrelid=coc.oid
+LEFT JOIN pg_catalog.pg_namespace nso ON co.connamespace=nso.oid
+LEFT JOIN pg_catalog.pg_rewrite rw ON dep.refobjid=rw.oid
+LEFT JOIN pg_catalog.pg_class clrw ON clrw.oid=rw.ev_class
+LEFT JOIN pg_catalog.pg_namespace nsrw ON clrw.relnamespace=nsrw.oid
+LEFT JOIN pg_catalog.pg_language la ON dep.refobjid=la.oid
+LEFT JOIN pg_catalog.pg_namespace ns ON dep.refobjid=ns.oid
+LEFT JOIN pg_catalog.pg_attrdef ad ON ad.adrelid=att.attrelid AND ad.adnum=att.attnum
+LEFT JOIN pg_catalog.pg_foreign_server fs ON fs.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_foreign_data_wrapper fdw ON fdw.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_type prtyp ON prtyp.oid = pr.prorettype
+LEFT JOIN pg_catalog.pg_inherits inhits ON (inhits.inhrelid=dep.refobjid)
+LEFT JOIN pg_catalog.pg_inherits inhed ON (inhed.inhparent=dep.refobjid)
+LEFT JOIN pg_catalog.pg_event_trigger evt ON evt.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_collation col ON col.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace colns ON col.collnamespace=colns.oid
+LEFT JOIN pg_catalog.pg_ts_config ftsc ON ftsc.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace ftscns ON ftsc.cfgnamespace=ftscns.oid
+LEFT JOIN pg_catalog.pg_ts_dict ftsd ON ftsd.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace ftsdns ON ftsd.dictnamespace=ftsdns.oid
+LEFT JOIN pg_catalog.pg_ts_parser ftsp ON ftsp.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace ftspns ON ftsp.prsnamespace=ftspns.oid
+LEFT JOIN pg_catalog.pg_ts_template ftst ON ftst.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace ftstns ON ftst.tmplnamespace=ftstns.oid
+LEFT JOIN pg_catalog.pg_extension ext ON ext.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_synonym syn ON syn.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace synns ON syn.synnamespace=synns.oid
 {{where_clause}} AND
-refclassid IN ( SELECT oid FROM pg_class WHERE relname IN
+refclassid IN ( SELECT oid FROM pg_catalog.pg_class WHERE relname IN
    ('pg_class', 'pg_constraint', 'pg_conversion', 'pg_language', 'pg_proc', 'pg_rewrite', 'pg_namespace',
    'pg_trigger', 'pg_type', 'pg_attrdef', 'pg_event_trigger', 'pg_foreign_server', 'pg_foreign_data_wrapper',
    'pg_collation', 'pg_ts_config', 'pg_ts_dict', 'pg_ts_parser', 'pg_ts_template', 'pg_extension',
@@ -82,10 +82,10 @@ SELECT DISTINCT dep.deptype, dep.refclassid, dep.refobjid, cl.relkind, ad.adbin,
 	CASE WHEN cl.relname IS NOT NULL OR att.attname IS NOT NULL THEN cl.relname || COALESCE('.' || att.attname, '')
     ELSE cl.relname END AS refname,
     nsc.nspname AS nspname, '0' AS is_inherits, '0' AS is_inherited
-FROM pg_depend dep
-LEFT JOIN pg_class cl ON dep.refobjid=cl.oid
-LEFT JOIN pg_attribute att ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
-LEFT JOIN pg_namespace nsc ON cl.relnamespace=nsc.oid
-LEFT JOIN pg_attrdef ad ON ad.adrelid=att.attrelid AND ad.adnum=att.attnum
-WHERE dep.objid IN (SELECT oid FROM pg_rewrite WHERE ev_class={{object_id}}) AND cl.relkind not in ('v', 'm')
+FROM pg_catalog.pg_depend dep
+LEFT JOIN pg_catalog.pg_class cl ON dep.refobjid=cl.oid
+LEFT JOIN pg_catalog.pg_attribute att ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
+LEFT JOIN pg_catalog.pg_namespace nsc ON cl.relnamespace=nsc.oid
+LEFT JOIN pg_catalog.pg_attrdef ad ON ad.adrelid=att.attrelid AND ad.adnum=att.attnum
+WHERE dep.objid IN (SELECT oid FROM pg_catalog.pg_rewrite WHERE ev_class={{object_id}}) AND cl.relkind not in ('v', 'm')
 ORDER BY refclassid, relkind
diff --git a/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/9.3_plus/dependents.sql b/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/9.3_plus/dependents.sql
index 97f299e0f..17e05741e 100644
--- a/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/9.3_plus/dependents.sql
+++ b/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/9.3_plus/dependents.sql
@@ -31,45 +31,45 @@ SELECT DISTINCT dep.deptype, dep.classid, cl.relkind, ad.adbin, ad.adsrc,
         ftsdns.nspname, ftspns.nspname, ftstns.nspname, synns.nspname) AS nspname,
     CASE WHEN inhits.inhparent IS NOT NULL THEN '1' ELSE '0' END AS is_inherits,
     CASE WHEN inhed.inhparent IS NOT NULL THEN '1' ELSE '0' END AS is_inherited
-FROM pg_depend dep
-LEFT JOIN pg_class cl ON dep.objid=cl.oid
-LEFT JOIN pg_attribute att ON dep.objid=att.attrelid AND dep.objsubid=att.attnum
-LEFT JOIN pg_namespace nsc ON cl.relnamespace=nsc.oid
-LEFT JOIN pg_proc pr ON dep.objid=pr.oid
-LEFT JOIN pg_namespace nsp ON pr.pronamespace=nsp.oid
-LEFT JOIN pg_trigger tg ON dep.objid=tg.oid
-LEFT JOIN pg_type ty ON dep.objid=ty.oid
-LEFT JOIN pg_namespace nst ON ty.typnamespace=nst.oid
-LEFT JOIN pg_constraint co ON dep.objid=co.oid
-LEFT JOIN pg_class coc ON co.conrelid=coc.oid
-LEFT JOIN pg_namespace nso ON co.connamespace=nso.oid
-LEFT JOIN pg_rewrite rw ON dep.objid=rw.oid
-LEFT JOIN pg_class clrw ON clrw.oid=rw.ev_class
-LEFT JOIN pg_namespace nsrw ON clrw.relnamespace=nsrw.oid
-LEFT JOIN pg_language la ON dep.objid=la.oid
-LEFT JOIN pg_namespace ns ON dep.objid=ns.oid
-LEFT JOIN pg_attrdef ad ON ad.oid=dep.objid
-LEFT JOIN pg_foreign_server fs ON fs.oid=dep.objid
-LEFT JOIN pg_foreign_data_wrapper fdw ON fdw.oid=dep.objid
-LEFT JOIN pg_type prtyp ON prtyp.oid = pr.prorettype
-LEFT JOIN pg_inherits inhits ON (inhits.inhrelid=dep.objid)
-LEFT JOIN pg_inherits inhed ON (inhed.inhparent=dep.objid)
-LEFT JOIN pg_event_trigger evt ON evt.oid=dep.objid
-LEFT JOIN pg_collation col ON col.oid=dep.objid
-LEFT JOIN pg_namespace colns ON col.collnamespace=colns.oid
-LEFT JOIN pg_ts_config ftsc ON ftsc.oid=dep.objid
-LEFT JOIN pg_namespace ftscns ON ftsc.cfgnamespace=ftscns.oid
-LEFT JOIN pg_ts_dict ftsd ON ftsd.oid=dep.objid
-LEFT JOIN pg_namespace ftsdns ON ftsd.dictnamespace=ftsdns.oid
-LEFT JOIN pg_ts_parser ftsp ON ftsp.oid=dep.objid
-LEFT JOIN pg_namespace ftspns ON ftsp.prsnamespace=ftspns.oid
-LEFT JOIN pg_ts_template ftst ON ftst.oid=dep.objid
-LEFT JOIN pg_namespace ftstns ON ftst.tmplnamespace=ftstns.oid
-LEFT JOIN pg_extension ext ON ext.oid=dep.objid
-LEFT JOIN pg_synonym syn ON syn.oid=dep.objid
-LEFT JOIN pg_namespace synns ON syn.synnamespace=synns.oid
+FROM pg_catalog.pg_depend dep
+LEFT JOIN pg_catalog.pg_class cl ON dep.objid=cl.oid
+LEFT JOIN pg_catalog.pg_attribute att ON dep.objid=att.attrelid AND dep.objsubid=att.attnum
+LEFT JOIN pg_catalog.pg_namespace nsc ON cl.relnamespace=nsc.oid
+LEFT JOIN pg_catalog.pg_proc pr ON dep.objid=pr.oid
+LEFT JOIN pg_catalog.pg_namespace nsp ON pr.pronamespace=nsp.oid
+LEFT JOIN pg_catalog.pg_trigger tg ON dep.objid=tg.oid
+LEFT JOIN pg_catalog.pg_type ty ON dep.objid=ty.oid
+LEFT JOIN pg_catalog.pg_namespace nst ON ty.typnamespace=nst.oid
+LEFT JOIN pg_catalog.pg_constraint co ON dep.objid=co.oid
+LEFT JOIN pg_catalog.pg_class coc ON co.conrelid=coc.oid
+LEFT JOIN pg_catalog.pg_namespace nso ON co.connamespace=nso.oid
+LEFT JOIN pg_catalog.pg_rewrite rw ON dep.objid=rw.oid
+LEFT JOIN pg_catalog.pg_class clrw ON clrw.oid=rw.ev_class
+LEFT JOIN pg_catalog.pg_namespace nsrw ON clrw.relnamespace=nsrw.oid
+LEFT JOIN pg_catalog.pg_language la ON dep.objid=la.oid
+LEFT JOIN pg_catalog.pg_namespace ns ON dep.objid=ns.oid
+LEFT JOIN pg_catalog.pg_attrdef ad ON ad.oid=dep.objid
+LEFT JOIN pg_catalog.pg_foreign_server fs ON fs.oid=dep.objid
+LEFT JOIN pg_catalog.pg_foreign_data_wrapper fdw ON fdw.oid=dep.objid
+LEFT JOIN pg_catalog.pg_type prtyp ON prtyp.oid = pr.prorettype
+LEFT JOIN pg_catalog.pg_inherits inhits ON (inhits.inhrelid=dep.objid)
+LEFT JOIN pg_catalog.pg_inherits inhed ON (inhed.inhparent=dep.objid)
+LEFT JOIN pg_catalog.pg_event_trigger evt ON evt.oid=dep.objid
+LEFT JOIN pg_catalog.pg_collation col ON col.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace colns ON col.collnamespace=colns.oid
+LEFT JOIN pg_catalog.pg_ts_config ftsc ON ftsc.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftscns ON ftsc.cfgnamespace=ftscns.oid
+LEFT JOIN pg_catalog.pg_ts_dict ftsd ON ftsd.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftsdns ON ftsd.dictnamespace=ftsdns.oid
+LEFT JOIN pg_catalog.pg_ts_parser ftsp ON ftsp.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftspns ON ftsp.prsnamespace=ftspns.oid
+LEFT JOIN pg_catalog.pg_ts_template ftst ON ftst.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftstns ON ftst.tmplnamespace=ftstns.oid
+LEFT JOIN pg_catalog.pg_extension ext ON ext.oid=dep.objid
+LEFT JOIN pg_catalog.pg_synonym syn ON syn.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace synns ON syn.synnamespace=synns.oid
 {{where_clause}} AND
-classid IN ( SELECT oid FROM pg_class WHERE relname IN
+classid IN ( SELECT oid FROM pg_catalog.pg_class WHERE relname IN
    ('pg_class', 'pg_constraint', 'pg_conversion', 'pg_language', 'pg_proc', 'pg_rewrite', 'pg_namespace',
    'pg_trigger', 'pg_type', 'pg_attrdef', 'pg_event_trigger', 'pg_foreign_server', 'pg_foreign_data_wrapper',
    'pg_collation', 'pg_ts_config', 'pg_ts_dict', 'pg_ts_parser', 'pg_ts_template', 'pg_extension',
diff --git a/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/9.5_plus/dependencies.sql b/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/9.5_plus/dependencies.sql
index e3291218b..0360988e7 100644
--- a/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/9.5_plus/dependencies.sql
+++ b/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/9.5_plus/dependencies.sql
@@ -32,46 +32,46 @@ SELECT DISTINCT dep.deptype, dep.refclassid, dep.refobjid, cl.relkind, ad.adbin,
         ftsdns.nspname, ftspns.nspname, ftstns.nspname, synns.nspname) AS nspname,
     CASE WHEN inhits.inhparent IS NOT NULL THEN '1' ELSE '0' END AS is_inherits,
     CASE WHEN inhed.inhparent IS NOT NULL THEN '1' ELSE '0' END AS is_inherited
-FROM pg_depend dep
-LEFT JOIN pg_class cl ON dep.refobjid=cl.oid
-LEFT JOIN pg_attribute att ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
-LEFT JOIN pg_namespace nsc ON cl.relnamespace=nsc.oid
-LEFT JOIN pg_proc pr ON dep.refobjid=pr.oid
-LEFT JOIN pg_namespace nsp ON pr.pronamespace=nsp.oid
-LEFT JOIN pg_trigger tg ON dep.refobjid=tg.oid
-LEFT JOIN pg_type ty ON dep.refobjid=ty.oid
-LEFT JOIN pg_namespace nst ON ty.typnamespace=nst.oid
-LEFT JOIN pg_constraint co ON dep.refobjid=co.oid
-LEFT JOIN pg_class coc ON co.conrelid=coc.oid
-LEFT JOIN pg_namespace nso ON co.connamespace=nso.oid
-LEFT JOIN pg_rewrite rw ON dep.refobjid=rw.oid
-LEFT JOIN pg_class clrw ON clrw.oid=rw.ev_class
-LEFT JOIN pg_namespace nsrw ON clrw.relnamespace=nsrw.oid
-LEFT JOIN pg_language la ON dep.refobjid=la.oid
-LEFT JOIN pg_namespace ns ON dep.refobjid=ns.oid
-LEFT JOIN pg_attrdef ad ON ad.adrelid=att.attrelid AND ad.adnum=att.attnum
-LEFT JOIN pg_foreign_server fs ON fs.oid=dep.refobjid
-LEFT JOIN pg_foreign_data_wrapper fdw ON fdw.oid=dep.refobjid
-LEFT JOIN pg_type prtyp ON prtyp.oid = pr.prorettype
-LEFT JOIN pg_inherits inhits ON (inhits.inhrelid=dep.refobjid)
-LEFT JOIN pg_inherits inhed ON (inhed.inhparent=dep.refobjid)
-LEFT JOIN pg_event_trigger evt ON evt.oid=dep.refobjid
-LEFT JOIN pg_collation col ON col.oid=dep.refobjid
-LEFT JOIN pg_namespace colns ON col.collnamespace=colns.oid
-LEFT JOIN pg_ts_config ftsc ON ftsc.oid=dep.refobjid
-LEFT JOIN pg_namespace ftscns ON ftsc.cfgnamespace=ftscns.oid
-LEFT JOIN pg_ts_dict ftsd ON ftsd.oid=dep.refobjid
-LEFT JOIN pg_namespace ftsdns ON ftsd.dictnamespace=ftsdns.oid
-LEFT JOIN pg_ts_parser ftsp ON ftsp.oid=dep.refobjid
-LEFT JOIN pg_namespace ftspns ON ftsp.prsnamespace=ftspns.oid
-LEFT JOIN pg_ts_template ftst ON ftst.oid=dep.refobjid
-LEFT JOIN pg_namespace ftstns ON ftst.tmplnamespace=ftstns.oid
-LEFT JOIN pg_extension ext ON ext.oid=dep.refobjid
-LEFT JOIN pg_synonym syn ON syn.oid=dep.refobjid
-LEFT JOIN pg_namespace synns ON syn.synnamespace=synns.oid
-LEFT JOIN pg_policy pl ON pl.oid=dep.refobjid
+FROM pg_catalog.pg_depend dep
+LEFT JOIN pg_catalog.pg_class cl ON dep.refobjid=cl.oid
+LEFT JOIN pg_catalog.pg_attribute att ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
+LEFT JOIN pg_catalog.pg_namespace nsc ON cl.relnamespace=nsc.oid
+LEFT JOIN pg_catalog.pg_proc pr ON dep.refobjid=pr.oid
+LEFT JOIN pg_catalog.pg_namespace nsp ON pr.pronamespace=nsp.oid
+LEFT JOIN pg_catalog.pg_trigger tg ON dep.refobjid=tg.oid
+LEFT JOIN pg_catalog.pg_type ty ON dep.refobjid=ty.oid
+LEFT JOIN pg_catalog.pg_namespace nst ON ty.typnamespace=nst.oid
+LEFT JOIN pg_catalog.pg_constraint co ON dep.refobjid=co.oid
+LEFT JOIN pg_catalog.pg_class coc ON co.conrelid=coc.oid
+LEFT JOIN pg_catalog.pg_namespace nso ON co.connamespace=nso.oid
+LEFT JOIN pg_catalog.pg_rewrite rw ON dep.refobjid=rw.oid
+LEFT JOIN pg_catalog.pg_class clrw ON clrw.oid=rw.ev_class
+LEFT JOIN pg_catalog.pg_namespace nsrw ON clrw.relnamespace=nsrw.oid
+LEFT JOIN pg_catalog.pg_language la ON dep.refobjid=la.oid
+LEFT JOIN pg_catalog.pg_namespace ns ON dep.refobjid=ns.oid
+LEFT JOIN pg_catalog.pg_attrdef ad ON ad.adrelid=att.attrelid AND ad.adnum=att.attnum
+LEFT JOIN pg_catalog.pg_foreign_server fs ON fs.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_foreign_data_wrapper fdw ON fdw.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_type prtyp ON prtyp.oid = pr.prorettype
+LEFT JOIN pg_catalog.pg_inherits inhits ON (inhits.inhrelid=dep.refobjid)
+LEFT JOIN pg_catalog.pg_inherits inhed ON (inhed.inhparent=dep.refobjid)
+LEFT JOIN pg_catalog.pg_event_trigger evt ON evt.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_collation col ON col.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace colns ON col.collnamespace=colns.oid
+LEFT JOIN pg_catalog.pg_ts_config ftsc ON ftsc.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace ftscns ON ftsc.cfgnamespace=ftscns.oid
+LEFT JOIN pg_catalog.pg_ts_dict ftsd ON ftsd.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace ftsdns ON ftsd.dictnamespace=ftsdns.oid
+LEFT JOIN pg_catalog.pg_ts_parser ftsp ON ftsp.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace ftspns ON ftsp.prsnamespace=ftspns.oid
+LEFT JOIN pg_catalog.pg_ts_template ftst ON ftst.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace ftstns ON ftst.tmplnamespace=ftstns.oid
+LEFT JOIN pg_catalog.pg_extension ext ON ext.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_synonym syn ON syn.oid=dep.refobjid
+LEFT JOIN pg_catalog.pg_namespace synns ON syn.synnamespace=synns.oid
+LEFT JOIN pg_catalog.pg_policy pl ON pl.oid=dep.refobjid
 {{where_clause}} AND
-refclassid IN ( SELECT oid FROM pg_class WHERE relname IN
+refclassid IN ( SELECT oid FROM pg_catalog.pg_class WHERE relname IN
    ('pg_class', 'pg_constraint', 'pg_conversion', 'pg_language', 'pg_proc', 'pg_rewrite', 'pg_namespace',
    'pg_trigger', 'pg_type', 'pg_attrdef', 'pg_event_trigger', 'pg_foreign_server', 'pg_foreign_data_wrapper',
    'pg_collation', 'pg_ts_config', 'pg_ts_dict', 'pg_ts_parser', 'pg_ts_template', 'pg_extension',
@@ -84,10 +84,10 @@ SELECT DISTINCT dep.deptype, dep.refclassid, dep.refobjid, cl.relkind, ad.adbin,
 	CASE WHEN cl.relname IS NOT NULL OR att.attname IS NOT NULL THEN cl.relname || COALESCE('.' || att.attname, '')
     ELSE cl.relname END AS refname,
     nsc.nspname AS nspname, '0' AS is_inherits, '0' AS is_inherited
-FROM pg_depend dep
-LEFT JOIN pg_class cl ON dep.refobjid=cl.oid
-LEFT JOIN pg_attribute att ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
-LEFT JOIN pg_namespace nsc ON cl.relnamespace=nsc.oid
-LEFT JOIN pg_attrdef ad ON ad.adrelid=att.attrelid AND ad.adnum=att.attnum
-WHERE dep.objid IN (SELECT oid FROM pg_rewrite WHERE ev_class={{object_id}}) AND cl.relkind not in ('v', 'm')
+FROM pg_catalog.pg_depend dep
+LEFT JOIN pg_catalog.pg_class cl ON dep.refobjid=cl.oid
+LEFT JOIN pg_catalog.pg_attribute att ON dep.refobjid=att.attrelid AND dep.refobjsubid=att.attnum
+LEFT JOIN pg_catalog.pg_namespace nsc ON cl.relnamespace=nsc.oid
+LEFT JOIN pg_catalog.pg_attrdef ad ON ad.adrelid=att.attrelid AND ad.adnum=att.attnum
+WHERE dep.objid IN (SELECT oid FROM pg_catalog.pg_rewrite WHERE ev_class={{object_id}}) AND cl.relkind not in ('v', 'm')
 ORDER BY refclassid, relkind
diff --git a/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/9.5_plus/dependents.sql b/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/9.5_plus/dependents.sql
index 0ebf57100..2901d2704 100644
--- a/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/9.5_plus/dependents.sql
+++ b/web/pgadmin/browser/server_groups/servers/templates/depends/ppas/9.5_plus/dependents.sql
@@ -32,46 +32,46 @@ SELECT DISTINCT dep.deptype, dep.classid, cl.relkind, ad.adbin, ad.adsrc,
         ftsdns.nspname, ftspns.nspname, ftstns.nspname, synns.nspname) AS nspname,
     CASE WHEN inhits.inhparent IS NOT NULL THEN '1' ELSE '0' END AS is_inherits,
     CASE WHEN inhed.inhparent IS NOT NULL THEN '1' ELSE '0' END AS is_inherited
-FROM pg_depend dep
-LEFT JOIN pg_class cl ON dep.objid=cl.oid
-LEFT JOIN pg_attribute att ON dep.objid=att.attrelid AND dep.objsubid=att.attnum
-LEFT JOIN pg_namespace nsc ON cl.relnamespace=nsc.oid
-LEFT JOIN pg_proc pr ON dep.objid=pr.oid
-LEFT JOIN pg_namespace nsp ON pr.pronamespace=nsp.oid
-LEFT JOIN pg_trigger tg ON dep.objid=tg.oid
-LEFT JOIN pg_type ty ON dep.objid=ty.oid
-LEFT JOIN pg_namespace nst ON ty.typnamespace=nst.oid
-LEFT JOIN pg_constraint co ON dep.objid=co.oid
-LEFT JOIN pg_class coc ON co.conrelid=coc.oid
-LEFT JOIN pg_namespace nso ON co.connamespace=nso.oid
-LEFT JOIN pg_rewrite rw ON dep.objid=rw.oid
-LEFT JOIN pg_class clrw ON clrw.oid=rw.ev_class
-LEFT JOIN pg_namespace nsrw ON clrw.relnamespace=nsrw.oid
-LEFT JOIN pg_language la ON dep.objid=la.oid
-LEFT JOIN pg_namespace ns ON dep.objid=ns.oid
-LEFT JOIN pg_attrdef ad ON ad.oid=dep.objid
-LEFT JOIN pg_foreign_server fs ON fs.oid=dep.objid
-LEFT JOIN pg_foreign_data_wrapper fdw ON fdw.oid=dep.objid
-LEFT JOIN pg_type prtyp ON prtyp.oid = pr.prorettype
-LEFT JOIN pg_inherits inhits ON (inhits.inhrelid=dep.objid)
-LEFT JOIN pg_inherits inhed ON (inhed.inhparent=dep.objid)
-LEFT JOIN pg_event_trigger evt ON evt.oid=dep.objid
-LEFT JOIN pg_collation col ON col.oid=dep.objid
-LEFT JOIN pg_namespace colns ON col.collnamespace=colns.oid
-LEFT JOIN pg_ts_config ftsc ON ftsc.oid=dep.objid
-LEFT JOIN pg_namespace ftscns ON ftsc.cfgnamespace=ftscns.oid
-LEFT JOIN pg_ts_dict ftsd ON ftsd.oid=dep.objid
-LEFT JOIN pg_namespace ftsdns ON ftsd.dictnamespace=ftsdns.oid
-LEFT JOIN pg_ts_parser ftsp ON ftsp.oid=dep.objid
-LEFT JOIN pg_namespace ftspns ON ftsp.prsnamespace=ftspns.oid
-LEFT JOIN pg_ts_template ftst ON ftst.oid=dep.objid
-LEFT JOIN pg_namespace ftstns ON ftst.tmplnamespace=ftstns.oid
-LEFT JOIN pg_extension ext ON ext.oid=dep.objid
-LEFT JOIN pg_synonym syn ON syn.oid=dep.objid
-LEFT JOIN pg_namespace synns ON syn.synnamespace=synns.oid
-LEFT JOIN pg_policy pl ON pl.oid=dep.objid
+FROM pg_catalog.pg_depend dep
+LEFT JOIN pg_catalog.pg_class cl ON dep.objid=cl.oid
+LEFT JOIN pg_catalog.pg_attribute att ON dep.objid=att.attrelid AND dep.objsubid=att.attnum
+LEFT JOIN pg_catalog.pg_namespace nsc ON cl.relnamespace=nsc.oid
+LEFT JOIN pg_catalog.pg_proc pr ON dep.objid=pr.oid
+LEFT JOIN pg_catalog.pg_namespace nsp ON pr.pronamespace=nsp.oid
+LEFT JOIN pg_catalog.pg_trigger tg ON dep.objid=tg.oid
+LEFT JOIN pg_catalog.pg_type ty ON dep.objid=ty.oid
+LEFT JOIN pg_catalog.pg_namespace nst ON ty.typnamespace=nst.oid
+LEFT JOIN pg_catalog.pg_constraint co ON dep.objid=co.oid
+LEFT JOIN pg_catalog.pg_class coc ON co.conrelid=coc.oid
+LEFT JOIN pg_catalog.pg_namespace nso ON co.connamespace=nso.oid
+LEFT JOIN pg_catalog.pg_rewrite rw ON dep.objid=rw.oid
+LEFT JOIN pg_catalog.pg_class clrw ON clrw.oid=rw.ev_class
+LEFT JOIN pg_catalog.pg_namespace nsrw ON clrw.relnamespace=nsrw.oid
+LEFT JOIN pg_catalog.pg_language la ON dep.objid=la.oid
+LEFT JOIN pg_catalog.pg_namespace ns ON dep.objid=ns.oid
+LEFT JOIN pg_catalog.pg_attrdef ad ON ad.oid=dep.objid
+LEFT JOIN pg_catalog.pg_foreign_server fs ON fs.oid=dep.objid
+LEFT JOIN pg_catalog.pg_foreign_data_wrapper fdw ON fdw.oid=dep.objid
+LEFT JOIN pg_catalog.pg_type prtyp ON prtyp.oid = pr.prorettype
+LEFT JOIN pg_catalog.pg_inherits inhits ON (inhits.inhrelid=dep.objid)
+LEFT JOIN pg_catalog.pg_inherits inhed ON (inhed.inhparent=dep.objid)
+LEFT JOIN pg_catalog.pg_event_trigger evt ON evt.oid=dep.objid
+LEFT JOIN pg_catalog.pg_collation col ON col.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace colns ON col.collnamespace=colns.oid
+LEFT JOIN pg_catalog.pg_ts_config ftsc ON ftsc.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftscns ON ftsc.cfgnamespace=ftscns.oid
+LEFT JOIN pg_catalog.pg_ts_dict ftsd ON ftsd.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftsdns ON ftsd.dictnamespace=ftsdns.oid
+LEFT JOIN pg_catalog.pg_ts_parser ftsp ON ftsp.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftspns ON ftsp.prsnamespace=ftspns.oid
+LEFT JOIN pg_catalog.pg_ts_template ftst ON ftst.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace ftstns ON ftst.tmplnamespace=ftstns.oid
+LEFT JOIN pg_catalog.pg_extension ext ON ext.oid=dep.objid
+LEFT JOIN pg_catalog.pg_synonym syn ON syn.oid=dep.objid
+LEFT JOIN pg_catalog.pg_namespace synns ON syn.synnamespace=synns.oid
+LEFT JOIN pg_catalog.pg_policy pl ON pl.oid=dep.objid
 {{where_clause}} AND
-classid IN ( SELECT oid FROM pg_class WHERE relname IN
+classid IN ( SELECT oid FROM pg_catalog.pg_class WHERE relname IN
    ('pg_class', 'pg_constraint', 'pg_conversion', 'pg_language', 'pg_proc', 'pg_rewrite', 'pg_namespace',
    'pg_trigger', 'pg_type', 'pg_attrdef', 'pg_event_trigger', 'pg_foreign_server', 'pg_foreign_data_wrapper',
    'pg_collation', 'pg_ts_config', 'pg_ts_dict', 'pg_ts_parser', 'pg_ts_template', 'pg_extension',
diff --git a/web/pgadmin/browser/server_groups/servers/templates/servers/sql/10_plus/stats.sql b/web/pgadmin/browser/server_groups/servers/templates/servers/sql/10_plus/stats.sql
index 444b4d2c3..b244ca72c 100644
--- a/web/pgadmin/browser/server_groups/servers/templates/servers/sql/10_plus/stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/templates/servers/sql/10_plus/stats.sql
@@ -20,9 +20,9 @@ SELECT
     query_start AS {{ conn|qtIdent(_('Query start')) }},
     xact_start AS {{ conn|qtIdent(_('Xact start')) }}
 FROM
-    pg_stat_activity sa
+    pg_catalog.pg_stat_activity sa
 WHERE
-    (SELECT r.rolsuper OR r.oid = sa.usesysid  FROM pg_roles r WHERE r.rolname = current_user)
+    (SELECT r.rolsuper OR r.oid = sa.usesysid  FROM pg_catalog.pg_roles r WHERE r.rolname = current_user)
 UNION
 SELECT
     pid AS "PID",
@@ -46,6 +46,6 @@ SELECT
     null AS {{ conn|qtIdent(_('Query start')) }},
     null AS {{ conn|qtIdent(_('Xact start')) }}
 FROM
-    pg_stat_replication sa
+    pg_catalog.pg_stat_replication sa
 WHERE
-    (SELECT r.rolsuper OR r.oid = sa.usesysid  FROM pg_roles r WHERE r.rolname = current_user)
+    (SELECT r.rolsuper OR r.oid = sa.usesysid  FROM pg_catalog.pg_roles r WHERE r.rolname = current_user)
diff --git a/web/pgadmin/browser/server_groups/servers/templates/servers/sql/9.2_plus/stats.sql b/web/pgadmin/browser/server_groups/servers/templates/servers/sql/9.2_plus/stats.sql
index 189db28bb..36ccf1ec6 100644
--- a/web/pgadmin/browser/server_groups/servers/templates/servers/sql/9.2_plus/stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/templates/servers/sql/9.2_plus/stats.sql
@@ -19,9 +19,9 @@ SELECT
     query_start AS {{ conn|qtIdent(_('Query start')) }},
     xact_start AS {{ conn|qtIdent(_('Xact start')) }}
 FROM
-    pg_stat_activity sa
+    pg_catalog.pg_stat_activity sa
 WHERE
-    (SELECT r.rolsuper OR r.oid = sa.usesysid  FROM pg_roles r WHERE r.rolname = current_user)
+    (SELECT r.rolsuper OR r.oid = sa.usesysid  FROM pg_catalog.pg_roles r WHERE r.rolname = current_user)
 UNION
 SELECT
     pid AS "PID",
@@ -44,6 +44,6 @@ SELECT
     null AS {{ conn|qtIdent(_('Query start')) }},
     null AS {{ conn|qtIdent(_('Xact start')) }}
 FROM
-    pg_stat_replication sa
+    pg_catalog.pg_stat_replication sa
 WHERE
-    (SELECT r.rolsuper OR r.oid = sa.usesysid  FROM pg_roles r WHERE r.rolname = current_user)
+    (SELECT r.rolsuper OR r.oid = sa.usesysid  FROM pg_catalog.pg_roles r WHERE r.rolname = current_user)
diff --git a/web/pgadmin/browser/server_groups/servers/templates/servers/sql/9.6_plus/stats.sql b/web/pgadmin/browser/server_groups/servers/templates/servers/sql/9.6_plus/stats.sql
index 99bf2f49d..8dc338fc3 100644
--- a/web/pgadmin/browser/server_groups/servers/templates/servers/sql/9.6_plus/stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/templates/servers/sql/9.6_plus/stats.sql
@@ -20,9 +20,9 @@ SELECT
     query_start AS {{ conn|qtIdent(_('Query start')) }},
     xact_start AS {{ conn|qtIdent(_('Xact start')) }}
 FROM
-    pg_stat_activity sa
+    pg_catalog.pg_stat_activity sa
 WHERE
-    (SELECT r.rolsuper OR r.oid = sa.usesysid  FROM pg_roles r WHERE r.rolname = current_user)
+    (SELECT r.rolsuper OR r.oid = sa.usesysid  FROM pg_catalog.pg_roles r WHERE r.rolname = current_user)
 UNION
 SELECT
     pid AS "PID",
@@ -46,6 +46,6 @@ SELECT
     null AS {{ conn|qtIdent(_('Query start')) }},
     null AS {{ conn|qtIdent(_('Xact start')) }}
 FROM
-    pg_stat_replication sa
+    pg_catalog.pg_stat_replication sa
 WHERE
-    (SELECT r.rolsuper OR r.oid = sa.usesysid  FROM pg_roles r WHERE r.rolname = current_user)
+    (SELECT r.rolsuper OR r.oid = sa.usesysid  FROM pg_catalog.pg_roles r WHERE r.rolname = current_user)
diff --git a/web/pgadmin/browser/server_groups/servers/templates/servers/sql/default/stats.sql b/web/pgadmin/browser/server_groups/servers/templates/servers/sql/default/stats.sql
index f72e1ba83..464702a25 100644
--- a/web/pgadmin/browser/server_groups/servers/templates/servers/sql/default/stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/templates/servers/sql/default/stats.sql
@@ -17,9 +17,9 @@ SELECT
     query_start AS {{ conn|qtIdent(_('Query start')) }},
     xact_start AS {{ conn|qtIdent(_('Xact start')) }}
 FROM
-    pg_stat_activity sa
+    pg_catalog.pg_stat_activity sa
 WHERE
-    (SELECT r.rolsuper OR r.oid = sa.usesysid  FROM pg_roles r WHERE r.rolname = current_user)
+    (SELECT r.rolsuper OR r.oid = sa.usesysid  FROM pg_catalog.pg_roles r WHERE r.rolname = current_user)
 UNION
 SELECT
     procpid AS "PID",
@@ -40,6 +40,6 @@ SELECT
     null AS {{ conn|qtIdent(_('Query start')) }},
     null AS {{ conn|qtIdent(_('Xact start')) }}
 FROM
-    pg_stat_replication sa
+    pg_catalog.pg_stat_replication sa
 WHERE
-    (SELECT r.rolsuper OR r.oid = sa.usesysid  FROM pg_roles r WHERE r.rolname = current_user)
+    (SELECT r.rolsuper OR r.oid = sa.usesysid  FROM pg_catalog.pg_roles r WHERE r.rolname = current_user)
diff --git a/web/pgadmin/browser/server_groups/servers/tests/test_role_dependencies_sql.py b/web/pgadmin/browser/server_groups/servers/tests/test_role_dependencies_sql.py
index 2cfc46822..4b82b9853 100644
--- a/web/pgadmin/browser/server_groups/servers/tests/test_role_dependencies_sql.py
+++ b/web/pgadmin/browser/server_groups/servers/tests/test_role_dependencies_sql.py
@@ -8,6 +8,7 @@
 ##########################################################################
 import os
 
+import jinja2
 from regression.python_test_utils import test_utils
 from regression.python_test_utils.template_helper import file_as_template
 from regression.python_test_utils.sql_template_test_base import \
@@ -68,6 +69,7 @@ class TestRoleDependenciesSql(SQLTemplateTestBase):
                                  "depends", self.server['type'])
         template_file = self.get_template_file(version, file_path,
                                                "role_dependencies.sql")
+        jinja2.filters.FILTERS['qtLiteral'] = lambda value: "NULL"
         template = file_as_template(template_file)
         sql = template.render(
             where_clause="WHERE dep.objid=%s::oid" % self.table_id)
diff --git a/web/pgadmin/dashboard/__init__.py b/web/pgadmin/dashboard/__init__.py
index 4ae1220fd..018087c2b 100644
--- a/web/pgadmin/dashboard/__init__.py
+++ b/web/pgadmin/dashboard/__init__.py
@@ -440,7 +440,7 @@ def cancel_query(sid=None, did=None, pid=None):
     :param pid: session/process id
     :return: Response
     """
-    sql = "SELECT pg_cancel_backend({0});".format(pid)
+    sql = "SELECT pg_catalog.pg_cancel_backend({0});".format(pid)
     status, res = g.conn.execute_scalar(sql)
     if not status:
         return internal_server_error(errormsg=res)
@@ -467,7 +467,7 @@ def terminate_session(sid=None, did=None, pid=None):
     :param pid: session/process id
     :return: Response
     """
-    sql = "SELECT pg_terminate_backend({0});".format(pid)
+    sql = "SELECT pg_catalog.pg_terminate_backend({0});".format(pid)
     status, res = g.conn.execute_scalar(sql)
     if not status:
         return internal_server_error(errormsg=res)
diff --git a/web/pgadmin/dashboard/templates/dashboard/sql/10_plus/activity.sql b/web/pgadmin/dashboard/templates/dashboard/sql/10_plus/activity.sql
index de520a40f..7f273e4ef 100644
--- a/web/pgadmin/dashboard/templates/dashboard/sql/10_plus/activity.sql
+++ b/web/pgadmin/dashboard/templates/dashboard/sql/10_plus/activity.sql
@@ -5,16 +5,16 @@ SELECT
     usename,
     application_name,
     client_addr,
-    to_char(backend_start, 'YYYY-MM-DD HH24:MI:SS TZ') AS backend_start,
+    pg_catalog.to_char(backend_start, 'YYYY-MM-DD HH24:MI:SS TZ') AS backend_start,
     state,
     wait_event_type || ': ' || wait_event AS wait_event,
-    pg_blocking_pids(pid) AS blocking_pids,
+    pg_catalog.pg_blocking_pids(pid) AS blocking_pids,
     query,
-    to_char(state_change, 'YYYY-MM-DD HH24:MI:SS TZ') AS state_change,
-    to_char(query_start, 'YYYY-MM-DD HH24:MI:SS TZ') AS query_start,
+    pg_catalog.to_char(state_change, 'YYYY-MM-DD HH24:MI:SS TZ') AS state_change,
+    pg_catalog.to_char(query_start, 'YYYY-MM-DD HH24:MI:SS TZ') AS query_start,
     backend_type
 FROM
-    pg_stat_activity
+    pg_catalog.pg_stat_activity
 {% if did %}WHERE
-    datname = (SELECT datname FROM pg_database WHERE oid = {{ did }}){% endif %}
+    datname = (SELECT datname FROM pg_catalog.pg_database WHERE oid = {{ did }}){% endif %}
 ORDER BY pid
diff --git a/web/pgadmin/dashboard/templates/dashboard/sql/9.6_plus/activity.sql b/web/pgadmin/dashboard/templates/dashboard/sql/9.6_plus/activity.sql
index 37e1c85cd..2fb5e839d 100644
--- a/web/pgadmin/dashboard/templates/dashboard/sql/9.6_plus/activity.sql
+++ b/web/pgadmin/dashboard/templates/dashboard/sql/9.6_plus/activity.sql
@@ -5,15 +5,15 @@ SELECT
     usename,
     application_name,
     client_addr,
-    to_char(backend_start, 'YYYY-MM-DD HH24:MI:SS TZ') AS backend_start,
+    pg_catalog.to_char(backend_start, 'YYYY-MM-DD HH24:MI:SS TZ') AS backend_start,
     state,
     wait_event_type || ': ' || wait_event AS wait_event,
-    pg_blocking_pids(pid) AS blocking_pids,
+    pg_catalog.pg_blocking_pids(pid) AS blocking_pids,
     query,
-    to_char(state_change, 'YYYY-MM-DD HH24:MI:SS TZ') AS state_change,
-    to_char(query_start, 'YYYY-MM-DD HH24:MI:SS TZ') AS query_start
+    pg_catalog.to_char(state_change, 'YYYY-MM-DD HH24:MI:SS TZ') AS state_change,
+    pg_catalog.to_char(query_start, 'YYYY-MM-DD HH24:MI:SS TZ') AS query_start
 FROM
-    pg_stat_activity
+    pg_catalog.pg_stat_activity
 {% if did %}WHERE
-    datname = (SELECT datname FROM pg_database WHERE oid = {{ did }}){% endif %}
+    datname = (SELECT datname FROM pg_catalog.pg_database WHERE oid = {{ did }}){% endif %}
 ORDER BY pid
diff --git a/web/pgadmin/dashboard/templates/dashboard/sql/default/activity.sql b/web/pgadmin/dashboard/templates/dashboard/sql/default/activity.sql
index 1bb5a8dd9..f82cdb689 100644
--- a/web/pgadmin/dashboard/templates/dashboard/sql/default/activity.sql
+++ b/web/pgadmin/dashboard/templates/dashboard/sql/default/activity.sql
@@ -5,14 +5,14 @@ SELECT
     usename,
     application_name,
     client_addr,
-    to_char(backend_start, 'YYYY-MM-DD HH24:MI:SS TZ') AS backend_start,
+    pg_catalog.to_char(backend_start, 'YYYY-MM-DD HH24:MI:SS TZ') AS backend_start,
     state,
     CASE WHEN waiting THEN '{{ _('yes') }}' ELSE '{{ _('no') }}' END AS waiting,
     query,
-    to_char(state_change, 'YYYY-MM-DD HH24:MI:SS TZ') AS state_change,
-    to_char(query_start, 'YYYY-MM-DD HH24:MI:SS TZ') AS query_start
+    pg_catalog.to_char(state_change, 'YYYY-MM-DD HH24:MI:SS TZ') AS state_change,
+    pg_catalog.to_char(query_start, 'YYYY-MM-DD HH24:MI:SS TZ') AS query_start
 FROM
-    pg_stat_activity
+    pg_catalog.pg_stat_activity
 {% if did %}WHERE
-    datname = (SELECT datname FROM pg_database WHERE oid = {{ did }}){% endif %}
+    datname = (SELECT datname FROM pg_catalog.pg_database WHERE oid = {{ did }}){% endif %}
 ORDER BY pid
diff --git a/web/pgadmin/dashboard/templates/dashboard/sql/default/config.sql b/web/pgadmin/dashboard/templates/dashboard/sql/default/config.sql
index 368343696..68bdfab3a 100644
--- a/web/pgadmin/dashboard/templates/dashboard/sql/default/config.sql
+++ b/web/pgadmin/dashboard/templates/dashboard/sql/default/config.sql
@@ -6,6 +6,6 @@ SELECT
     unit,
     short_desc
 FROM
-    pg_settings
+    pg_catalog.pg_settings
 ORDER BY
     category
diff --git a/web/pgadmin/dashboard/templates/dashboard/sql/default/dashboard_stats.sql b/web/pgadmin/dashboard/templates/dashboard/sql/default/dashboard_stats.sql
index 8d35c87c5..7d3aa2ab8 100644
--- a/web/pgadmin/dashboard/templates/dashboard/sql/default/dashboard_stats.sql
+++ b/web/pgadmin/dashboard/templates/dashboard/sql/default/dashboard_stats.sql
@@ -2,11 +2,11 @@
 {% set add_union = false %}
 {% if 'session_stats' in chart_names %}
 {% set add_union = true %}
-SELECT 'session_stats' AS chart_name, row_to_json(t) AS chart_data
+SELECT 'session_stats' AS chart_name, pg_catalog.row_to_json(t) AS chart_data
 FROM (SELECT
-   (SELECT count(*) FROM pg_stat_activity{% if did %} WHERE datname = (SELECT datname FROM pg_database WHERE oid = {{ did }}){% endif %}) AS "{{ _('Total') }}",
-   (SELECT count(*) FROM pg_stat_activity WHERE state = 'active'{% if did %} AND datname = (SELECT datname FROM pg_database WHERE oid = {{ did }}){% endif %})  AS "{{ _('Active') }}",
-   (SELECT count(*) FROM pg_stat_activity WHERE state = 'idle'{% if did %} AND datname = (SELECT datname FROM pg_database WHERE oid = {{ did }}){% endif %})  AS "{{ _('Idle') }}"
+   (SELECT count(*) FROM pg_catalog.pg_stat_activity{% if did %} WHERE datname = (SELECT datname FROM pg_catalog.pg_database WHERE oid = {{ did }}){% endif %}) AS "{{ _('Total') }}",
+   (SELECT count(*) FROM pg_catalog.pg_stat_activity WHERE state = 'active'{% if did %} AND datname = (SELECT datname FROM pg_catalog.pg_database WHERE oid = {{ did }}){% endif %})  AS "{{ _('Active') }}",
+   (SELECT count(*) FROM pg_catalog.pg_stat_activity WHERE state = 'idle'{% if did %} AND datname = (SELECT datname FROM pg_catalog.pg_database WHERE oid = {{ did }}){% endif %})  AS "{{ _('Idle') }}"
 ) t
 {% endif %}
 {% if add_union and 'tps_stats' in chart_names %}
@@ -14,11 +14,11 @@ UNION ALL
 {% endif %}
 {% if 'tps_stats' in chart_names %}
 {% set add_union = true %}
-SELECT 'tps_stats' AS chart_name, row_to_json(t) AS chart_data
+SELECT 'tps_stats' AS chart_name, pg_catalog.row_to_json(t) AS chart_data
 FROM (SELECT
-   (SELECT sum(xact_commit) + sum(xact_rollback) FROM pg_stat_database{% if did %} WHERE datname = (SELECT datname FROM pg_database WHERE oid = {{ did }}){% endif %}) AS "{{ _('Transactions') }}",
-   (SELECT sum(xact_commit) FROM pg_stat_database{% if did %} WHERE datname = (SELECT datname FROM pg_database WHERE oid = {{ did }}){% endif %}) AS "{{ _('Commits') }}",
-   (SELECT sum(xact_rollback) FROM pg_stat_database{% if did %} WHERE datname = (SELECT datname FROM pg_database WHERE oid = {{ did }}){% endif %}) AS "{{ _('Rollbacks') }}"
+   (SELECT sum(xact_commit) + sum(xact_rollback) FROM pg_catalog.pg_stat_database{% if did %} WHERE datname = (SELECT datname FROM pg_catalog.pg_database WHERE oid = {{ did }}){% endif %}) AS "{{ _('Transactions') }}",
+   (SELECT sum(xact_commit) FROM pg_catalog.pg_stat_database{% if did %} WHERE datname = (SELECT datname FROM pg_catalog.pg_database WHERE oid = {{ did }}){% endif %}) AS "{{ _('Commits') }}",
+   (SELECT sum(xact_rollback) FROM pg_catalog.pg_stat_database{% if did %} WHERE datname = (SELECT datname FROM pg_catalog.pg_database WHERE oid = {{ did }}){% endif %}) AS "{{ _('Rollbacks') }}"
 ) t
 {% endif %}
 {% if add_union and 'ti_stats' in chart_names %}
@@ -26,11 +26,11 @@ UNION ALL
 {% endif %}
 {% if 'ti_stats' in chart_names %}
 {% set add_union = true %}
-SELECT 'ti_stats' AS chart_name, row_to_json(t) AS chart_data
+SELECT 'ti_stats' AS chart_name, pg_catalog.row_to_json(t) AS chart_data
 FROM (SELECT
-   (SELECT sum(tup_inserted) FROM pg_stat_database{% if did %} WHERE datname = (SELECT datname FROM pg_database WHERE oid = {{ did }}){% endif %}) AS "{{ _('Inserts') }}",
-   (SELECT sum(tup_updated) FROM pg_stat_database{% if did %} WHERE datname = (SELECT datname FROM pg_database WHERE oid = {{ did }}){% endif %}) AS "{{ _('Updates') }}",
-   (SELECT sum(tup_deleted) FROM pg_stat_database{% if did %} WHERE datname = (SELECT datname FROM pg_database WHERE oid = {{ did }}){% endif %}) AS "{{ _('Deletes') }}"
+   (SELECT sum(tup_inserted) FROM pg_catalog.pg_stat_database{% if did %} WHERE datname = (SELECT datname FROM pg_catalog.pg_database WHERE oid = {{ did }}){% endif %}) AS "{{ _('Inserts') }}",
+   (SELECT sum(tup_updated) FROM pg_catalog.pg_stat_database{% if did %} WHERE datname = (SELECT datname FROM pg_catalog.pg_database WHERE oid = {{ did }}){% endif %}) AS "{{ _('Updates') }}",
+   (SELECT sum(tup_deleted) FROM pg_catalog.pg_stat_database{% if did %} WHERE datname = (SELECT datname FROM pg_catalog.pg_database WHERE oid = {{ did }}){% endif %}) AS "{{ _('Deletes') }}"
 ) t
 {% endif %}
 {% if add_union and 'to_stats' in chart_names %}
@@ -38,10 +38,10 @@ UNION ALL
 {% endif %}
 {% if 'to_stats' in chart_names %}
 {% set add_union = true %}
-SELECT 'to_stats' AS chart_name, row_to_json(t) AS chart_data
+SELECT 'to_stats' AS chart_name, pg_catalog.row_to_json(t) AS chart_data
 FROM (SELECT
-   (SELECT sum(tup_fetched) FROM pg_stat_database{% if did %} WHERE datname = (SELECT datname FROM pg_database WHERE oid = {{ did }}){% endif %}) AS "{{ _('Fetched') }}",
-   (SELECT sum(tup_returned) FROM pg_stat_database{% if did %} WHERE datname = (SELECT datname FROM pg_database WHERE oid = {{ did }}){% endif %}) AS "{{ _('Returned') }}"
+   (SELECT sum(tup_fetched) FROM pg_catalog.pg_stat_database{% if did %} WHERE datname = (SELECT datname FROM pg_catalog.pg_database WHERE oid = {{ did }}){% endif %}) AS "{{ _('Fetched') }}",
+   (SELECT sum(tup_returned) FROM pg_catalog.pg_stat_database{% if did %} WHERE datname = (SELECT datname FROM pg_catalog.pg_database WHERE oid = {{ did }}){% endif %}) AS "{{ _('Returned') }}"
 ) t
 {% endif %}
 {% if add_union and 'bio_stats' in chart_names %}
@@ -49,9 +49,9 @@ UNION ALL
 {% endif %}
 {% if 'bio_stats' in chart_names %}
 {% set add_union = true %}
-SELECT 'bio_stats' AS chart_name, row_to_json(t) AS chart_data
+SELECT 'bio_stats' AS chart_name, pg_catalog.row_to_json(t) AS chart_data
 FROM (SELECT
-   (SELECT sum(blks_read) FROM pg_stat_database{% if did %} WHERE datname = (SELECT datname FROM pg_database WHERE oid = {{ did }}){% endif %}) AS "{{ _('Reads') }}",
-   (SELECT sum(blks_hit) FROM pg_stat_database{% if did %} WHERE datname = (SELECT datname FROM pg_database WHERE oid = {{ did }}){% endif %}) AS "{{ _('Hits') }}"
+   (SELECT sum(blks_read) FROM pg_catalog.pg_stat_database{% if did %} WHERE datname = (SELECT datname FROM pg_catalog.pg_database WHERE oid = {{ did }}){% endif %}) AS "{{ _('Reads') }}",
+   (SELECT sum(blks_hit) FROM pg_catalog.pg_stat_database{% if did %} WHERE datname = (SELECT datname FROM pg_catalog.pg_database WHERE oid = {{ did }}){% endif %}) AS "{{ _('Hits') }}"
 ) t
 {% endif %}
diff --git a/web/pgadmin/dashboard/templates/dashboard/sql/default/locks.sql b/web/pgadmin/dashboard/templates/dashboard/sql/default/locks.sql
index a4b150666..31c90de92 100644
--- a/web/pgadmin/dashboard/templates/dashboard/sql/default/locks.sql
+++ b/web/pgadmin/dashboard/templates/dashboard/sql/default/locks.sql
@@ -16,9 +16,9 @@ SELECT
     granted,
     fastpath
 FROM
-    pg_locks l
-    LEFT OUTER JOIN pg_database d ON (l.database = d.oid)
+    pg_catalog.pg_locks l
+    LEFT OUTER JOIN pg_catalog.pg_database d ON (l.database = d.oid)
 {% if did %}WHERE
-    datname = (SELECT datname FROM pg_database WHERE oid = {{ did }}){% endif %}
+    datname = (SELECT datname FROM pg_catalog.pg_database WHERE oid = {{ did }}){% endif %}
 ORDER BY
     pid, locktype
diff --git a/web/pgadmin/dashboard/templates/dashboard/sql/default/prepared.sql b/web/pgadmin/dashboard/templates/dashboard/sql/default/prepared.sql
index 8d2d454b8..5f69c2dfc 100644
--- a/web/pgadmin/dashboard/templates/dashboard/sql/default/prepared.sql
+++ b/web/pgadmin/dashboard/templates/dashboard/sql/default/prepared.sql
@@ -4,10 +4,10 @@ SELECT
     database,
     owner,
     transaction,
-    to_char(prepared, 'YYYY-MM-DD HH24:MI:SS TZ') AS prepared
+    pg_catalog.to_char(prepared, 'YYYY-MM-DD HH24:MI:SS TZ') AS prepared
 FROM
-    pg_prepared_xacts
+    pg_catalog.pg_prepared_xacts
 {% if did %}WHERE
-    database = (SELECT datname FROM pg_database WHERE oid = {{ did }}){% endif %}
+    database = (SELECT datname FROM pg_catalog.pg_database WHERE oid = {{ did }}){% endif %}
 ORDER BY
     gid, database, owner
diff --git a/web/pgadmin/tools/debugger/templates/debugger/sql/get_function_debug_info.sql b/web/pgadmin/tools/debugger/templates/debugger/sql/get_function_debug_info.sql
index 72626792f..f04e59dc4 100644
--- a/web/pgadmin/tools/debugger/templates/debugger/sql/get_function_debug_info.sql
+++ b/web/pgadmin/tools/debugger/templates/debugger/sql/get_function_debug_info.sql
@@ -30,7 +30,7 @@ SELECT
     {% if is_ppas_database %}
         CASE WHEN n.nspparent <> 0 THEN n.oid ELSE 0 END AS pkg,
         CASE WHEN n.nspparent <> 0 THEN n.nspname ELSE '' END AS pkgname,
-        CASE WHEN n.nspparent <> 0 THEN (SELECT oid FROM pg_proc WHERE pronamespace=n.oid AND proname='cons') ELSE 0 END AS pkgconsoid,
+        CASE WHEN n.nspparent <> 0 THEN (SELECT oid FROM pg_catalog.pg_proc WHERE pronamespace=n.oid AND proname='cons') ELSE 0 END AS pkgconsoid,
         CASE WHEN n.nspparent <> 0 THEN g.oid ELSE n.oid END AS schema,
         CASE WHEN n.nspparent <> 0 THEN g.nspname ELSE n.nspname END AS schemaname,
         NOT (l.lanname = 'edbspl' AND protype = '1') AS isfunc,
diff --git a/web/pgadmin/tools/debugger/templates/debugger/sql/get_trigger_function_info.sql b/web/pgadmin/tools/debugger/templates/debugger/sql/get_trigger_function_info.sql
index 8807ecb0d..9c1a01bf6 100644
--- a/web/pgadmin/tools/debugger/templates/debugger/sql/get_trigger_function_info.sql
+++ b/web/pgadmin/tools/debugger/templates/debugger/sql/get_trigger_function_info.sql
@@ -1,12 +1,12 @@
 {### To fetch trigger function information ###}
 SELECT t.oid, t.xmin, t.*, relname, CASE WHEN relkind = 'r' THEN TRUE ELSE FALSE END AS parentistable,   nspname, des.description, l.lanname, p.prosrc,
-  COALESCE(substring(pg_get_triggerdef(t.oid), 'WHEN (.*) EXECUTE PROCEDURE'), substring(pg_get_triggerdef(t.oid), 'WHEN (.*)  \$trigger')) AS whenclause
-  FROM pg_trigger t
-  JOIN pg_class cl ON cl.oid=tgrelid
-  JOIN pg_namespace na ON na.oid=relnamespace
-  LEFT OUTER JOIN pg_description des ON (des.objoid=t.oid AND des.classoid='pg_trigger'::regclass)
-  LEFT OUTER JOIN pg_proc p ON p.oid=t.tgfoid
-  LEFT OUTER JOIN pg_language l ON l.oid=p.prolang
+  COALESCE(pg_catalog.substring(pg_catalog.pg_get_triggerdef(t.oid), 'WHEN (.*) EXECUTE PROCEDURE'), pg_catalog.substring(pg_catalog.pg_get_triggerdef(t.oid), 'WHEN (.*)  \$trigger')) AS whenclause
+  FROM pg_catalog.pg_trigger t
+  JOIN pg_catalog.pg_class cl ON cl.oid=tgrelid
+  JOIN pg_catalog.pg_namespace na ON na.oid=relnamespace
+  LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=t.oid AND des.classoid='pg_trigger'::regclass)
+  LEFT OUTER JOIN pg_catalog.pg_proc p ON p.oid=t.tgfoid
+  LEFT OUTER JOIN pg_catalog.pg_language l ON l.oid=p.prolang
  WHERE NOT tgisinternal
   AND tgrelid = {{table_id}}::oid AND t.oid = {{trigger_id}}::oid
  ORDER BY tgname
diff --git a/web/pgadmin/tools/debugger/templates/debugger/sql/v1/get_function_info.sql b/web/pgadmin/tools/debugger/templates/debugger/sql/v1/get_function_info.sql
index 4d72510d5..8dae948b4 100644
--- a/web/pgadmin/tools/debugger/templates/debugger/sql/v1/get_function_info.sql
+++ b/web/pgadmin/tools/debugger/templates/debugger/sql/v1/get_function_info.sql
@@ -31,7 +31,7 @@ SELECT
 	{% if is_ppas_database %}
         CASE WHEN n.nspparent <> 0 THEN n.oid ELSE 0 END AS pkg,
         CASE WHEN n.nspparent <> 0 THEN n.nspname ELSE '' END AS pkgname,
-        CASE WHEN n.nspparent <> 0 THEN (SELECT oid FROM pg_proc WHERE pronamespace=n.oid AND proname='cons') ELSE 0 END AS pkgconsoid,
+        CASE WHEN n.nspparent <> 0 THEN (SELECT oid FROM pg_catalog.pg_proc WHERE pronamespace=n.oid AND proname='cons') ELSE 0 END AS pkgconsoid,
         CASE WHEN n.nspparent <> 0 THEN g.oid ELSE n.oid END AS schema,
         CASE WHEN n.nspparent <> 0 THEN g.nspname ELSE n.nspname END AS schemaname,
         NOT (l.lanname = 'edbspl' AND protype = '1') AS isfunc,
@@ -61,4 +61,4 @@ FROM
 {% endif %}
 {% if fid %}
 WHERE p.oid = {{fid}}::oid;
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/web/pgadmin/tools/debugger/templates/debugger/sql/v3/get_function_info.sql b/web/pgadmin/tools/debugger/templates/debugger/sql/v3/get_function_info.sql
index 4d72510d5..8dae948b4 100644
--- a/web/pgadmin/tools/debugger/templates/debugger/sql/v3/get_function_info.sql
+++ b/web/pgadmin/tools/debugger/templates/debugger/sql/v3/get_function_info.sql
@@ -31,7 +31,7 @@ SELECT
 	{% if is_ppas_database %}
         CASE WHEN n.nspparent <> 0 THEN n.oid ELSE 0 END AS pkg,
         CASE WHEN n.nspparent <> 0 THEN n.nspname ELSE '' END AS pkgname,
-        CASE WHEN n.nspparent <> 0 THEN (SELECT oid FROM pg_proc WHERE pronamespace=n.oid AND proname='cons') ELSE 0 END AS pkgconsoid,
+        CASE WHEN n.nspparent <> 0 THEN (SELECT oid FROM pg_catalog.pg_proc WHERE pronamespace=n.oid AND proname='cons') ELSE 0 END AS pkgconsoid,
         CASE WHEN n.nspparent <> 0 THEN g.oid ELSE n.oid END AS schema,
         CASE WHEN n.nspparent <> 0 THEN g.nspname ELSE n.nspname END AS schemaname,
         NOT (l.lanname = 'edbspl' AND protype = '1') AS isfunc,
@@ -61,4 +61,4 @@ FROM
 {% endif %}
 {% if fid %}
 WHERE p.oid = {{fid}}::oid;
-{% endif %}
\ No newline at end of file
+{% endif %}
diff --git a/web/pgadmin/tools/grant_wizard/templates/grant_wizard/pg/10_plus/sql/table.sql b/web/pgadmin/tools/grant_wizard/templates/grant_wizard/pg/10_plus/sql/table.sql
index c00a3e65f..4ded80fd7 100644
--- a/web/pgadmin/tools/grant_wizard/templates/grant_wizard/pg/10_plus/sql/table.sql
+++ b/web/pgadmin/tools/grant_wizard/templates/grant_wizard/pg/10_plus/sql/table.sql
@@ -6,13 +6,13 @@ SELECT
     'Table' AS object_type,
     CASE WHEN (rel.relkind = 'p' OR rel.relispartition) THEN 'icon-partition' ELSE 'icon-table' END AS icon
 FROM
-    pg_class rel
-JOIN pg_namespace nsp ON nsp.oid=rel.relnamespace
-LEFT OUTER JOIN pg_tablespace spc ON spc.oid=rel.reltablespace
-LEFT OUTER JOIN pg_description des ON (des.objoid=rel.oid AND des.objsubid=0 AND des.classoid='pg_class'::regclass)
-LEFT OUTER JOIN pg_constraint con ON con.conrelid=rel.oid AND con.contype='p'
-LEFT OUTER JOIN pg_class tst ON tst.oid = rel.reltoastrelid
-LEFT JOIN pg_type typ ON rel.reloftype=typ.oid
+    pg_catalog.pg_class rel
+JOIN pg_catalog.pg_namespace nsp ON nsp.oid=rel.relnamespace
+LEFT OUTER JOIN pg_catalog.pg_tablespace spc ON spc.oid=rel.reltablespace
+LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=rel.oid AND des.objsubid=0 AND des.classoid='pg_class'::regclass)
+LEFT OUTER JOIN pg_catalog.pg_constraint con ON con.conrelid=rel.oid AND con.contype='p'
+LEFT OUTER JOIN pg_catalog.pg_class tst ON tst.oid = rel.reltoastrelid
+LEFT JOIN pg_catalog.pg_type typ ON rel.reloftype=typ.oid
 WHERE
     rel.relkind IN ('r','s','t','p') AND rel.relnamespace = {{ node_id }}::oid
 ORDER BY
diff --git a/web/pgadmin/tools/grant_wizard/templates/grant_wizard/pg/11_plus/sql/function.sql b/web/pgadmin/tools/grant_wizard/templates/grant_wizard/pg/11_plus/sql/function.sql
index 32d9b2523..d951a8bf8 100644
--- a/web/pgadmin/tools/grant_wizard/templates/grant_wizard/pg/11_plus/sql/function.sql
+++ b/web/pgadmin/tools/grant_wizard/templates/grant_wizard/pg/11_plus/sql/function.sql
@@ -5,18 +5,18 @@
 {% set kind = 'p' if type == 'procedure' else 'f' %}
 SELECT
     pr.oid,
-    pg_get_function_identity_arguments(pr.oid) AS proargs,
+    pg_catalog.pg_get_function_identity_arguments(pr.oid) AS proargs,
     pr.proname AS name,
     nsp.nspname AS nspname,
     '{{ func_type }}' AS object_type,
     '{{ icon }}' AS icon
 FROM
-    pg_proc pr
-JOIN pg_namespace nsp ON nsp.oid=pr.pronamespace
-JOIN pg_type typ ON typ.oid=prorettype
-JOIN pg_namespace typns ON typns.oid=typ.typnamespace
-JOIN pg_language lng ON lng.oid=prolang
-LEFT OUTER JOIN pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass)
+    pg_catalog.pg_proc pr
+JOIN pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
+JOIN pg_catalog.pg_type typ ON typ.oid=prorettype
+JOIN pg_catalog.pg_namespace typns ON typns.oid=typ.typnamespace
+JOIN pg_catalog.pg_language lng ON lng.oid=prolang
+LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass)
 WHERE
     pronamespace = {{ node_id }}::oid
     AND typname {{ 'NOT' if type != 'trigger_function' else '' }} IN ('trigger', 'event_trigger')
diff --git a/web/pgadmin/tools/grant_wizard/templates/grant_wizard/pg/9.1_plus/sql/foreign_table.sql b/web/pgadmin/tools/grant_wizard/templates/grant_wizard/pg/9.1_plus/sql/foreign_table.sql
index dc024f04e..08ae2c695 100644
--- a/web/pgadmin/tools/grant_wizard/templates/grant_wizard/pg/9.1_plus/sql/foreign_table.sql
+++ b/web/pgadmin/tools/grant_wizard/templates/grant_wizard/pg/9.1_plus/sql/foreign_table.sql
@@ -6,8 +6,8 @@ SELECT
     'Foreign Table' AS object_type,
     'icon-coll-foreign_table' AS icon
 FROM
-    pg_class rel
-JOIN pg_namespace nsp ON nsp.oid=rel.relnamespace
+    pg_catalog.pg_class rel
+JOIN pg_catalog.pg_namespace nsp ON nsp.oid=rel.relnamespace
 
 WHERE
     rel.relkind IN ('f') AND rel.relnamespace = {{ node_id }}::oid
diff --git a/web/pgadmin/tools/grant_wizard/templates/grant_wizard/pg/9.1_plus/sql/function.sql b/web/pgadmin/tools/grant_wizard/templates/grant_wizard/pg/9.1_plus/sql/function.sql
index 5f27ea644..b3f0d1a0e 100644
--- a/web/pgadmin/tools/grant_wizard/templates/grant_wizard/pg/9.1_plus/sql/function.sql
+++ b/web/pgadmin/tools/grant_wizard/templates/grant_wizard/pg/9.1_plus/sql/function.sql
@@ -4,18 +4,18 @@
 {% set icon = 'icon-function' if type == 'function' else 'icon-trigger_function' %}
 SELECT
     pr.oid,
-    pg_get_function_identity_arguments(pr.oid) AS proargs,
+    pg_catalog.pg_get_function_identity_arguments(pr.oid) AS proargs,
     pr.proname AS name,
     nsp.nspname AS nspname,
     '{{ func_type }}' AS object_type,
     '{{ icon }}' AS icon
 FROM
-    pg_proc pr
-JOIN pg_namespace nsp ON nsp.oid=pr.pronamespace
-JOIN pg_type typ ON typ.oid=prorettype
-JOIN pg_namespace typns ON typns.oid=typ.typnamespace
-JOIN pg_language lng ON lng.oid=prolang
-LEFT OUTER JOIN pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass)
+    pg_catalog.pg_proc pr
+JOIN pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
+JOIN pg_catalog.pg_type typ ON typ.oid=prorettype
+JOIN pg_catalog.pg_namespace typns ON typns.oid=typ.typnamespace
+JOIN pg_catalog.pg_language lng ON lng.oid=prolang
+LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass)
 WHERE
     proisagg = FALSE AND pronamespace = {{ node_id }}::oid
     AND typname {{ 'NOT' if type != 'trigger_function' else '' }} IN ('trigger', 'event_trigger')
diff --git a/web/pgadmin/tools/grant_wizard/templates/grant_wizard/pg/9.1_plus/sql/get_schemas.sql b/web/pgadmin/tools/grant_wizard/templates/grant_wizard/pg/9.1_plus/sql/get_schemas.sql
index 5cfad6b80..b0c432e75 100644
--- a/web/pgadmin/tools/grant_wizard/templates/grant_wizard/pg/9.1_plus/sql/get_schemas.sql
+++ b/web/pgadmin/tools/grant_wizard/templates/grant_wizard/pg/9.1_plus/sql/get_schemas.sql
@@ -4,7 +4,7 @@ SELECT
     nsp.oid,
     nsp.nspname as name
 FROM
-    pg_namespace nsp
+    pg_catalog.pg_namespace nsp
 WHERE
     {% if nspid %}
     nsp.oid={{nspid}}::oid AND
diff --git a/web/pgadmin/tools/grant_wizard/templates/grant_wizard/pg/9.1_plus/sql/sequence.sql b/web/pgadmin/tools/grant_wizard/templates/grant_wizard/pg/9.1_plus/sql/sequence.sql
index c49874b66..ecf4de437 100644
--- a/web/pgadmin/tools/grant_wizard/templates/grant_wizard/pg/9.1_plus/sql/sequence.sql
+++ b/web/pgadmin/tools/grant_wizard/templates/grant_wizard/pg/9.1_plus/sql/sequence.sql
@@ -6,9 +6,9 @@ SELECT
     'Sequence' AS object_type,
     'icon-sequence' AS icon
 FROM
-    pg_class cl
-JOIN pg_namespace nsp ON nsp.oid=cl.relnamespace
-LEFT OUTER JOIN pg_description des ON (des.objoid=cl.oid AND des.classoid='pg_class'::regclass)
+    pg_catalog.pg_class cl
+JOIN pg_catalog.pg_namespace nsp ON nsp.oid=cl.relnamespace
+LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=cl.oid AND des.classoid='pg_class'::regclass)
 WHERE
     relkind = 'S' AND relnamespace  = {{ node_id }}::oid
 ORDER BY
diff --git a/web/pgadmin/tools/grant_wizard/templates/grant_wizard/pg/9.1_plus/sql/table.sql b/web/pgadmin/tools/grant_wizard/templates/grant_wizard/pg/9.1_plus/sql/table.sql
index 3bfcf0b98..da49f0487 100644
--- a/web/pgadmin/tools/grant_wizard/templates/grant_wizard/pg/9.1_plus/sql/table.sql
+++ b/web/pgadmin/tools/grant_wizard/templates/grant_wizard/pg/9.1_plus/sql/table.sql
@@ -6,13 +6,13 @@ SELECT
     'Table' AS object_type,
     'icon-table' AS icon
 FROM
-    pg_class rel
-JOIN pg_namespace nsp ON nsp.oid=rel.relnamespace
-LEFT OUTER JOIN pg_tablespace spc ON spc.oid=rel.reltablespace
-LEFT OUTER JOIN pg_description des ON (des.objoid=rel.oid AND des.objsubid=0 AND des.classoid='pg_class'::regclass)
-LEFT OUTER JOIN pg_constraint con ON con.conrelid=rel.oid AND con.contype='p'
-LEFT OUTER JOIN pg_class tst ON tst.oid = rel.reltoastrelid
-LEFT JOIN pg_type typ ON rel.reloftype=typ.oid
+    pg_catalog.pg_class rel
+JOIN pg_catalog.pg_namespace nsp ON nsp.oid=rel.relnamespace
+LEFT OUTER JOIN pg_catalog.pg_tablespace spc ON spc.oid=rel.reltablespace
+LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=rel.oid AND des.objsubid=0 AND des.classoid='pg_class'::regclass)
+LEFT OUTER JOIN pg_catalog.pg_constraint con ON con.conrelid=rel.oid AND con.contype='p'
+LEFT OUTER JOIN pg_catalog.pg_class tst ON tst.oid = rel.reltoastrelid
+LEFT JOIN pg_catalog.pg_type typ ON rel.reloftype=typ.oid
 WHERE
     rel.relkind IN ('r','s','t') AND rel.relnamespace = {{ node_id }}::oid
 ORDER BY
diff --git a/web/pgadmin/tools/grant_wizard/templates/grant_wizard/pg/9.1_plus/sql/view.sql b/web/pgadmin/tools/grant_wizard/templates/grant_wizard/pg/9.1_plus/sql/view.sql
index a7aabb789..653b0817c 100644
--- a/web/pgadmin/tools/grant_wizard/templates/grant_wizard/pg/9.1_plus/sql/view.sql
+++ b/web/pgadmin/tools/grant_wizard/templates/grant_wizard/pg/9.1_plus/sql/view.sql
@@ -7,17 +7,17 @@ SELECT
     '{{ ntype }}' AS object_type,
     'icon-view' AS icon
 FROM
-    pg_class c
-JOIN pg_namespace nsp ON nsp.oid=c.relnamespace
-LEFT OUTER JOIN pg_tablespace spc ON spc.oid=c.reltablespace
-LEFT OUTER JOIN pg_description des ON (des.objoid=c.oid and des.objsubid=0 AND des.classoid='pg_class'::regclass)
-LEFT OUTER JOIN pg_class tst ON tst.oid = c.reltoastrelid
+    pg_catalog.pg_class c
+JOIN pg_catalog.pg_namespace nsp ON nsp.oid=c.relnamespace
+LEFT OUTER JOIN pg_catalog.pg_tablespace spc ON spc.oid=c.reltablespace
+LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=c.oid and des.objsubid=0 AND des.classoid='pg_class'::regclass)
+LEFT OUTER JOIN pg_catalog.pg_class tst ON tst.oid = c.reltoastrelid
 WHERE
     ((c.relhasrules AND (EXISTS (
       SELECT
           r.rulename
       FROM
-          pg_rewrite r
+          pg_catalog.pg_rewrite r
       WHERE
           ((r.ev_class = c.oid)
           AND (bpchar(r.ev_type) = '1'::bpchar))
diff --git a/web/pgadmin/tools/grant_wizard/templates/grant_wizard/ppas/10_plus/sql/table.sql b/web/pgadmin/tools/grant_wizard/templates/grant_wizard/ppas/10_plus/sql/table.sql
index c00a3e65f..4ded80fd7 100644
--- a/web/pgadmin/tools/grant_wizard/templates/grant_wizard/ppas/10_plus/sql/table.sql
+++ b/web/pgadmin/tools/grant_wizard/templates/grant_wizard/ppas/10_plus/sql/table.sql
@@ -6,13 +6,13 @@ SELECT
     'Table' AS object_type,
     CASE WHEN (rel.relkind = 'p' OR rel.relispartition) THEN 'icon-partition' ELSE 'icon-table' END AS icon
 FROM
-    pg_class rel
-JOIN pg_namespace nsp ON nsp.oid=rel.relnamespace
-LEFT OUTER JOIN pg_tablespace spc ON spc.oid=rel.reltablespace
-LEFT OUTER JOIN pg_description des ON (des.objoid=rel.oid AND des.objsubid=0 AND des.classoid='pg_class'::regclass)
-LEFT OUTER JOIN pg_constraint con ON con.conrelid=rel.oid AND con.contype='p'
-LEFT OUTER JOIN pg_class tst ON tst.oid = rel.reltoastrelid
-LEFT JOIN pg_type typ ON rel.reloftype=typ.oid
+    pg_catalog.pg_class rel
+JOIN pg_catalog.pg_namespace nsp ON nsp.oid=rel.relnamespace
+LEFT OUTER JOIN pg_catalog.pg_tablespace spc ON spc.oid=rel.reltablespace
+LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=rel.oid AND des.objsubid=0 AND des.classoid='pg_class'::regclass)
+LEFT OUTER JOIN pg_catalog.pg_constraint con ON con.conrelid=rel.oid AND con.contype='p'
+LEFT OUTER JOIN pg_catalog.pg_class tst ON tst.oid = rel.reltoastrelid
+LEFT JOIN pg_catalog.pg_type typ ON rel.reloftype=typ.oid
 WHERE
     rel.relkind IN ('r','s','t','p') AND rel.relnamespace = {{ node_id }}::oid
 ORDER BY
diff --git a/web/pgadmin/tools/grant_wizard/templates/grant_wizard/ppas/11_plus/sql/function.sql b/web/pgadmin/tools/grant_wizard/templates/grant_wizard/ppas/11_plus/sql/function.sql
index 577f8c989..57f925b83 100644
--- a/web/pgadmin/tools/grant_wizard/templates/grant_wizard/ppas/11_plus/sql/function.sql
+++ b/web/pgadmin/tools/grant_wizard/templates/grant_wizard/ppas/11_plus/sql/function.sql
@@ -5,18 +5,18 @@
 {% set kind = 'p' if type == 'procedure' else 'f' %}
 SELECT
     pr.oid,
-    pg_get_function_identity_arguments(pr.oid) AS proargs,
+    pg_catalog.pg_get_function_identity_arguments(pr.oid) AS proargs,
     pr.proname AS name,
     nsp.nspname AS nspname,
     '{{ func_type }}' AS object_type,
     '{{ icon }}' AS icon
 FROM
-    pg_proc pr
-JOIN pg_namespace nsp ON nsp.oid=pr.pronamespace
-JOIN pg_type typ ON typ.oid=prorettype
-JOIN pg_namespace typns ON typns.oid=typ.typnamespace
-JOIN pg_language lng ON lng.oid=prolang
-LEFT OUTER JOIN pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass)
+    pg_catalog.pg_proc pr
+JOIN pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
+JOIN pg_catalog.pg_type typ ON typ.oid=prorettype
+JOIN pg_catalog.pg_namespace typns ON typns.oid=typ.typnamespace
+JOIN pg_catalog.pg_language lng ON lng.oid=prolang
+LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass)
 WHERE
     pronamespace = {{ node_id }}::oid
     AND typname {{ 'NOT' if type != 'trigger_function' else '' }} IN ('trigger', 'event_trigger')
diff --git a/web/pgadmin/tools/grant_wizard/templates/grant_wizard/ppas/9.1_plus/sql/foreign_table.sql b/web/pgadmin/tools/grant_wizard/templates/grant_wizard/ppas/9.1_plus/sql/foreign_table.sql
index dc024f04e..08ae2c695 100644
--- a/web/pgadmin/tools/grant_wizard/templates/grant_wizard/ppas/9.1_plus/sql/foreign_table.sql
+++ b/web/pgadmin/tools/grant_wizard/templates/grant_wizard/ppas/9.1_plus/sql/foreign_table.sql
@@ -6,8 +6,8 @@ SELECT
     'Foreign Table' AS object_type,
     'icon-coll-foreign_table' AS icon
 FROM
-    pg_class rel
-JOIN pg_namespace nsp ON nsp.oid=rel.relnamespace
+    pg_catalog.pg_class rel
+JOIN pg_catalog.pg_namespace nsp ON nsp.oid=rel.relnamespace
 
 WHERE
     rel.relkind IN ('f') AND rel.relnamespace = {{ node_id }}::oid
diff --git a/web/pgadmin/tools/grant_wizard/templates/grant_wizard/ppas/9.1_plus/sql/function.sql b/web/pgadmin/tools/grant_wizard/templates/grant_wizard/ppas/9.1_plus/sql/function.sql
index 1fede48e9..ac54e5b80 100644
--- a/web/pgadmin/tools/grant_wizard/templates/grant_wizard/ppas/9.1_plus/sql/function.sql
+++ b/web/pgadmin/tools/grant_wizard/templates/grant_wizard/ppas/9.1_plus/sql/function.sql
@@ -4,18 +4,18 @@
 {% set icon = 'icon-function' if type == 'function' else 'icon-procedure' if type == 'procedure' else 'icon-trigger_function' %}
 SELECT
     pr.oid,
-    pg_get_function_identity_arguments(pr.oid) AS proargs,
+    pg_catalog.pg_get_function_identity_arguments(pr.oid) AS proargs,
     pr.proname AS name,
     nsp.nspname AS nspname,
     '{{ func_type }}' AS object_type,
     '{{ icon }}' AS icon
 FROM
-    pg_proc pr
-JOIN pg_namespace nsp ON nsp.oid=pr.pronamespace
-JOIN pg_type typ ON typ.oid=prorettype
-JOIN pg_namespace typns ON typns.oid=typ.typnamespace
-JOIN pg_language lng ON lng.oid=prolang
-LEFT OUTER JOIN pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass)
+    pg_catalog.pg_proc pr
+JOIN pg_catalog.pg_namespace nsp ON nsp.oid=pr.pronamespace
+JOIN pg_catalog.pg_type typ ON typ.oid=prorettype
+JOIN pg_catalog.pg_namespace typns ON typns.oid=typ.typnamespace
+JOIN pg_catalog.pg_language lng ON lng.oid=prolang
+LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass)
 WHERE
     proisagg = FALSE AND pronamespace = {{ node_id }}::oid
     AND typname {{ 'NOT' if type != 'trigger_function' else '' }} IN ('trigger', 'event_trigger')
diff --git a/web/pgadmin/tools/grant_wizard/templates/grant_wizard/ppas/9.1_plus/sql/get_schemas.sql b/web/pgadmin/tools/grant_wizard/templates/grant_wizard/ppas/9.1_plus/sql/get_schemas.sql
index 02d3c81c9..985042175 100644
--- a/web/pgadmin/tools/grant_wizard/templates/grant_wizard/ppas/9.1_plus/sql/get_schemas.sql
+++ b/web/pgadmin/tools/grant_wizard/templates/grant_wizard/ppas/9.1_plus/sql/get_schemas.sql
@@ -4,7 +4,7 @@ SELECT
     nsp.oid,
     nsp.nspname as name
 FROM
-    pg_namespace nsp
+    pg_catalog.pg_namespace nsp
 WHERE
     nsp.nspparent = 0 AND
     {% if nspid %}
diff --git a/web/pgadmin/tools/grant_wizard/templates/grant_wizard/ppas/9.1_plus/sql/sequence.sql b/web/pgadmin/tools/grant_wizard/templates/grant_wizard/ppas/9.1_plus/sql/sequence.sql
index c49874b66..ecf4de437 100644
--- a/web/pgadmin/tools/grant_wizard/templates/grant_wizard/ppas/9.1_plus/sql/sequence.sql
+++ b/web/pgadmin/tools/grant_wizard/templates/grant_wizard/ppas/9.1_plus/sql/sequence.sql
@@ -6,9 +6,9 @@ SELECT
     'Sequence' AS object_type,
     'icon-sequence' AS icon
 FROM
-    pg_class cl
-JOIN pg_namespace nsp ON nsp.oid=cl.relnamespace
-LEFT OUTER JOIN pg_description des ON (des.objoid=cl.oid AND des.classoid='pg_class'::regclass)
+    pg_catalog.pg_class cl
+JOIN pg_catalog.pg_namespace nsp ON nsp.oid=cl.relnamespace
+LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=cl.oid AND des.classoid='pg_class'::regclass)
 WHERE
     relkind = 'S' AND relnamespace  = {{ node_id }}::oid
 ORDER BY
diff --git a/web/pgadmin/tools/grant_wizard/templates/grant_wizard/ppas/9.1_plus/sql/table.sql b/web/pgadmin/tools/grant_wizard/templates/grant_wizard/ppas/9.1_plus/sql/table.sql
index 3bfcf0b98..da49f0487 100644
--- a/web/pgadmin/tools/grant_wizard/templates/grant_wizard/ppas/9.1_plus/sql/table.sql
+++ b/web/pgadmin/tools/grant_wizard/templates/grant_wizard/ppas/9.1_plus/sql/table.sql
@@ -6,13 +6,13 @@ SELECT
     'Table' AS object_type,
     'icon-table' AS icon
 FROM
-    pg_class rel
-JOIN pg_namespace nsp ON nsp.oid=rel.relnamespace
-LEFT OUTER JOIN pg_tablespace spc ON spc.oid=rel.reltablespace
-LEFT OUTER JOIN pg_description des ON (des.objoid=rel.oid AND des.objsubid=0 AND des.classoid='pg_class'::regclass)
-LEFT OUTER JOIN pg_constraint con ON con.conrelid=rel.oid AND con.contype='p'
-LEFT OUTER JOIN pg_class tst ON tst.oid = rel.reltoastrelid
-LEFT JOIN pg_type typ ON rel.reloftype=typ.oid
+    pg_catalog.pg_class rel
+JOIN pg_catalog.pg_namespace nsp ON nsp.oid=rel.relnamespace
+LEFT OUTER JOIN pg_catalog.pg_tablespace spc ON spc.oid=rel.reltablespace
+LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=rel.oid AND des.objsubid=0 AND des.classoid='pg_class'::regclass)
+LEFT OUTER JOIN pg_catalog.pg_constraint con ON con.conrelid=rel.oid AND con.contype='p'
+LEFT OUTER JOIN pg_catalog.pg_class tst ON tst.oid = rel.reltoastrelid
+LEFT JOIN pg_catalog.pg_type typ ON rel.reloftype=typ.oid
 WHERE
     rel.relkind IN ('r','s','t') AND rel.relnamespace = {{ node_id }}::oid
 ORDER BY
diff --git a/web/pgadmin/tools/grant_wizard/templates/grant_wizard/ppas/9.1_plus/sql/view.sql b/web/pgadmin/tools/grant_wizard/templates/grant_wizard/ppas/9.1_plus/sql/view.sql
index 259b2deb3..a64ce3cb9 100644
--- a/web/pgadmin/tools/grant_wizard/templates/grant_wizard/ppas/9.1_plus/sql/view.sql
+++ b/web/pgadmin/tools/grant_wizard/templates/grant_wizard/ppas/9.1_plus/sql/view.sql
@@ -8,20 +8,20 @@ SELECT
     '{{ ntype }}' AS object_type,
     '{{ view_icon }}' AS icon
 FROM
-    pg_class c
-JOIN pg_namespace nsp ON nsp.oid=c.relnamespace
-LEFT OUTER JOIN pg_tablespace spc ON spc.oid=c.reltablespace
-LEFT OUTER JOIN pg_description des ON (des.objoid=c.oid and des.objsubid=0 AND des.classoid='pg_class'::regclass)
-LEFT OUTER JOIN pg_class tst ON tst.oid = c.reltoastrelid
+    pg_catalog.pg_class c
+JOIN pg_catalog.pg_namespace nsp ON nsp.oid=c.relnamespace
+LEFT OUTER JOIN pg_catalog.pg_tablespace spc ON spc.oid=c.reltablespace
+LEFT OUTER JOIN pg_catalog.pg_description des ON (des.objoid=c.oid and des.objsubid=0 AND des.classoid='pg_class'::regclass)
+LEFT OUTER JOIN pg_catalog.pg_class tst ON tst.oid = c.reltoastrelid
 WHERE
     ((c.relhasrules AND (EXISTS (
       SELECT
           r.rulename
       FROM
-          pg_rewrite r
+          pg_catalog.pg_rewrite r
       WHERE
           ((r.ev_class = c.oid)
-          AND (bpchar(r.ev_type) = '1'::bpchar))
+          AND (pg_catalog.bpchar(r.ev_type) = '1'::bpchar))
       ))
      ) AND (c.relkind = '{{ node_type }}'::char)
     )
diff --git a/web/pgadmin/tools/search_objects/templates/search_objects/sql/pg/10_plus/search.sql b/web/pgadmin/tools/search_objects/templates/search_objects/sql/pg/10_plus/search.sql
index 3828d9068..0761d3c26 100644
--- a/web/pgadmin/tools/search_objects/templates/search_objects/sql/pg/10_plus/search.sql
+++ b/web/pgadmin/tools/search_objects/templates/search_objects/sql/pg/10_plus/search.sql
@@ -4,7 +4,7 @@
 {% set all_obj = true %}
 {% endif %}
 SELECT obj_type, obj_name,
-    REPLACE(obj_path, '/'||sn.schema_name||'/', '/'||{{ CATALOGS.LABELS_SCHEMACOL('sn.schema_name', _) }}||'/') AS obj_path,
+    pg_catalog.REPLACE(obj_path, '/'||sn.schema_name||'/', '/'||{{ CATALOGS.LABELS_SCHEMACOL('sn.schema_name', _) }}||'/') AS obj_path,
     schema_name, show_node, other_info,
     CASE
         WHEN {{ CATALOGS.IS_CATALOG_SCHEMA('sn.schema_name') }} THEN
@@ -33,8 +33,8 @@ FROM (
         WHEN c.relkind = 'm' THEN {{ show_node_prefs['mview'] }}
         ELSE False
     END AS show_node, NULL AS other_info
-    FROM pg_class c
-    LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
+    FROM pg_catalog.pg_class c
+    LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
     {% if all_obj %}
     WHERE c.relkind in ('S','v','m')
     {% elif obj_type == 'sequence' %}
@@ -59,8 +59,8 @@ FROM (
 			select rel.oid, pt.height+1 as height, rel.relkind,
 				CASE rel.relispartition WHEN true THEN ':partition.' ELSE ':table.' END
 				|| rel.oid || ':/' || rel.relname || '/' || pt.path as path
-			from pg_class rel JOIN pg_namespace nsp ON rel.relnamespace = nsp.oid
-			join pg_inherits inh ON inh.inhparent = rel.oid
+			from pg_catalog.pg_class rel JOIN pg_catalog.pg_namespace nsp ON rel.relnamespace = nsp.oid
+			join pg_catalog.pg_inherits inh ON inh.inhparent = rel.oid
 			join table_path_data pt ON inh.inhrelid = pt.oid
 		)
 		select CASE WHEN relkind = 'p' THEN path ELSE ':table.' || c.oid || ':/' || c.relname END AS path
@@ -69,8 +69,8 @@ FROM (
 	CASE WHEN c.relispartition THEN {{ show_node_prefs['partition'] }}
 	    ELSE {{ show_node_prefs['table'] }} END AS show_node,
     NULL AS other_info
-    FROM pg_class c
-    LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
+    FROM pg_catalog.pg_class c
+    LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
     WHERE c.relkind in ('p','r','t')
     {% if obj_type == 'table' %}
     AND NOT c.relispartition
@@ -95,8 +95,8 @@ FROM (
                         select rel.oid, pt.height+1 as height, rel.relkind,
                             CASE rel.relispartition WHEN true THEN ':partition.' ELSE ':table.' END
                             || rel.oid || ':/' || rel.relname || '/' || pt.path as path
-                        from pg_class rel JOIN pg_namespace nsp ON rel.relnamespace = nsp.oid
-                        join pg_inherits inh ON inh.inhparent = rel.oid
+                        from pg_catalog.pg_class rel JOIN pg_catalog.pg_namespace nsp ON rel.relnamespace = nsp.oid
+                        join pg_catalog.pg_inherits inh ON inh.inhparent = rel.oid
                         join table_path_data pt ON inh.inhrelid = pt.oid
                     )
                     select CASE WHEN relkind = 'p' THEN path ELSE ':table.' || tab.oid || ':/' || tab.relname END AS path
@@ -105,14 +105,14 @@ FROM (
         end
         || '/:index.'|| cls.oid ||':/' || cls.relname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['index'] }} AS show_node, NULL AS other_info
-    FROM pg_index idx
-    JOIN pg_class cls ON cls.oid=indexrelid
-    JOIN pg_class tab ON tab.oid=indrelid
-    JOIN pg_namespace n ON n.oid=tab.relnamespace
-    LEFT JOIN pg_depend dep ON (dep.classid = cls.tableoid AND dep.objid = cls.oid AND dep.refobjsubid = '0' AND dep.refclassid=(SELECT oid FROM pg_class WHERE relname='pg_constraint') AND dep.deptype='i')
-    LEFT OUTER JOIN pg_constraint con ON (con.tableoid = dep.refclassid AND con.oid = dep.refobjid)
-    LEFT OUTER JOIN pg_description des ON des.objoid=cls.oid
-    LEFT OUTER JOIN pg_description desp ON (desp.objoid=con.oid AND desp.objsubid = 0)
+    FROM pg_catalog.pg_index idx
+    JOIN pg_catalog.pg_class cls ON cls.oid=indexrelid
+    JOIN pg_catalog.pg_class tab ON tab.oid=indrelid
+    JOIN pg_catalog.pg_namespace n ON n.oid=tab.relnamespace
+    LEFT JOIN pg_catalog.pg_depend dep ON (dep.classid = cls.tableoid AND dep.objid = cls.oid AND dep.refobjsubid = '0' AND dep.refclassid=(SELECT oid FROM pg_catalog.pg_class WHERE relname='pg_constraint') AND dep.deptype='i')
+    LEFT OUTER JOIN pg_catalog.pg_constraint con ON (con.tableoid = dep.refclassid AND con.oid = dep.refobjid)
+    LEFT OUTER JOIN pg_catalog.pg_description des ON des.objoid=cls.oid
+    LEFT OUTER JOIN pg_catalog.pg_description desp ON (desp.objoid=con.oid AND desp.objsubid = 0)
     WHERE contype IS NULL
     AND {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
@@ -127,9 +127,9 @@ FROM (
     ':schema.'|| n.oid || ':/' || n.nspname || '/' || case when t.typname = 'trigger' then ':trigger_function.' else ':function.' end || p.oid ||':/' || p.proname AS obj_path, n.nspname AS schema_name,
     CASE WHEN t.typname IN ('trigger', 'event_trigger') THEN {{ show_node_prefs['trigger_function'] }} ELSE {{ show_node_prefs['function'] }} END AS show_node,
     pg_catalog.pg_get_function_identity_arguments(p.oid) AS other_info
-    from pg_proc p
-    left join pg_namespace n on p.pronamespace = n.oid
-    left join pg_type t on p.prorettype = t.oid
+    from pg_catalog.pg_proc p
+    left join pg_catalog.pg_namespace n on p.pronamespace = n.oid
+    left join pg_catalog.pg_type t on p.prorettype = t.oid
     WHERE ({{ CATALOGS.DB_SUPPORT('n') }})
 {% endif %}
 {% if all_obj %}
@@ -137,7 +137,7 @@ FROM (
 {% endif %}
 {% if all_obj or obj_type in ['event_trigger'] %}
     select 'event_trigger'::text AS obj_type, evtname AS obj_name, ':event_trigger.'||oid||':/' || evtname AS obj_path, ''::text AS schema_name,
-    {{ show_node_prefs['index'] }} AS show_node, NULL AS other_info from pg_event_trigger
+    {{ show_node_prefs['index'] }} AS show_node, NULL AS other_info from pg_catalog.pg_event_trigger
 {% endif %}
 {% if all_obj %}
     UNION
@@ -145,7 +145,7 @@ FROM (
 {% if all_obj or obj_type in ['schema'] %}
     select 'schema'::text AS obj_type, n.nspname AS obj_name,
     ':schema.'||n.oid||':/' || n.nspname as obj_path, n.nspname AS schema_name,
-    {{ show_node_prefs['schema'] }} AS show_node, NULL AS other_info from pg_namespace n
+    {{ show_node_prefs['schema'] }} AS show_node, NULL AS other_info from pg_catalog.pg_namespace n
     where {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
 {% if all_obj %}
@@ -161,9 +161,9 @@ FROM (
         else 'should not happen'
     end || t.oid || ':/' || t.relname || '/:column.'|| a.attnum ||':/' || a.attname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['column'] }} AS show_node, NULL AS other_info
-    from pg_attribute a
-    inner join pg_class t on a.attrelid = t.oid and t.relkind in ('r','t','p','v','m')
-    left join pg_namespace n on t.relnamespace = n.oid where a.attnum > 0
+    from pg_catalog.pg_attribute a
+    inner join pg_catalog.pg_class t on a.attrelid = t.oid and t.relkind in ('r','t','p','v','m')
+    left join pg_catalog.pg_namespace n on t.relnamespace = n.oid where a.attnum > 0
     and not t.relispartition
 {% endif %}
 {% if all_obj %}
@@ -188,8 +188,8 @@ FROM (
 			select rel.oid, pt.height+1 as height, rel.relkind,
 				CASE rel.relispartition WHEN true THEN ':partition.' ELSE ':table.' END
 				|| rel.oid || ':/' || rel.relname || '/' || pt.path as path
-			from pg_class rel JOIN pg_namespace nsp ON rel.relnamespace = nsp.oid
-			join pg_inherits inh ON inh.inhparent = rel.oid
+			from pg_catalog.pg_class rel JOIN pg_catalog.pg_namespace nsp ON rel.relnamespace = nsp.oid
+			join pg_catalog.pg_inherits inh ON inh.inhparent = rel.oid
 			join table_path_data pt ON inh.inhrelid = pt.oid
 		)
 		select CASE WHEN relkind = 'p' THEN path ELSE ':table.' || t.oid || ':/' || t.relname END AS path
@@ -203,10 +203,10 @@ FROM (
         WHEN c.contype = 'x' THEN  '/:exclusion_constraint.' ||c.conindid
     END ||':/'|| case when tf.relname is null then c.conname else c.conname || ' -> ' || tf.relname end AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['constraints'] }} AS show_node, NULL AS other_info
-    from pg_constraint c
-    left join pg_class t on c.conrelid = t.oid
-    left join pg_class tf on c.confrelid = tf.oid
-    left join pg_namespace n on t.relnamespace = n.oid
+    from pg_catalog.pg_constraint c
+    left join pg_catalog.pg_class t on c.conrelid = t.oid
+    left join pg_catalog.pg_class tf on c.confrelid = tf.oid
+    left join pg_catalog.pg_namespace n on t.relnamespace = n.oid
     where c.contypid = 0
     {% if obj_type == 'check_constraint' %}
     AND c.contype = 'c'
@@ -239,8 +239,8 @@ FROM (
                             select rel.oid, pt.height+1 as height, rel.relkind,
                                 CASE rel.relispartition WHEN true THEN ':partition.' ELSE ':table.' END
                                 || rel.oid || ':/' || rel.relname || '/' || pt.path as path
-                            from pg_class rel JOIN pg_namespace nsp ON rel.relnamespace = nsp.oid
-                            join pg_inherits inh ON inh.inhparent = rel.oid
+                            from pg_catalog.pg_class rel JOIN pg_catalog.pg_namespace nsp ON rel.relnamespace = nsp.oid
+                            join pg_catalog.pg_inherits inh ON inh.inhparent = rel.oid
                             join table_path_data pt ON inh.inhrelid = pt.oid
                         )
                         select CASE WHEN relkind = 'p' THEN path ELSE ':table.' || t.oid || ':/' || t.relname END AS path
@@ -250,9 +250,9 @@ FROM (
             ||'/:rule.'||r.oid||':/'|| r.rulename AS obj_path,
             n.nspname AS schema_name,
             {{ show_node_prefs['rule'] }} AS show_node, NULL AS other_info
-            from pg_rewrite r
-    inner join pg_class t on r.ev_class = t.oid and t.relkind in ('r','t','p','v')
-    left join pg_namespace n on t.relnamespace = n.oid
+            from pg_catalog.pg_rewrite r
+    inner join pg_catalog.pg_class t on r.ev_class = t.oid and t.relkind in ('r','t','p','v')
+    left join pg_catalog.pg_namespace n on t.relnamespace = n.oid
     where {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
 {% if all_obj %}
@@ -271,8 +271,8 @@ FROM (
                     select rel.oid, pt.height+1 as height, rel.relkind,
                         CASE rel.relispartition WHEN true THEN ':partition.' ELSE ':table.' END
                         || rel.oid || ':/' || rel.relname || '/' || pt.path as path
-                    from pg_class rel JOIN pg_namespace nsp ON rel.relnamespace = nsp.oid
-                    join pg_inherits inh ON inh.inhparent = rel.oid
+                    from pg_catalog.pg_class rel JOIN pg_catalog.pg_namespace nsp ON rel.relnamespace = nsp.oid
+                    join pg_catalog.pg_inherits inh ON inh.inhparent = rel.oid
                     join table_path_data pt ON inh.inhrelid = pt.oid
                 )
                 select CASE WHEN relkind = 'p' THEN path ELSE ':table.' || t.oid || ':/' || t.relname END AS path
@@ -280,9 +280,9 @@ FROM (
             )
         end || '/:trigger.'|| tr.oid || ':/' || tr.tgname AS obj_path, n.nspname AS schema_name,
         {{ show_node_prefs['trigger'] }} AS show_node, NULL AS other_info
-        from pg_trigger tr
-    inner join pg_class t on tr.tgrelid = t.oid and t.relkind in ('r', 't', 'p', 'v')
-    left join pg_namespace n on t.relnamespace = n.oid
+        from pg_catalog.pg_trigger tr
+    inner join pg_catalog.pg_class t on tr.tgrelid = t.oid and t.relkind in ('r', 't', 'p', 'v')
+    left join pg_catalog.pg_namespace n on t.relnamespace = n.oid
     where tr.tgisinternal = false
     and {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
@@ -294,9 +294,9 @@ FROM (
         '/:type.'|| t.oid ||':/' || t.typname AS obj_path, n.nspname AS schema_name,
         {{ show_node_prefs['type'] }} AS show_node, NULL AS other_info
     FROM pg_type t
-    LEFT OUTER JOIN pg_type e ON e.oid=t.typelem
-    LEFT OUTER JOIN pg_class ct ON ct.oid=t.typrelid AND ct.relkind <> 'c'
-    LEFT OUTER JOIN pg_namespace n on t.typnamespace = n.oid
+    LEFT OUTER JOIN pg_catalog.pg_type e ON e.oid=t.typelem
+    LEFT OUTER JOIN pg_catalog.pg_class ct ON ct.oid=t.typrelid AND ct.relkind <> 'c'
+    LEFT OUTER JOIN pg_catalog.pg_namespace n on t.typnamespace = n.oid
     WHERE t.typtype != 'd' AND t.typname NOT LIKE E'\\_%'
     {% if not show_system_objects %}
         AND ct.oid is NULL
@@ -310,9 +310,9 @@ FROM (
     SELECT 'cast'::text AS obj_type, format_type(st.oid,NULL) ||'->'|| format_type(tt.oid,tt.typtypmod) AS obj_name,
     ':cast.'||ca.oid||':/' || format_type(st.oid,NULL) ||'->'|| format_type(tt.oid,tt.typtypmod) AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['cast'] }} AS show_node, NULL AS other_info
-    FROM pg_cast ca
-    JOIN pg_type st ON st.oid=castsource
-    JOIN pg_type tt ON tt.oid=casttarget
+    FROM pg_catalog.pg_cast ca
+    JOIN pg_catalog.pg_type st ON st.oid=castsource
+    JOIN pg_catalog.pg_type tt ON tt.oid=casttarget
     {% if not show_system_objects %}
     WHERE ca.oid > {{last_system_oid}}::OID
     {% endif %}
@@ -324,7 +324,7 @@ FROM (
 {% if all_obj or obj_type in ['publication'] %}
     SELECT 'publication'::text AS obj_type, pubname AS obj_name, ':publication.'||pub.oid||':/' || pubname AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['publication'] }} AS show_node, NULL AS other_info
-    FROM pg_publication pub
+    FROM pg_catalog.pg_publication pub
 {% endif %}
 {% if all_obj %}
     UNION
@@ -333,7 +333,7 @@ FROM (
 {% if all_obj or obj_type in ['subscription'] %}
     SELECT 'subscription'::text AS obj_type, subname AS obj_name, ':subscription.'||pub.oid||':/' || subname AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['subscription'] }} AS show_node, NULL AS other_info
-    FROM pg_subscription pub
+    FROM pg_catalog.pg_subscription pub
 {% endif %}
 {% if all_obj %}
     UNION
@@ -341,7 +341,7 @@ FROM (
 {% if all_obj or obj_type in ['language'] %}
     SELECT 'language'::text AS obj_type, lanname AS obj_name, ':language.'||lan.oid||':/' || lanname AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['language'] }} AS show_node, NULL AS other_info
-    FROM pg_language lan
+    FROM pg_catalog.pg_language lan
     WHERE lanispl IS TRUE
 {% endif %}
 {% if all_obj %}
@@ -350,8 +350,8 @@ FROM (
 {% if all_obj or obj_type in ['fts_configuration'] %}
     SELECT 'fts_configuration'::text AS obj_type, cfg.cfgname AS obj_name, ':schema.'||n.oid||':/' || n.nspname || '/:fts_configuration.'||cfg.oid||':/' || cfg.cfgname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['fts_configuration'] }} AS show_node, NULL AS other_info
-    FROM pg_ts_config cfg
-    left join pg_namespace n on cfg.cfgnamespace = n.oid
+    FROM pg_catalog.pg_ts_config cfg
+    left join pg_catalog.pg_namespace n on cfg.cfgnamespace = n.oid
     WHERE {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
 {% if all_obj %}
@@ -360,8 +360,8 @@ FROM (
 {% if all_obj or obj_type in ['fts_dictionary'] %}
     SELECT 'fts_dictionary' AS obj_type, dict.dictname AS obj_name, ':schema.'||ns.oid||':/' || ns.nspname || '/:fts_dictionary.'||dict.oid||':/' || dict.dictname AS obj_path, ns.nspname AS schema_name,
     {{ show_node_prefs['fts_dictionary'] }} AS show_node, NULL AS other_info
-    FROM pg_ts_dict dict
-    left join pg_namespace ns on dict.dictnamespace = ns.oid
+    FROM pg_catalog.pg_ts_dict dict
+    left join pg_catalog.pg_namespace ns on dict.dictnamespace = ns.oid
     WHERE {{ CATALOGS.DB_SUPPORT('ns') }}
 {% endif %}
 {% if all_obj %}
@@ -370,8 +370,8 @@ FROM (
 {% if all_obj or obj_type in ['fts_parser'] %}
     SELECT 'fts_parser' AS obj_type, prs.prsname AS obj_name, ':schema.'||ns.oid||':/' || ns.nspname || '/:fts_parser.'||prs.oid||':/' || prs.prsname AS obj_path, ns.nspname AS schema_name,
     {{ show_node_prefs['fts_parser'] }} AS show_node, NULL AS other_info
-    FROM pg_ts_parser prs
-    left join pg_namespace ns on prs.prsnamespace = ns.oid
+    FROM pg_catalog.pg_ts_parser prs
+    left join pg_catalog.pg_namespace ns on prs.prsnamespace = ns.oid
     WHERE {{ CATALOGS.DB_SUPPORT('ns') }}
 {% endif %}
 {% if all_obj %}
@@ -380,8 +380,8 @@ FROM (
 {% if all_obj or obj_type in ['fts_template'] %}
     SELECT 'fts_template' AS obj_type, tmpl.tmplname AS obj_name, ':schema.'||ns.oid||':/' || ns.nspname || '/:fts_template.'||tmpl.oid||':/' || tmpl.tmplname AS obj_path, ns.nspname AS schema_name,
     {{ show_node_prefs['fts_template'] }} AS show_node, NULL AS other_info
-    FROM pg_ts_template tmpl
-    left join pg_namespace ns on tmpl.tmplnamespace = ns.oid
+    FROM pg_catalog.pg_ts_template tmpl
+    left join pg_catalog.pg_namespace ns on tmpl.tmplnamespace = ns.oid
     AND {{ CATALOGS.DB_SUPPORT('ns') }}
 {% endif %}
 {% if all_obj %}
@@ -390,8 +390,8 @@ FROM (
 {% if all_obj or obj_type in ['domain'] %}
     select 'domain' AS obj_type, t.typname AS obj_name, ':schema.'||n.oid||':/' || n.nspname || '/:domain.'||t.oid||':/' || t.typname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['domain'] }} AS show_node, NULL AS other_info
-    from pg_type t
-    inner join pg_namespace n on t.typnamespace = n.oid
+    from pg_catalog.pg_type t
+    inner join pg_catalog.pg_namespace n on t.typnamespace = n.oid
     where t.typtype = 'd'
     AND {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
@@ -403,8 +403,8 @@ FROM (
         c.conname AS obj_name, ':schema.'||n.oid||':/' || n.nspname || '/:domain.'||t.oid||':/' || t.typname || '/:domain_constraints.'||c.oid||':/' || c.conname AS obj_path,
         n.nspname AS schema_name,
         {{ show_node_prefs['domain_constraints'] }} AS show_node, NULL AS other_info
-    FROM pg_constraint c JOIN pg_type t
-    ON t.oid=contypid JOIN pg_namespace n
+    FROM pg_catalog.pg_constraint c JOIN pg_catalog.pg_type t
+    ON t.oid=contypid JOIN pg_catalog.pg_namespace n
     ON n.oid=t.typnamespace
     WHERE t.typtype = 'd'
     AND {{ CATALOGS.DB_SUPPORT('n') }}
@@ -415,7 +415,7 @@ FROM (
 {% if all_obj or obj_type in ['foreign_data_wrapper'] %}
     select 'foreign_data_wrapper' AS obj_type, fdwname AS obj_name, ':foreign_data_wrapper.'||oid||':/' || fdwname AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['foreign_data_wrapper'] }} AS show_node, NULL AS other_info
-    from pg_foreign_data_wrapper
+    from pg_catalog.pg_foreign_data_wrapper
 {% endif %}
 {% if all_obj %}
     UNION
@@ -423,8 +423,8 @@ FROM (
 {% if all_obj or obj_type in ['foreign_server'] %}
     select 'foreign_server' AS obj_type, sr.srvname AS obj_name, ':foreign_data_wrapper.'||fdw.oid||':/' || fdw.fdwname || '/:foreign_server.'||sr.oid||':/' || sr.srvname AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['foreign_server'] }} AS show_node, NULL AS other_info
-    from pg_foreign_server sr
-    inner join pg_foreign_data_wrapper fdw on sr.srvfdw = fdw.oid
+    from pg_catalog.pg_foreign_server sr
+    inner join pg_catalog.pg_foreign_data_wrapper fdw on sr.srvfdw = fdw.oid
 {% endif %}
 {% if all_obj %}
     UNION
@@ -432,9 +432,9 @@ FROM (
 {% if all_obj or obj_type in ['user_mapping'] %}
     select 'user_mapping' AS obj_type, um.usename AS obj_name, ':foreign_data_wrapper.'||fdw.oid||':/' || fdw.fdwname || '/:foreign_server.'||sr.oid||':/' || sr.srvname || '/:user_mapping.'||um.umid||':/' || um.usename AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['user_mapping'] }} AS show_node, NULL AS other_info
-    from pg_user_mappings um
-    inner join pg_foreign_server sr on um.srvid = sr.oid
-    inner join pg_foreign_data_wrapper fdw on sr.srvfdw = fdw.oid
+    from pg_catalog.pg_user_mappings um
+    inner join pg_catalog.pg_foreign_server sr on um.srvid = sr.oid
+    inner join pg_catalog.pg_foreign_data_wrapper fdw on sr.srvfdw = fdw.oid
 {% endif %}
 {% if all_obj %}
     UNION
@@ -442,9 +442,9 @@ FROM (
 {% if all_obj or obj_type in ['foreign_table'] %}
     select 'foreign_table' AS obj_type, c.relname AS obj_name, ':schema.'||ns.oid||':/' || ns.nspname || '/:foreign_table.'||c.oid||':/' || c.relname AS obj_path, ns.nspname AS schema_name,
     {{ show_node_prefs['foreign_table'] }} AS show_node, NULL AS other_info
-    from pg_foreign_table ft
-    inner join pg_class c on ft.ftrelid = c.oid
-    inner join pg_namespace ns on c.relnamespace = ns.oid
+    from pg_catalog.pg_foreign_table ft
+    inner join pg_catalog.pg_class c on ft.ftrelid = c.oid
+    inner join pg_catalog.pg_namespace ns on c.relnamespace = ns.oid
     AND {{ CATALOGS.DB_SUPPORT('ns') }}
 {% endif %}
 {% if all_obj %}
@@ -453,9 +453,9 @@ FROM (
 {% if all_obj or obj_type in ['extension'] %}
     select 'extension' AS obj_type, x.extname AS obj_name, ':extension.'||x.oid||':/' || x.extname AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['extension'] }} AS show_node, NULL AS other_info
-    FROM pg_extension x
-    JOIN pg_namespace n on x.extnamespace=n.oid
-    join pg_available_extensions() e(name, default_version, comment) ON x.extname=e.name
+    FROM pg_catalog.pg_extension x
+    JOIN pg_catalog.pg_namespace n on x.extnamespace=n.oid
+    join pg_catalog.pg_available_extensions() e(name, default_version, comment) ON x.extname=e.name
 {% endif %}
 {% if all_obj %}
     UNION
@@ -463,8 +463,8 @@ FROM (
 {% if all_obj or obj_type in ['collation'] %}
     SELECT 'collation' AS obj_type, c.collname AS obj_name, ':schema.'||n.oid||':/' || n.nspname || '/:collation.'||c.oid||':/' || c.collname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['collation'] }} AS show_node, NULL AS other_info
-    FROM pg_collation c
-    JOIN pg_namespace n ON n.oid=c.collnamespace
+    FROM pg_catalog.pg_collation c
+    JOIN pg_catalog.pg_namespace n ON n.oid=c.collnamespace
     WHERE {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
 {% if all_obj %}
@@ -482,8 +482,8 @@ FROM (
                             select rel.oid, pt.height+1 as height, rel.relkind,
                                 CASE rel.relispartition WHEN true THEN ':partition.' ELSE ':table.' END
                                 || rel.oid || ':/' || rel.relname || '/' || pt.path as path
-                            from pg_class rel JOIN pg_namespace nsp ON rel.relnamespace = nsp.oid
-                            join pg_inherits inh ON inh.inhparent = rel.oid
+                            from pg_catalog.pg_class rel JOIN pg_namespace nsp ON rel.relnamespace = nsp.oid
+                            join pg_catalog.pg_inherits inh ON inh.inhparent = rel.oid
                             join table_path_data pt ON inh.inhrelid = pt.oid
                         )
                         select CASE WHEN relkind = 'p' THEN path ELSE ':table.' || t.oid || ':/' || t.relname END AS path
@@ -492,10 +492,10 @@ FROM (
             end
             ||'/:row_security_policy.'|| pl.oid ||':/'|| pl.polname AS obj_path, n.nspname AS schema_name,
             {{ show_node_prefs['row_security_policy'] }} AS show_node, NULL AS other_info
-            FROM pg_policy pl
-    JOIN pg_class t on pl.polrelid = t.oid and t.relkind in ('r','t','p')
-    JOIN pg_policies rw ON (pl.polname=rw.policyname AND t.relname=rw.tablename)
-    JOIN pg_namespace n on t.relnamespace = n.oid
+            FROM pg_catalog.pg_policy pl
+    JOIN pg_catalog.pg_class t on pl.polrelid = t.oid and t.relkind in ('r','t','p')
+    JOIN pg_catalog.pg_policies rw ON (pl.polname=rw.policyname AND t.relname=rw.tablename)
+    JOIN pg_catalog.pg_namespace n on t.relnamespace = n.oid
     where {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
 
diff --git a/web/pgadmin/tools/search_objects/templates/search_objects/sql/pg/11_plus/search.sql b/web/pgadmin/tools/search_objects/templates/search_objects/sql/pg/11_plus/search.sql
index e8631f136..b71b09781 100644
--- a/web/pgadmin/tools/search_objects/templates/search_objects/sql/pg/11_plus/search.sql
+++ b/web/pgadmin/tools/search_objects/templates/search_objects/sql/pg/11_plus/search.sql
@@ -4,7 +4,7 @@
 {% set all_obj = true %}
 {% endif %}
 SELECT obj_type, obj_name,
-    REPLACE(obj_path, '/'||sn.schema_name||'/', '/'||{{ CATALOGS.LABELS_SCHEMACOL('sn.schema_name', _) }}||'/') AS obj_path,
+    pg_catalog.REPLACE(obj_path, '/'||sn.schema_name||'/', '/'||{{ CATALOGS.LABELS_SCHEMACOL('sn.schema_name', _) }}||'/') AS obj_path,
     schema_name, show_node, other_info,
     CASE
         WHEN {{ CATALOGS.IS_CATALOG_SCHEMA('sn.schema_name') }} THEN
@@ -33,8 +33,8 @@ FROM (
         WHEN c.relkind = 'm' THEN {{ show_node_prefs['mview'] }}
         ELSE False
     END AS show_node, NULL AS other_info
-    FROM pg_class c
-    LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
+    FROM pg_catalog.pg_class c
+    LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
     {% if all_obj %}
     WHERE c.relkind in ('S','v','m')
     {% elif obj_type == 'sequence' %}
@@ -59,8 +59,8 @@ FROM (
 			select rel.oid, pt.height+1 as height, rel.relkind,
 				CASE rel.relispartition WHEN true THEN ':partition.' ELSE ':table.' END
 				|| rel.oid || ':/' || rel.relname || '/' || pt.path as path
-			from pg_class rel JOIN pg_namespace nsp ON rel.relnamespace = nsp.oid
-			join pg_inherits inh ON inh.inhparent = rel.oid
+			from pg_catalog.pg_class rel JOIN pg_catalog.pg_namespace nsp ON rel.relnamespace = nsp.oid
+			join pg_catalog.pg_inherits inh ON inh.inhparent = rel.oid
 			join table_path_data pt ON inh.inhrelid = pt.oid
 		)
 		select CASE WHEN relkind = 'p' THEN path ELSE ':table.' || c.oid || ':/' || c.relname END AS path
@@ -69,8 +69,8 @@ FROM (
 	CASE WHEN c.relispartition THEN {{ show_node_prefs['partition'] }}
 	    ELSE {{ show_node_prefs['table'] }} END AS show_node,
     NULL AS other_info
-    FROM pg_class c
-    LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
+    FROM pg_catalog.pg_class c
+    LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
     WHERE c.relkind in ('p','r','t')
     {% if obj_type == 'table' %}
     AND NOT c.relispartition
@@ -95,8 +95,8 @@ FROM (
                         select rel.oid, pt.height+1 as height, rel.relkind,
                             CASE rel.relispartition WHEN true THEN ':partition.' ELSE ':table.' END
                             || rel.oid || ':/' || rel.relname || '/' || pt.path as path
-                        from pg_class rel JOIN pg_namespace nsp ON rel.relnamespace = nsp.oid
-                        join pg_inherits inh ON inh.inhparent = rel.oid
+                        from pg_catalog.pg_class rel JOIN pg_catalog.pg_namespace nsp ON rel.relnamespace = nsp.oid
+                        join pg_catalog.pg_inherits inh ON inh.inhparent = rel.oid
                         join table_path_data pt ON inh.inhrelid = pt.oid
                     )
                     select CASE WHEN relkind = 'p' THEN path ELSE ':table.' || tab.oid || ':/' || tab.relname END AS path
@@ -105,14 +105,14 @@ FROM (
         end
         || '/:index.'|| cls.oid ||':/' || cls.relname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['index'] }} AS show_node, NULL AS other_info
-    FROM pg_index idx
-    JOIN pg_class cls ON cls.oid=indexrelid
-    JOIN pg_class tab ON tab.oid=indrelid
-    JOIN pg_namespace n ON n.oid=tab.relnamespace
-    LEFT JOIN pg_depend dep ON (dep.classid = cls.tableoid AND dep.objid = cls.oid AND dep.refobjsubid = '0' AND dep.refclassid=(SELECT oid FROM pg_class WHERE relname='pg_constraint') AND dep.deptype='i')
-    LEFT OUTER JOIN pg_constraint con ON (con.tableoid = dep.refclassid AND con.oid = dep.refobjid)
-    LEFT OUTER JOIN pg_description des ON des.objoid=cls.oid
-    LEFT OUTER JOIN pg_description desp ON (desp.objoid=con.oid AND desp.objsubid = 0)
+    FROM pg_catalog.pg_index idx
+    JOIN pg_catalog.pg_class cls ON cls.oid=indexrelid
+    JOIN pg_catalog.pg_class tab ON tab.oid=indrelid
+    JOIN pg_catalog.pg_namespace n ON n.oid=tab.relnamespace
+    LEFT JOIN pg_catalog.pg_depend dep ON (dep.classid = cls.tableoid AND dep.objid = cls.oid AND dep.refobjsubid = '0' AND dep.refclassid=(SELECT oid FROM pg_catalog.pg_class WHERE relname='pg_constraint') AND dep.deptype='i')
+    LEFT OUTER JOIN pg_catalog.pg_constraint con ON (con.tableoid = dep.refclassid AND con.oid = dep.refobjid)
+    LEFT OUTER JOIN pg_catalog.pg_description des ON des.objoid=cls.oid
+    LEFT OUTER JOIN pg_catalog.pg_description desp ON (desp.objoid=con.oid AND desp.objsubid = 0)
     WHERE contype IS NULL
     AND {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
@@ -138,9 +138,9 @@ FROM (
             ELSE {{ show_node_prefs['function'] }}
         END AS show_node,
         pg_catalog.pg_get_function_identity_arguments(p.oid) AS other_info
-    from pg_proc p join pg_namespace n
-    on p.pronamespace = n.oid join pg_type t
-    on p.prorettype = t.oid join pg_language lng
+    from pg_catalog.pg_proc p join pg_catalog.pg_namespace n
+    on p.pronamespace = n.oid join pg_catalog.pg_type t
+    on p.prorettype = t.oid join pg_catalog.pg_language lng
     ON lng.oid=p.prolang
     WHERE p.prokind IN ('f', 'w', 'p')
     AND CASE
@@ -178,9 +178,9 @@ FROM (
         else 'should not happen'
     end || t.oid || ':/' || t.relname || '/:column.'|| a.attnum ||':/' || a.attname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['column'] }} AS show_node, NULL AS other_info
-    from pg_attribute a
-    inner join pg_class t on a.attrelid = t.oid and t.relkind in ('r','t','p','v','m')
-    left join pg_namespace n on t.relnamespace = n.oid where a.attnum > 0
+    from pg_catalog.pg_attribute a
+    inner join pg_catalog.pg_class t on a.attrelid = t.oid and t.relkind in ('r','t','p','v','m')
+    left join pg_catalog.pg_namespace n on t.relnamespace = n.oid where a.attnum > 0
     and not t.relispartition
 {% endif %}
 {% if all_obj %}
@@ -205,8 +205,8 @@ FROM (
 			select rel.oid, pt.height+1 as height, rel.relkind,
 				CASE rel.relispartition WHEN true THEN ':partition.' ELSE ':table.' END
 				|| rel.oid || ':/' || rel.relname || '/' || pt.path as path
-			from pg_class rel JOIN pg_namespace nsp ON rel.relnamespace = nsp.oid
-			join pg_inherits inh ON inh.inhparent = rel.oid
+			from pg_catalog.pg_class rel JOIN pg_catalog.pg_namespace nsp ON rel.relnamespace = nsp.oid
+			join pg_catalog.pg_inherits inh ON inh.inhparent = rel.oid
 			join table_path_data pt ON inh.inhrelid = pt.oid
 		)
 		select CASE WHEN relkind = 'p' THEN path ELSE ':table.' || t.oid || ':/' || t.relname END AS path
@@ -220,10 +220,10 @@ FROM (
         WHEN c.contype = 'x' THEN  '/:exclusion_constraint.' ||c.conindid
     END ||':/'|| case when tf.relname is null then c.conname else c.conname || ' -> ' || tf.relname end AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['constraints'] }} AS show_node, NULL AS other_info
-    from pg_constraint c
-    left join pg_class t on c.conrelid = t.oid
-    left join pg_class tf on c.confrelid = tf.oid
-    left join pg_namespace n on t.relnamespace = n.oid
+    from pg_catalog.pg_constraint c
+    left join pg_catalog.pg_class t on c.conrelid = t.oid
+    left join pg_catalog.pg_class tf on c.confrelid = tf.oid
+    left join pg_catalog.pg_namespace n on t.relnamespace = n.oid
     where c.contypid = 0
     {% if obj_type == 'check_constraint' %}
     AND c.contype = 'c'
@@ -256,8 +256,8 @@ FROM (
                             select rel.oid, pt.height+1 as height, rel.relkind,
                                 CASE rel.relispartition WHEN true THEN ':partition.' ELSE ':table.' END
                                 || rel.oid || ':/' || rel.relname || '/' || pt.path as path
-                            from pg_class rel JOIN pg_namespace nsp ON rel.relnamespace = nsp.oid
-                            join pg_inherits inh ON inh.inhparent = rel.oid
+                            from pg_catalog.pg_class rel JOIN pg_catalog.pg_namespace nsp ON rel.relnamespace = nsp.oid
+                            join pg_catalog.pg_inherits inh ON inh.inhparent = rel.oid
                             join table_path_data pt ON inh.inhrelid = pt.oid
                         )
                         select CASE WHEN relkind = 'p' THEN path ELSE ':table.' || t.oid || ':/' || t.relname END AS path
@@ -267,9 +267,9 @@ FROM (
             ||'/:rule.'||r.oid||':/'|| r.rulename AS obj_path,
             n.nspname AS schema_name,
             {{ show_node_prefs['rule'] }} AS show_node, NULL AS other_info
-            from pg_rewrite r
-    inner join pg_class t on r.ev_class = t.oid and t.relkind in ('r','t','p','v')
-    left join pg_namespace n on t.relnamespace = n.oid
+            from pg_catalog.pg_rewrite r
+    inner join pg_catalog.pg_class t on r.ev_class = t.oid and t.relkind in ('r','t','p','v')
+    left join pg_catalog.pg_namespace n on t.relnamespace = n.oid
     where {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
 {% if all_obj %}
@@ -288,8 +288,8 @@ FROM (
                     select rel.oid, pt.height+1 as height, rel.relkind,
                         CASE rel.relispartition WHEN true THEN ':partition.' ELSE ':table.' END
                         || rel.oid || ':/' || rel.relname || '/' || pt.path as path
-                    from pg_class rel JOIN pg_namespace nsp ON rel.relnamespace = nsp.oid
-                    join pg_inherits inh ON inh.inhparent = rel.oid
+                    from pg_catalog.pg_class rel JOIN pg_catalog.pg_namespace nsp ON rel.relnamespace = nsp.oid
+                    join pg_catalog.pg_inherits inh ON inh.inhparent = rel.oid
                     join table_path_data pt ON inh.inhrelid = pt.oid
                 )
                 select CASE WHEN relkind = 'p' THEN path ELSE ':table.' || t.oid || ':/' || t.relname END AS path
@@ -297,9 +297,9 @@ FROM (
             )
         end || '/:trigger.'|| tr.oid || ':/' || tr.tgname AS obj_path, n.nspname AS schema_name,
         {{ show_node_prefs['trigger'] }} AS show_node, NULL AS other_info
-        from pg_trigger tr
-    inner join pg_class t on tr.tgrelid = t.oid and t.relkind in ('r', 't', 'p', 'v')
-    left join pg_namespace n on t.relnamespace = n.oid
+        from pg_catalog.pg_trigger tr
+    inner join pg_catalog.pg_class t on tr.tgrelid = t.oid and t.relkind in ('r', 't', 'p', 'v')
+    left join pg_catalog.pg_namespace n on t.relnamespace = n.oid
     where tr.tgisinternal = false
     and {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
@@ -310,10 +310,10 @@ FROM (
     SELECT 'type'::text AS obj_type, t.typname AS obj_name, ':schema.'||n.oid||':/' || n.nspname ||
         '/:type.'|| t.oid ||':/' || t.typname AS obj_path, n.nspname AS schema_name,
         {{ show_node_prefs['type'] }} AS show_node, NULL AS other_info
-    FROM pg_type t
-    LEFT OUTER JOIN pg_type e ON e.oid=t.typelem
-    LEFT OUTER JOIN pg_class ct ON ct.oid=t.typrelid AND ct.relkind <> 'c'
-    LEFT OUTER JOIN pg_namespace n on t.typnamespace = n.oid
+    FROM pg_catalog.pg_type t
+    LEFT OUTER JOIN pg_catalog.pg_type e ON e.oid=t.typelem
+    LEFT OUTER JOIN pg_catalog.pg_class ct ON ct.oid=t.typrelid AND ct.relkind <> 'c'
+    LEFT OUTER JOIN pg_catalog.pg_namespace n on t.typnamespace = n.oid
     WHERE t.typtype != 'd' AND t.typname NOT LIKE E'\\_%'
     {% if not show_system_objects %}
         AND ct.oid is NULL
@@ -327,9 +327,9 @@ FROM (
     SELECT 'cast'::text AS obj_type, format_type(st.oid,NULL) ||'->'|| format_type(tt.oid,tt.typtypmod) AS obj_name,
     ':cast.'||ca.oid||':/' || format_type(st.oid,NULL) ||'->'|| format_type(tt.oid,tt.typtypmod) AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['cast'] }} AS show_node, NULL AS other_info
-    FROM pg_cast ca
-    JOIN pg_type st ON st.oid=castsource
-    JOIN pg_type tt ON tt.oid=casttarget
+    FROM pg_catalog.pg_cast ca
+    JOIN pg_catalog.pg_type st ON st.oid=castsource
+    JOIN pg_catalog.pg_type tt ON tt.oid=casttarget
     {% if not show_system_objects %}
     WHERE ca.oid > {{last_system_oid}}::OID
     {% endif %}
@@ -341,7 +341,7 @@ FROM (
 {% if all_obj or obj_type in ['publication'] %}
     SELECT 'publication'::text AS obj_type, pubname AS obj_name, ':publication.'||pub.oid||':/' || pubname AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['publication'] }} AS show_node, NULL AS other_info
-    FROM pg_publication pub
+    FROM pg_catalog.pg_publication pub
 {% endif %}
 {% if all_obj %}
     UNION
@@ -350,7 +350,7 @@ FROM (
 {% if all_obj or obj_type in ['subscription'] %}
     SELECT 'subscription'::text AS obj_type, subname AS obj_name, ':subscription.'||pub.oid||':/' || subname AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['subscription'] }} AS show_node, NULL AS other_info
-    FROM pg_subscription pub
+    FROM pg_catalog.pg_subscription pub
 {% endif %}
 {% if all_obj %}
     UNION
@@ -358,7 +358,7 @@ FROM (
 {% if all_obj or obj_type in ['language'] %}
     SELECT 'language'::text AS obj_type, lanname AS obj_name, ':language.'||lan.oid||':/' || lanname AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['language'] }} AS show_node, NULL AS other_info
-    FROM pg_language lan
+    FROM pg_catalog.pg_language lan
     WHERE lanispl IS TRUE
 {% endif %}
 {% if all_obj %}
@@ -367,8 +367,8 @@ FROM (
 {% if all_obj or obj_type in ['fts_configuration'] %}
     SELECT 'fts_configuration'::text AS obj_type, cfg.cfgname AS obj_name, ':schema.'||n.oid||':/' || n.nspname || '/:fts_configuration.'||cfg.oid||':/' || cfg.cfgname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['fts_configuration'] }} AS show_node, NULL AS other_info
-    FROM pg_ts_config cfg
-    left join pg_namespace n on cfg.cfgnamespace = n.oid
+    FROM pg_catalog.pg_ts_config cfg
+    left join pg_catalog.pg_namespace n on cfg.cfgnamespace = n.oid
     WHERE {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
 {% if all_obj %}
@@ -377,8 +377,8 @@ FROM (
 {% if all_obj or obj_type in ['fts_dictionary'] %}
     SELECT 'fts_dictionary' AS obj_type, dict.dictname AS obj_name, ':schema.'||ns.oid||':/' || ns.nspname || '/:fts_dictionary.'||dict.oid||':/' || dict.dictname AS obj_path, ns.nspname AS schema_name,
     {{ show_node_prefs['fts_dictionary'] }} AS show_node, NULL AS other_info
-    FROM pg_ts_dict dict
-    left join pg_namespace ns on dict.dictnamespace = ns.oid
+    FROM pg_catalog.pg_ts_dict dict
+    left join pg_catalog.pg_namespace ns on dict.dictnamespace = ns.oid
     WHERE {{ CATALOGS.DB_SUPPORT('ns') }}
 {% endif %}
 {% if all_obj %}
@@ -387,8 +387,8 @@ FROM (
 {% if all_obj or obj_type in ['fts_parser'] %}
     SELECT 'fts_parser' AS obj_type, prs.prsname AS obj_name, ':schema.'||ns.oid||':/' || ns.nspname || '/:fts_parser.'||prs.oid||':/' || prs.prsname AS obj_path, ns.nspname AS schema_name,
     {{ show_node_prefs['fts_parser'] }} AS show_node, NULL AS other_info
-    FROM pg_ts_parser prs
-    left join pg_namespace ns on prs.prsnamespace = ns.oid
+    FROM pg_catalog.pg_ts_parser prs
+    left join pg_catalog.pg_namespace ns on prs.prsnamespace = ns.oid
     WHERE {{ CATALOGS.DB_SUPPORT('ns') }}
 {% endif %}
 {% if all_obj %}
@@ -397,8 +397,8 @@ FROM (
 {% if all_obj or obj_type in ['fts_template'] %}
     SELECT 'fts_template' AS obj_type, tmpl.tmplname AS obj_name, ':schema.'||ns.oid||':/' || ns.nspname || '/:fts_template.'||tmpl.oid||':/' || tmpl.tmplname AS obj_path, ns.nspname AS schema_name,
     {{ show_node_prefs['fts_template'] }} AS show_node, NULL AS other_info
-    FROM pg_ts_template tmpl
-    left join pg_namespace ns on tmpl.tmplnamespace = ns.oid
+    FROM pg_catalog.pg_ts_template tmpl
+    left join pg_catalog.pg_namespace ns on tmpl.tmplnamespace = ns.oid
     AND {{ CATALOGS.DB_SUPPORT('ns') }}
 {% endif %}
 {% if all_obj %}
@@ -407,8 +407,8 @@ FROM (
 {% if all_obj or obj_type in ['domain'] %}
     select 'domain' AS obj_type, t.typname AS obj_name, ':schema.'||n.oid||':/' || n.nspname || '/:domain.'||t.oid||':/' || t.typname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['domain'] }} AS show_node, NULL AS other_info
-    from pg_type t
-    inner join pg_namespace n on t.typnamespace = n.oid
+    from pg_catalog.pg_type t
+    inner join pg_catalog.pg_namespace n on t.typnamespace = n.oid
     where t.typtype = 'd'
     AND {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
@@ -420,8 +420,8 @@ FROM (
         c.conname AS obj_name, ':schema.'||n.oid||':/' || n.nspname || '/:domain.'||t.oid||':/' || t.typname || '/:domain_constraints.'||c.oid||':/' || c.conname AS obj_path,
         n.nspname AS schema_name,
         {{ show_node_prefs['domain_constraints'] }} AS show_node, NULL AS other_info
-    FROM pg_constraint c JOIN pg_type t
-    ON t.oid=contypid JOIN pg_namespace n
+    FROM pg_catalog.pg_constraint c JOIN pg_catalog.pg_type t
+    ON t.oid=contypid JOIN pg_catalog.pg_namespace n
     ON n.oid=t.typnamespace
     WHERE t.typtype = 'd'
     AND {{ CATALOGS.DB_SUPPORT('n') }}
@@ -432,7 +432,7 @@ FROM (
 {% if all_obj or obj_type in ['foreign_data_wrapper'] %}
     select 'foreign_data_wrapper' AS obj_type, fdwname AS obj_name, ':foreign_data_wrapper.'||oid||':/' || fdwname AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['foreign_data_wrapper'] }} AS show_node, NULL AS other_info
-    from pg_foreign_data_wrapper
+    from pg_catalog.pg_foreign_data_wrapper
 {% endif %}
 {% if all_obj %}
     UNION
@@ -440,8 +440,8 @@ FROM (
 {% if all_obj or obj_type in ['foreign_server'] %}
     select 'foreign_server' AS obj_type, sr.srvname AS obj_name, ':foreign_data_wrapper.'||fdw.oid||':/' || fdw.fdwname || '/:foreign_server.'||sr.oid||':/' || sr.srvname AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['foreign_server'] }} AS show_node, NULL AS other_info
-    from pg_foreign_server sr
-    inner join pg_foreign_data_wrapper fdw on sr.srvfdw = fdw.oid
+    from pg_catalog.pg_foreign_server sr
+    inner join pg_catalog.pg_foreign_data_wrapper fdw on sr.srvfdw = fdw.oid
 {% endif %}
 {% if all_obj %}
     UNION
@@ -449,9 +449,9 @@ FROM (
 {% if all_obj or obj_type in ['user_mapping'] %}
     select 'user_mapping' AS obj_type, um.usename AS obj_name, ':foreign_data_wrapper.'||fdw.oid||':/' || fdw.fdwname || '/:foreign_server.'||sr.oid||':/' || sr.srvname || '/:user_mapping.'||um.umid||':/' || um.usename AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['user_mapping'] }} AS show_node, NULL AS other_info
-    from pg_user_mappings um
-    inner join pg_foreign_server sr on um.srvid = sr.oid
-    inner join pg_foreign_data_wrapper fdw on sr.srvfdw = fdw.oid
+    from pg_catalog.pg_user_mappings um
+    inner join pg_catalog.pg_foreign_server sr on um.srvid = sr.oid
+    inner join pg_catalog.pg_foreign_data_wrapper fdw on sr.srvfdw = fdw.oid
 {% endif %}
 {% if all_obj %}
     UNION
@@ -459,9 +459,9 @@ FROM (
 {% if all_obj or obj_type in ['foreign_table'] %}
     select 'foreign_table' AS obj_type, c.relname AS obj_name, ':schema.'||ns.oid||':/' || ns.nspname || '/:foreign_table.'||c.oid||':/' || c.relname AS obj_path, ns.nspname AS schema_name,
     {{ show_node_prefs['foreign_table'] }} AS show_node, NULL AS other_info
-    from pg_foreign_table ft
-    inner join pg_class c on ft.ftrelid = c.oid
-    inner join pg_namespace ns on c.relnamespace = ns.oid
+    from pg_catalog.pg_foreign_table ft
+    inner join pg_catalog.pg_class c on ft.ftrelid = c.oid
+    inner join pg_catalog.pg_namespace ns on c.relnamespace = ns.oid
     AND {{ CATALOGS.DB_SUPPORT('ns') }}
 {% endif %}
 {% if all_obj %}
@@ -470,9 +470,9 @@ FROM (
 {% if all_obj or obj_type in ['extension'] %}
     select 'extension' AS obj_type, x.extname AS obj_name, ':extension.'||x.oid||':/' || x.extname AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['extension'] }} AS show_node, NULL AS other_info
-    FROM pg_extension x
-    JOIN pg_namespace n on x.extnamespace=n.oid
-    join pg_available_extensions() e(name, default_version, comment) ON x.extname=e.name
+    FROM pg_catalog.pg_extension x
+    JOIN pg_catalog.pg_namespace n on x.extnamespace=n.oid
+    join pg_catalog.pg_available_extensions() e(name, default_version, comment) ON x.extname=e.name
 {% endif %}
 {% if all_obj %}
     UNION
@@ -480,8 +480,8 @@ FROM (
 {% if all_obj or obj_type in ['collation'] %}
     SELECT 'collation' AS obj_type, c.collname AS obj_name, ':schema.'||n.oid||':/' || n.nspname || '/:collation.'||c.oid||':/' || c.collname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['collation'] }} AS show_node, NULL AS other_info
-    FROM pg_collation c
-    JOIN pg_namespace n ON n.oid=c.collnamespace
+    FROM pg_catalog.pg_collation c
+    JOIN pg_catalog.pg_namespace n ON n.oid=c.collnamespace
     WHERE {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
 {% if all_obj %}
@@ -499,8 +499,8 @@ FROM (
                             select rel.oid, pt.height+1 as height, rel.relkind,
                                 CASE rel.relispartition WHEN true THEN ':partition.' ELSE ':table.' END
                                 || rel.oid || ':/' || rel.relname || '/' || pt.path as path
-                            from pg_class rel JOIN pg_namespace nsp ON rel.relnamespace = nsp.oid
-                            join pg_inherits inh ON inh.inhparent = rel.oid
+                            from pg_catalog.pg_class rel JOIN pg_catalog.pg_namespace nsp ON rel.relnamespace = nsp.oid
+                            join pg_catalog.pg_inherits inh ON inh.inhparent = rel.oid
                             join table_path_data pt ON inh.inhrelid = pt.oid
                         )
                         select CASE WHEN relkind = 'p' THEN path ELSE ':table.' || t.oid || ':/' || t.relname END AS path
@@ -509,10 +509,10 @@ FROM (
             end
             ||'/:row_security_policy.'|| pl.oid ||':/'|| pl.polname AS obj_path, n.nspname AS schema_name,
             {{ show_node_prefs['row_security_policy'] }} AS show_node, NULL AS other_info
-            FROM pg_policy pl
-    JOIN pg_class t on pl.polrelid = t.oid and t.relkind in ('r','t','p')
-    JOIN pg_policies rw ON (pl.polname=rw.policyname AND t.relname=rw.tablename)
-    JOIN pg_namespace n on t.relnamespace = n.oid
+            FROM pg_catalog.pg_policy pl
+    JOIN pg_catalog.pg_class t on pl.polrelid = t.oid and t.relkind in ('r','t','p')
+    JOIN pg_catalog.pg_policies rw ON (pl.polname=rw.policyname AND t.relname=rw.tablename)
+    JOIN pg_catalog.pg_namespace n on t.relnamespace = n.oid
     where {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
 
diff --git a/web/pgadmin/tools/search_objects/templates/search_objects/sql/pg/9.5_plus/search.sql b/web/pgadmin/tools/search_objects/templates/search_objects/sql/pg/9.5_plus/search.sql
index c111402ce..6e5679094 100644
--- a/web/pgadmin/tools/search_objects/templates/search_objects/sql/pg/9.5_plus/search.sql
+++ b/web/pgadmin/tools/search_objects/templates/search_objects/sql/pg/9.5_plus/search.sql
@@ -4,7 +4,7 @@
 {% set all_obj = true %}
 {% endif %}
 SELECT obj_type, obj_name,
-    REPLACE(obj_path, '/'||sn.schema_name||'/', '/'||{{ CATALOGS.LABELS_SCHEMACOL('sn.schema_name', _) }}||'/') AS obj_path,
+    pg_catalog.REPLACE(obj_path, '/'||sn.schema_name||'/', '/'||{{ CATALOGS.LABELS_SCHEMACOL('sn.schema_name', _) }}||'/') AS obj_path,
     schema_name, show_node, other_info,
     CASE
         WHEN {{ CATALOGS.IS_CATALOG_SCHEMA('sn.schema_name') }} THEN
@@ -36,8 +36,8 @@ FROM (
         WHEN c.relkind = 'm' THEN {{ show_node_prefs['mview'] }}
         ELSE False
     END AS show_node, NULL AS other_info
-    FROM pg_class c
-    LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
+    FROM pg_catalog.pg_class c
+    LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
     {% if all_obj %}
     WHERE c.relkind in ('r','t','S','v','m')
     {% elif obj_type == 'table' %}
@@ -58,14 +58,14 @@ FROM (
     SELECT 'index'::text AS obj_type, cls.relname AS obj_name,
     ':schema.'|| n.oid || ':/' || n.nspname || '/:table.'|| tab.oid ||':/' || tab.relname || '/:index.'|| cls.oid ||':/' || cls.relname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['index'] }} AS show_node, NULL AS other_info
-    FROM pg_index idx
-    JOIN pg_class cls ON cls.oid=indexrelid
-    JOIN pg_class tab ON tab.oid=indrelid
-    JOIN pg_namespace n ON n.oid=tab.relnamespace
-    LEFT JOIN pg_depend dep ON (dep.classid = cls.tableoid AND dep.objid = cls.oid AND dep.refobjsubid = '0' AND dep.refclassid=(SELECT oid FROM pg_class WHERE relname='pg_constraint') AND dep.deptype='i')
-    LEFT OUTER JOIN pg_constraint con ON (con.tableoid = dep.refclassid AND con.oid = dep.refobjid)
-    LEFT OUTER JOIN pg_description des ON des.objoid=cls.oid
-    LEFT OUTER JOIN pg_description desp ON (desp.objoid=con.oid AND desp.objsubid = 0)
+    FROM pg_catalog.pg_index idx
+    JOIN pg_catalog.pg_class cls ON cls.oid=indexrelid
+    JOIN pg_catalog.pg_class tab ON tab.oid=indrelid
+    JOIN pg_catalog.pg_namespace n ON n.oid=tab.relnamespace
+    LEFT JOIN pg_catalog.pg_depend dep ON (dep.classid = cls.tableoid AND dep.objid = cls.oid AND dep.refobjsubid = '0' AND dep.refclassid=(SELECT oid FROM pg_catalog.pg_class WHERE relname='pg_constraint') AND dep.deptype='i')
+    LEFT OUTER JOIN pg_catalog.pg_constraint con ON (con.tableoid = dep.refclassid AND con.oid = dep.refobjid)
+    LEFT OUTER JOIN pg_catalog.pg_description des ON des.objoid=cls.oid
+    LEFT OUTER JOIN pg_catalog.pg_description desp ON (desp.objoid=con.oid AND desp.objsubid = 0)
     WHERE contype IS NULL
     AND {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
@@ -80,9 +80,9 @@ FROM (
     ':schema.'|| n.oid || ':/' || n.nspname || '/' || case when t.typname = 'trigger' then ':trigger_function.' else ':function.' end || p.oid ||':/' || p.proname AS obj_path, n.nspname AS schema_name,
     CASE WHEN t.typname IN ('trigger', 'event_trigger') THEN {{ show_node_prefs['trigger_function'] }} ELSE {{ show_node_prefs['function'] }} END AS show_node,
     pg_catalog.pg_get_function_identity_arguments(p.oid) AS other_info
-    from pg_proc p
-    left join pg_namespace n on p.pronamespace = n.oid
-    left join pg_type t on p.prorettype = t.oid
+    from pg_catalog.pg_proc p
+    left join pg_catalog.pg_namespace n on p.pronamespace = n.oid
+    left join pg_catalog.pg_type t on p.prorettype = t.oid
     WHERE ({{ CATALOGS.DB_SUPPORT('n') }})
 {% endif %}
 {% if all_obj %}
@@ -90,7 +90,7 @@ FROM (
 {% endif %}
 {% if all_obj or obj_type in ['event_trigger'] %}
     select 'event_trigger'::text AS obj_type, evtname AS obj_name, ':event_trigger.'||oid||':/' || evtname AS obj_path, ''::text AS schema_name,
-    {{ show_node_prefs['index'] }} AS show_node, NULL AS other_info from pg_event_trigger
+    {{ show_node_prefs['index'] }} AS show_node, NULL AS other_info from pg_catalog.pg_event_trigger
 {% endif %}
 {% if all_obj %}
     UNION
@@ -98,7 +98,7 @@ FROM (
 {% if all_obj or obj_type in ['schema'] %}
     select 'schema'::text AS obj_type, n.nspname AS obj_name,
     ':schema.'||n.oid||':/' || n.nspname as obj_path, n.nspname AS schema_name,
-    {{ show_node_prefs['schema'] }} AS show_node, NULL AS other_info from pg_namespace n
+    {{ show_node_prefs['schema'] }} AS show_node, NULL AS other_info from pg_catalog.pg_namespace n
     where {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
 {% if all_obj %}
@@ -114,9 +114,9 @@ FROM (
         else 'should not happen'
     end || t.oid || ':/' || t.relname || '/:column.'|| a.attnum ||':/' || a.attname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['column'] }} AS show_node, NULL AS other_info
-    from pg_attribute a
-    inner join pg_class t on a.attrelid = t.oid and t.relkind in ('r', 't','v','m')
-    left join pg_namespace n on t.relnamespace = n.oid where a.attnum > 0
+    from pg_catalog.pg_attribute a
+    inner join pg_catalog.pg_class t on a.attrelid = t.oid and t.relkind in ('r', 't','v','m')
+    left join pg_catalog.pg_namespace n on t.relnamespace = n.oid where a.attnum > 0
 {% endif %}
 {% if all_obj %}
     UNION
@@ -140,10 +140,10 @@ FROM (
         WHEN c.contype = 'x' THEN  '/:exclusion_constraint.' ||c.conindid
     END ||':/'|| case when tf.relname is null then c.conname else c.conname || ' -> ' || tf.relname end AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['constraints'] }} AS show_node, NULL AS other_info
-    from pg_constraint c
-    left join pg_class t on c.conrelid = t.oid
-    left join pg_class tf on c.confrelid = tf.oid
-    left join pg_namespace n on t.relnamespace = n.oid
+    from pg_catalog.pg_constraint c
+    left join pg_catalog.pg_class t on c.conrelid = t.oid
+    left join pg_catalog.pg_class tf on c.confrelid = tf.oid
+    left join pg_catalog.pg_namespace n on t.relnamespace = n.oid
     where c.contypid = 0
     {% if obj_type == 'check_constraint' %}
     AND c.contype = 'c'
@@ -172,9 +172,9 @@ FROM (
             end || t.oid || ':/' || t.relname ||'/:rule.'||r.oid||':/'|| r.rulename AS obj_path,
             n.nspname AS schema_name,
             {{ show_node_prefs['rule'] }} AS show_node, NULL AS other_info
-            from pg_rewrite r
-    inner join pg_class t on r.ev_class = t.oid and t.relkind in ('r', 't','v')
-    left join pg_namespace n on t.relnamespace = n.oid
+            from pg_catalog.pg_rewrite r
+    inner join pg_catalog.pg_class t on r.ev_class = t.oid and t.relkind in ('r', 't','v')
+    left join pg_catalog.pg_namespace n on t.relnamespace = n.oid
     where {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
 {% if all_obj %}
@@ -188,9 +188,9 @@ FROM (
                 else 'should not happen'
             end || t.oid || ':/' || t.relname || '/:trigger.'|| tr.oid || ':/' || tr.tgname AS obj_path, n.nspname AS schema_name,
             {{ show_node_prefs['trigger'] }} AS show_node, NULL AS other_info
-            from pg_trigger tr
-    inner join pg_class t on tr.tgrelid = t.oid and t.relkind in ('r', 't', 'v')
-    left join pg_namespace n on t.relnamespace = n.oid
+            from pg_catalog.pg_trigger tr
+    inner join pg_catalog.pg_class t on tr.tgrelid = t.oid and t.relkind in ('r', 't', 'v')
+    left join pg_catalog.pg_namespace n on t.relnamespace = n.oid
     where tr.tgisinternal = false
     and {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
@@ -201,10 +201,10 @@ FROM (
     SELECT 'type'::text AS obj_type, t.typname AS obj_name, ':schema.'||n.oid||':/' || n.nspname ||
         '/:type.'|| t.oid ||':/' || t.typname AS obj_path, n.nspname AS schema_name,
         {{ show_node_prefs['type'] }} AS show_node, NULL AS other_info
-    FROM pg_type t
-    LEFT OUTER JOIN pg_type e ON e.oid=t.typelem
-    LEFT OUTER JOIN pg_class ct ON ct.oid=t.typrelid AND ct.relkind <> 'c'
-    LEFT OUTER JOIN pg_namespace n on t.typnamespace = n.oid
+    FROM pg_catalog.pg_type t
+    LEFT OUTER JOIN pg_catalog.pg_type e ON e.oid=t.typelem
+    LEFT OUTER JOIN pg_catalog.pg_class ct ON ct.oid=t.typrelid AND ct.relkind <> 'c'
+    LEFT OUTER JOIN pg_catalog.pg_namespace n on t.typnamespace = n.oid
     WHERE t.typtype != 'd' AND t.typname NOT LIKE E'\\_%'
     {% if not show_system_objects %}
         AND ct.oid is NULL
@@ -218,9 +218,9 @@ FROM (
     SELECT 'cast'::text AS obj_type, format_type(st.oid,NULL) ||'->'|| format_type(tt.oid,tt.typtypmod) AS obj_name,
     ':cast.'||ca.oid||':/' || format_type(st.oid,NULL) ||'->'|| format_type(tt.oid,tt.typtypmod) AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['cast'] }} AS show_node, NULL AS other_info
-    FROM pg_cast ca
-    JOIN pg_type st ON st.oid=castsource
-    JOIN pg_type tt ON tt.oid=casttarget
+    FROM pg_catalog.pg_cast ca
+    JOIN pg_catalog.pg_type st ON st.oid=castsource
+    JOIN pg_catalog.pg_type tt ON tt.oid=casttarget
     {% if not show_system_objects %}
     WHERE ca.oid > {{last_system_oid}}::OID
     {% endif %}
@@ -231,7 +231,7 @@ FROM (
 {% if all_obj or obj_type in ['language'] %}
     SELECT 'language'::text AS obj_type, lanname AS obj_name, ':language.'||lan.oid||':/' || lanname AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['language'] }} AS show_node, NULL AS other_info
-    FROM pg_language lan
+    FROM pg_catalog.pg_language lan
     WHERE lanispl IS TRUE
 {% endif %}
 {% if all_obj %}
@@ -240,8 +240,8 @@ FROM (
 {% if all_obj or obj_type in ['fts_configuration'] %}
     SELECT 'fts_configuration'::text AS obj_type, cfg.cfgname AS obj_name, ':schema.'||n.oid||':/' || n.nspname || '/:fts_configuration.'||cfg.oid||':/' || cfg.cfgname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['fts_configuration'] }} AS show_node, NULL AS other_info
-    FROM pg_ts_config cfg
-    left join pg_namespace n on cfg.cfgnamespace = n.oid
+    FROM pg_catalog.pg_ts_config cfg
+    left join pg_catalog.pg_namespace n on cfg.cfgnamespace = n.oid
     WHERE {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
 {% if all_obj %}
@@ -250,8 +250,8 @@ FROM (
 {% if all_obj or obj_type in ['fts_dictionary'] %}
     SELECT 'fts_dictionary'::text AS obj_type, dict.dictname AS obj_name, ':schema.'||ns.oid||':/' || ns.nspname || '/:fts_dictionary.'||dict.oid||':/' || dict.dictname AS obj_path, ns.nspname AS schema_name,
     {{ show_node_prefs['fts_dictionary'] }} AS show_node, NULL AS other_info
-    FROM pg_ts_dict dict
-    left join pg_namespace ns on dict.dictnamespace = ns.oid
+    FROM pg_catalog.pg_ts_dict dict
+    left join pg_catalog.pg_namespace ns on dict.dictnamespace = ns.oid
     WHERE {{ CATALOGS.DB_SUPPORT('ns') }}
 {% endif %}
 {% if all_obj %}
@@ -260,8 +260,8 @@ FROM (
 {% if all_obj or obj_type in ['fts_parser'] %}
     SELECT 'fts_parser'::text AS obj_type, prs.prsname AS obj_name, ':schema.'||ns.oid||':/' || ns.nspname || '/:fts_parser.'||prs.oid||':/' || prs.prsname AS obj_path, ns.nspname AS schema_name,
     {{ show_node_prefs['fts_parser'] }} AS show_node, NULL AS other_info
-    FROM pg_ts_parser prs
-    left join pg_namespace ns on prs.prsnamespace = ns.oid
+    FROM pg_catalog.pg_ts_parser prs
+    left join pg_catalog.pg_namespace ns on prs.prsnamespace = ns.oid
     WHERE {{ CATALOGS.DB_SUPPORT('ns') }}
 {% endif %}
 {% if all_obj %}
@@ -270,8 +270,8 @@ FROM (
 {% if all_obj or obj_type in ['fts_template'] %}
     SELECT 'fts_template'::text AS obj_type, tmpl.tmplname AS obj_name, ':schema.'||ns.oid||':/' || ns.nspname || '/:fts_template.'||tmpl.oid||':/' || tmpl.tmplname AS obj_path, ns.nspname AS schema_name,
     {{ show_node_prefs['fts_template'] }} AS show_node, NULL AS other_info
-    FROM pg_ts_template tmpl
-    left join pg_namespace ns on tmpl.tmplnamespace = ns.oid
+    FROM pg_catalog.pg_ts_template tmpl
+    left join pg_catalog.pg_namespace ns on tmpl.tmplnamespace = ns.oid
     AND {{ CATALOGS.DB_SUPPORT('ns') }}
 {% endif %}
 {% if all_obj %}
@@ -280,8 +280,8 @@ FROM (
 {% if all_obj or obj_type in ['domain'] %}
     select 'domain'::text AS obj_type, t.typname AS obj_name, ':schema.'||n.oid||':/' || n.nspname || '/:domain.'||t.oid||':/' || t.typname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['domain'] }} AS show_node, NULL AS other_info
-    from pg_type t
-    inner join pg_namespace n on t.typnamespace = n.oid
+    from pg_catalog.pg_type t
+    inner join pg_catalog.pg_namespace n on t.typnamespace = n.oid
     where t.typtype = 'd'
     AND {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
@@ -293,7 +293,7 @@ FROM (
         c.conname AS obj_name, ':schema.'||n.oid||':/' || n.nspname || '/:domain.'||t.oid||':/' || t.typname || '/:domain_constraints.'||c.oid||':/' || c.conname AS obj_path,
         n.nspname AS schema_name,
         {{ show_node_prefs['domain_constraints'] }} AS show_node, NULL AS other_info
-    FROM pg_constraint c JOIN pg_type t
+    FROM pg_catalog.pg_constraint c JOIN pg_catalog.pg_type t
     ON t.oid=contypid JOIN pg_namespace n
     ON n.oid=t.typnamespace
     WHERE t.typtype = 'd'
@@ -305,7 +305,7 @@ FROM (
 {% if all_obj or obj_type in ['foreign_data_wrapper'] %}
     select 'foreign_data_wrapper'::text AS obj_type, fdwname AS obj_name, ':foreign_data_wrapper.'||oid||':/' || fdwname AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['foreign_data_wrapper'] }} AS show_node, NULL AS other_info
-    from pg_foreign_data_wrapper
+    from pg_catalog.pg_foreign_data_wrapper
 {% endif %}
 {% if all_obj %}
     UNION
@@ -313,8 +313,8 @@ FROM (
 {% if all_obj or obj_type in ['foreign_server'] %}
     select 'foreign_server'::text AS obj_type, sr.srvname AS obj_name, ':foreign_data_wrapper.'||fdw.oid||':/' || fdw.fdwname || '/:foreign_server.'||sr.oid||':/' || sr.srvname AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['foreign_server'] }} AS show_node, NULL AS other_info
-    from pg_foreign_server sr
-    inner join pg_foreign_data_wrapper fdw on sr.srvfdw = fdw.oid
+    from pg_catalog.pg_foreign_server sr
+    inner join pg_catalog.pg_foreign_data_wrapper fdw on sr.srvfdw = fdw.oid
 {% endif %}
 {% if all_obj %}
     UNION
@@ -322,9 +322,9 @@ FROM (
 {% if all_obj or obj_type in ['user_mapping'] %}
     select 'user_mapping'::text AS obj_type, um.usename AS obj_name, ':foreign_data_wrapper.'||fdw.oid||':/' || fdw.fdwname || '/:foreign_server.'||sr.oid||':/' || sr.srvname || '/:user_mapping.'||um.umid||':/' || um.usename AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['user_mapping'] }} AS show_node, NULL AS other_info
-    from pg_user_mappings um
-    inner join pg_foreign_server sr on um.srvid = sr.oid
-    inner join pg_foreign_data_wrapper fdw on sr.srvfdw = fdw.oid
+    from pg_catalog.pg_user_mappings um
+    inner join pg_catalog.pg_foreign_server sr on um.srvid = sr.oid
+    inner join pg_catalog.pg_foreign_data_wrapper fdw on sr.srvfdw = fdw.oid
 {% endif %}
 {% if all_obj %}
     UNION
@@ -332,9 +332,9 @@ FROM (
 {% if all_obj or obj_type in ['foreign_table'] %}
     select 'foreign_table'::text AS obj_type, c.relname AS obj_name, ':schema.'||ns.oid||':/' || ns.nspname || '/:foreign_table.'||c.oid||':/' || c.relname AS obj_path, ns.nspname AS schema_name,
     {{ show_node_prefs['foreign_table'] }} AS show_node, NULL AS other_info
-    from pg_foreign_table ft
-    inner join pg_class c on ft.ftrelid = c.oid
-    inner join pg_namespace ns on c.relnamespace = ns.oid
+    from pg_catalog.pg_foreign_table ft
+    inner join pg_catalog.pg_class c on ft.ftrelid = c.oid
+    inner join pg_catalog.pg_namespace ns on c.relnamespace = ns.oid
     AND {{ CATALOGS.DB_SUPPORT('ns') }}
 {% endif %}
 {% if all_obj %}
@@ -343,9 +343,9 @@ FROM (
 {% if all_obj or obj_type in ['extension'] %}
     select 'extension'::text AS obj_type, x.extname AS obj_name, ':extension.'||x.oid||':/' || x.extname AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['extension'] }} AS show_node, NULL AS other_info
-    FROM pg_extension x
-    JOIN pg_namespace n on x.extnamespace=n.oid
-    join pg_available_extensions() e(name, default_version, comment) ON x.extname=e.name
+    FROM pg_catalog.pg_extension x
+    JOIN pg_catalog.pg_namespace n on x.extnamespace=n.oid
+    join pg_catalog.pg_available_extensions() e(name, default_version, comment) ON x.extname=e.name
 {% endif %}
 {% if all_obj %}
     UNION
@@ -353,8 +353,8 @@ FROM (
 {% if all_obj or obj_type in ['collation'] %}
     SELECT 'collation'::text AS obj_type, c.collname AS obj_name, ':schema.'||n.oid||':/' || n.nspname || '/:collation.'||c.oid||':/' || c.collname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['collation'] }} AS show_node, NULL AS other_info
-    FROM pg_collation c
-    JOIN pg_namespace n ON n.oid=c.collnamespace
+    FROM pg_catalog.pg_collation c
+    JOIN pg_catalog.pg_namespace n ON n.oid=c.collnamespace
     WHERE {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
 {% if all_obj %}
@@ -364,10 +364,10 @@ FROM (
     select 'row_security_policy'::text AS obj_type, pl.polname AS obj_name, ':schema.'|| n.oid || ':/' || n.nspname ||
         '/:table.'|| t.oid ||':/' || t.relname || '/:row_security_policy.'|| pl.oid ||':/' || pl.polname AS obj_path, n.nspname AS schema_name,
         {{ show_node_prefs['row_security_policy'] }} AS show_node, NULL AS other_info
-        FROM pg_policy pl
-    JOIN pg_class t on pl.polrelid = t.oid and t.relkind in ('r','t','p')
-    JOIN pg_policies rw ON (pl.polname=rw.policyname AND t.relname=rw.tablename)
-    JOIN pg_namespace n on t.relnamespace = n.oid
+        FROM pg_catalog.pg_policy pl
+    JOIN pg_catalog.pg_class t on pl.polrelid = t.oid and t.relkind in ('r','t','p')
+    JOIN pg_catalog.pg_policies rw ON (pl.polname=rw.policyname AND t.relname=rw.tablename)
+    JOIN pg_catalog.pg_namespace n on t.relnamespace = n.oid
     where {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
 ) sn
diff --git a/web/pgadmin/tools/search_objects/templates/search_objects/sql/pg/default/search.sql b/web/pgadmin/tools/search_objects/templates/search_objects/sql/pg/default/search.sql
index 9e365c8b7..20f5bcf1a 100644
--- a/web/pgadmin/tools/search_objects/templates/search_objects/sql/pg/default/search.sql
+++ b/web/pgadmin/tools/search_objects/templates/search_objects/sql/pg/default/search.sql
@@ -4,7 +4,7 @@
 {% set all_obj = true %}
 {% endif %}
 SELECT obj_type, obj_name,
-    REPLACE(obj_path, '/'||sn.schema_name||'/', '/'||{{ CATALOGS.LABELS_SCHEMACOL('sn.schema_name', _) }}||'/') AS obj_path,
+    pg_catalog.REPLACE(obj_path, '/'||sn.schema_name||'/', '/'||{{ CATALOGS.LABELS_SCHEMACOL('sn.schema_name', _) }}||'/') AS obj_path,
     schema_name, show_node, other_info,
     CASE
         WHEN {{ CATALOGS.IS_CATALOG_SCHEMA('sn.schema_name') }} THEN
@@ -36,8 +36,8 @@ FROM (
         WHEN c.relkind = 'm' THEN {{ show_node_prefs['mview'] }}
         ELSE False
     END AS show_node, NULL AS other_info
-    FROM pg_class c
-    LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
+    FROM pg_catalog.pg_class c
+    LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
     {% if all_obj %}
     WHERE c.relkind in ('r','t','S','v','m')
     {% elif obj_type == 'table' %}
@@ -58,14 +58,14 @@ FROM (
     SELECT 'index'::text AS obj_type, cls.relname AS obj_name,
     ':schema.'|| n.oid || ':/' || n.nspname || '/:table.'|| tab.oid ||':/' || tab.relname || '/:index.'|| cls.oid ||':/' || cls.relname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['index'] }} AS show_node, NULL AS other_info
-    FROM pg_index idx
-    JOIN pg_class cls ON cls.oid=indexrelid
-    JOIN pg_class tab ON tab.oid=indrelid
-    JOIN pg_namespace n ON n.oid=tab.relnamespace
-    LEFT JOIN pg_depend dep ON (dep.classid = cls.tableoid AND dep.objid = cls.oid AND dep.refobjsubid = '0' AND dep.refclassid=(SELECT oid FROM pg_class WHERE relname='pg_constraint') AND dep.deptype='i')
-    LEFT OUTER JOIN pg_constraint con ON (con.tableoid = dep.refclassid AND con.oid = dep.refobjid)
-    LEFT OUTER JOIN pg_description des ON des.objoid=cls.oid
-    LEFT OUTER JOIN pg_description desp ON (desp.objoid=con.oid AND desp.objsubid = 0)
+    FROM pg_catalog.pg_index idx
+    JOIN pg_catalog.pg_class cls ON cls.oid=indexrelid
+    JOIN pg_catalog.pg_class tab ON tab.oid=indrelid
+    JOIN pg_catalog.pg_namespace n ON n.oid=tab.relnamespace
+    LEFT JOIN pg_catalog.pg_depend dep ON (dep.classid = cls.tableoid AND dep.objid = cls.oid AND dep.refobjsubid = '0' AND dep.refclassid=(SELECT oid FROM pg_class WHERE relname='pg_constraint') AND dep.deptype='i')
+    LEFT OUTER JOIN pg_catalog.pg_constraint con ON (con.tableoid = dep.refclassid AND con.oid = dep.refobjid)
+    LEFT OUTER JOIN pg_catalog.pg_description des ON des.objoid=cls.oid
+    LEFT OUTER JOIN pg_catalog.pg_description desp ON (desp.objoid=con.oid AND desp.objsubid = 0)
     WHERE contype IS NULL
     AND {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
@@ -80,9 +80,9 @@ FROM (
     ':schema.'|| n.oid || ':/' || n.nspname || '/' || case when t.typname = 'trigger' then ':trigger_function.' else ':function.' end || p.oid ||':/' || p.proname AS obj_path, n.nspname AS schema_name,
     CASE WHEN t.typname IN ('trigger', 'event_trigger') THEN {{ show_node_prefs['trigger_function'] }} ELSE {{ show_node_prefs['function'] }} END AS show_node,
     pg_catalog.pg_get_function_identity_arguments(p.oid) AS other_info
-    from pg_proc p
-    left join pg_namespace n on p.pronamespace = n.oid
-    left join pg_type t on p.prorettype = t.oid
+    from pg_catalog.pg_proc p
+    left join pg_catalog.pg_namespace n on p.pronamespace = n.oid
+    left join pg_catalog.pg_type t on p.prorettype = t.oid
     WHERE ({{ CATALOGS.DB_SUPPORT('n') }})
 {% endif %}
 {% if all_obj %}
@@ -90,7 +90,7 @@ FROM (
 {% endif %}
 {% if all_obj or obj_type in ['event_trigger'] %}
     select 'event_trigger'::text AS obj_type, evtname AS obj_name, ':event_trigger.'||oid||':/' || evtname AS obj_path, ''::text AS schema_name,
-    {{ show_node_prefs['index'] }} AS show_node, NULL AS other_info from pg_event_trigger
+    {{ show_node_prefs['index'] }} AS show_node, NULL AS other_info from pg_catalog.pg_event_trigger
 {% endif %}
 {% if all_obj %}
     UNION
@@ -98,7 +98,7 @@ FROM (
 {% if all_obj or obj_type in ['schema'] %}
     select 'schema'::text AS obj_type, n.nspname AS obj_name,
     ':schema.'||n.oid||':/' || n.nspname as obj_path, n.nspname AS schema_name,
-    {{ show_node_prefs['schema'] }} AS show_node, NULL AS other_info from pg_namespace n
+    {{ show_node_prefs['schema'] }} AS show_node, NULL AS other_info from pg_catalog.pg_namespace n
     where {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
 {% if all_obj %}
@@ -114,9 +114,9 @@ FROM (
         else 'should not happen'
     end || t.oid || ':/' || t.relname || '/:column.'|| a.attnum ||':/' || a.attname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['column'] }} AS show_node, NULL AS other_info
-    from pg_attribute a
-    inner join pg_class t on a.attrelid = t.oid and t.relkind in ('r', 't','v','m')
-    left join pg_namespace n on t.relnamespace = n.oid where a.attnum > 0
+    from pg_catalog.pg_attribute a
+    inner join pg_catalog.pg_class t on a.attrelid = t.oid and t.relkind in ('r', 't','v','m')
+    left join pg_catalog.pg_namespace n on t.relnamespace = n.oid where a.attnum > 0
 {% endif %}
 {% if all_obj %}
     UNION
@@ -140,10 +140,10 @@ FROM (
         WHEN c.contype = 'x' THEN  '/:exclusion_constraint.' ||c.conindid
     END ||':/'|| case when tf.relname is null then c.conname else c.conname || ' -> ' || tf.relname end AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['constraints'] }} AS show_node, NULL AS other_info
-    from pg_constraint c
-    left join pg_class t on c.conrelid = t.oid
-    left join pg_class tf on c.confrelid = tf.oid
-    left join pg_namespace n on t.relnamespace = n.oid
+    from pg_catalog.pg_constraint c
+    left join pg_catalog.pg_class t on c.conrelid = t.oid
+    left join pg_catalog.pg_class tf on c.confrelid = tf.oid
+    left join pg_catalog.pg_namespace n on t.relnamespace = n.oid
     where c.contypid = 0
     {% if obj_type == 'check_constraint' %}
     AND c.contype = 'c'
@@ -172,9 +172,9 @@ FROM (
             end || t.oid || ':/' || t.relname ||'/:rule.'||r.oid||':/'|| r.rulename AS obj_path,
             n.nspname AS schema_name,
             {{ show_node_prefs['rule'] }} AS show_node, NULL AS other_info
-            from pg_rewrite r
-    inner join pg_class t on r.ev_class = t.oid and t.relkind in ('r', 't','v')
-    left join pg_namespace n on t.relnamespace = n.oid
+            from pg_catalog.pg_rewrite r
+    inner join pg_catalog.pg_class t on r.ev_class = t.oid and t.relkind in ('r', 't','v')
+    left join pg_catalog.pg_namespace n on t.relnamespace = n.oid
     where {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
 {% if all_obj %}
@@ -188,9 +188,9 @@ FROM (
                 else 'should not happen'
             end || t.oid || ':/' || t.relname || '/:trigger.'|| tr.oid || ':/' || tr.tgname AS obj_path, n.nspname AS schema_name,
             {{ show_node_prefs['trigger'] }} AS show_node, NULL AS other_info
-            from pg_trigger tr
-    inner join pg_class t on tr.tgrelid = t.oid and t.relkind in ('r', 't', 'v')
-    left join pg_namespace n on t.relnamespace = n.oid
+            from pg_catalog.pg_trigger tr
+    inner join pg_catalog.pg_class t on tr.tgrelid = t.oid and t.relkind in ('r', 't', 'v')
+    left join pg_catalog.pg_namespace n on t.relnamespace = n.oid
     where tr.tgisinternal = false
     and {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
@@ -201,10 +201,10 @@ FROM (
     SELECT 'type'::text AS obj_type, t.typname AS obj_name, ':schema.'||n.oid||':/' || n.nspname ||
         '/:type.'|| t.oid ||':/' || t.typname AS obj_path, n.nspname AS schema_name,
         {{ show_node_prefs['type'] }} AS show_node, NULL AS other_info
-    FROM pg_type t
-    LEFT OUTER JOIN pg_type e ON e.oid=t.typelem
-    LEFT OUTER JOIN pg_class ct ON ct.oid=t.typrelid AND ct.relkind <> 'c'
-    LEFT OUTER JOIN pg_namespace n on t.typnamespace = n.oid
+    FROM pg_catalog.pg_type t
+    LEFT OUTER JOIN pg_catalog.pg_type e ON e.oid=t.typelem
+    LEFT OUTER JOIN pg_catalog.pg_class ct ON ct.oid=t.typrelid AND ct.relkind <> 'c'
+    LEFT OUTER JOIN pg_catalog.pg_namespace n on t.typnamespace = n.oid
     WHERE t.typtype != 'd' AND t.typname NOT LIKE E'\\_%'
     {% if not show_system_objects %}
         AND ct.oid is NULL
@@ -218,9 +218,9 @@ FROM (
     SELECT 'cast'::text AS obj_type, format_type(st.oid,NULL) ||'->'|| format_type(tt.oid,tt.typtypmod) AS obj_name,
     ':cast.'||ca.oid||':/' || format_type(st.oid,NULL) ||'->'|| format_type(tt.oid,tt.typtypmod) AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['cast'] }} AS show_node, NULL AS other_info
-    FROM pg_cast ca
-    JOIN pg_type st ON st.oid=castsource
-    JOIN pg_type tt ON tt.oid=casttarget
+    FROM pg_catalog.pg_cast ca
+    JOIN pg_catalog.pg_type st ON st.oid=castsource
+    JOIN pg_catalog.pg_type tt ON tt.oid=casttarget
     {% if not show_system_objects %}
     WHERE ca.oid > {{last_system_oid}}::OID
     {% endif %}
@@ -231,7 +231,7 @@ FROM (
 {% if all_obj or obj_type in ['language'] %}
     SELECT 'language'::text AS obj_type, lanname AS obj_name, ':language.'||lan.oid||':/' || lanname AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['language'] }} AS show_node, NULL AS other_info
-    FROM pg_language lan
+    FROM pg_catalog.pg_language lan
     WHERE lanispl IS TRUE
 {% endif %}
 {% if all_obj %}
@@ -240,8 +240,8 @@ FROM (
 {% if all_obj or obj_type in ['fts_configuration'] %}
     SELECT 'fts_configuration'::text AS obj_type, cfg.cfgname AS obj_name, ':schema.'||n.oid||':/' || n.nspname || '/:fts_configuration.'||cfg.oid||':/' || cfg.cfgname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['fts_configuration'] }} AS show_node, NULL AS other_info
-    FROM pg_ts_config cfg
-    left join pg_namespace n on cfg.cfgnamespace = n.oid
+    FROM pg_catalog.pg_ts_config cfg
+    left join pg_catalog.pg_namespace n on cfg.cfgnamespace = n.oid
     WHERE {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
 {% if all_obj %}
@@ -250,8 +250,8 @@ FROM (
 {% if all_obj or obj_type in ['fts_dictionary'] %}
     SELECT 'fts_dictionary'::text AS obj_type, dict.dictname AS obj_name, ':schema.'||ns.oid||':/' || ns.nspname || '/:fts_dictionary.'||dict.oid||':/' || dict.dictname AS obj_path, ns.nspname AS schema_name,
     {{ show_node_prefs['fts_dictionary'] }} AS show_node, NULL AS other_info
-    FROM pg_ts_dict dict
-    left join pg_namespace ns on dict.dictnamespace = ns.oid
+    FROM pg_catalog.pg_ts_dict dict
+    left join pg_catalog.pg_namespace ns on dict.dictnamespace = ns.oid
     WHERE {{ CATALOGS.DB_SUPPORT('ns') }}
 {% endif %}
 {% if all_obj %}
@@ -260,8 +260,8 @@ FROM (
 {% if all_obj or obj_type in ['fts_parser'] %}
     SELECT 'fts_parser'::text AS obj_type, prs.prsname AS obj_name, ':schema.'||ns.oid||':/' || ns.nspname || '/:fts_parser.'||prs.oid||':/' || prs.prsname AS obj_path, ns.nspname AS schema_name,
     {{ show_node_prefs['fts_parser'] }} AS show_node, NULL AS other_info
-    FROM pg_ts_parser prs
-    left join pg_namespace ns on prs.prsnamespace = ns.oid
+    FROM pg_catalog.pg_ts_parser prs
+    left join pg_catalog.pg_namespace ns on prs.prsnamespace = ns.oid
     WHERE {{ CATALOGS.DB_SUPPORT('ns') }}
 {% endif %}
 {% if all_obj %}
@@ -270,8 +270,8 @@ FROM (
 {% if all_obj or obj_type in ['fts_template'] %}
     SELECT 'fts_template'::text AS obj_type, tmpl.tmplname AS obj_name, ':schema.'||ns.oid||':/' || ns.nspname || '/:fts_template.'||tmpl.oid||':/' || tmpl.tmplname AS obj_path, ns.nspname AS schema_name,
     {{ show_node_prefs['fts_template'] }} AS show_node, NULL AS other_info
-    FROM pg_ts_template tmpl
-    left join pg_namespace ns on tmpl.tmplnamespace = ns.oid
+    FROM pg_catalog.pg_ts_template tmpl
+    left join pg_catalog.pg_namespace ns on tmpl.tmplnamespace = ns.oid
     AND {{ CATALOGS.DB_SUPPORT('ns') }}
 {% endif %}
 {% if all_obj %}
@@ -280,8 +280,8 @@ FROM (
 {% if all_obj or obj_type in ['domain'] %}
     select 'domain'::text AS obj_type, t.typname AS obj_name, ':schema.'||n.oid||':/' || n.nspname || '/:domain.'||t.oid||':/' || t.typname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['domain'] }} AS show_node, NULL AS other_info
-    from pg_type t
-    inner join pg_namespace n on t.typnamespace = n.oid
+    from pg_catalog.pg_type t
+    inner join pg_catalog.pg_namespace n on t.typnamespace = n.oid
     where t.typtype = 'd'
     AND {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
@@ -293,7 +293,7 @@ FROM (
         c.conname AS obj_name, ':schema.'||n.oid||':/' || n.nspname || '/:domain.'||t.oid||':/' || t.typname || '/:domain_constraints.'||c.oid||':/' || c.conname AS obj_path,
         n.nspname AS schema_name,
         {{ show_node_prefs['domain_constraints'] }} AS show_node, NULL AS other_info
-    FROM pg_constraint c JOIN pg_type t
+    FROM pg_catalog.pg_constraint c JOIN pg_catalog.pg_type t
     ON t.oid=contypid JOIN pg_namespace n
     ON n.oid=t.typnamespace
     WHERE t.typtype = 'd'
@@ -305,7 +305,7 @@ FROM (
 {% if all_obj or obj_type in ['foreign_data_wrapper'] %}
     select 'foreign_data_wrapper'::text AS obj_type, fdwname AS obj_name, ':foreign_data_wrapper.'||oid||':/' || fdwname AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['foreign_data_wrapper'] }} AS show_node, NULL AS other_info
-    from pg_foreign_data_wrapper
+    from pg_catalog.pg_foreign_data_wrapper
 {% endif %}
 {% if all_obj %}
     UNION
@@ -313,8 +313,8 @@ FROM (
 {% if all_obj or obj_type in ['foreign_server'] %}
     select 'foreign_server'::text AS obj_type, sr.srvname AS obj_name, ':foreign_data_wrapper.'||fdw.oid||':/' || fdw.fdwname || '/:foreign_server.'||sr.oid||':/' || sr.srvname AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['foreign_server'] }} AS show_node, NULL AS other_info
-    from pg_foreign_server sr
-    inner join pg_foreign_data_wrapper fdw on sr.srvfdw = fdw.oid
+    from pg_catalog.pg_foreign_server sr
+    inner join pg_catalog.pg_foreign_data_wrapper fdw on sr.srvfdw = fdw.oid
 {% endif %}
 {% if all_obj %}
     UNION
@@ -322,9 +322,9 @@ FROM (
 {% if all_obj or obj_type in ['user_mapping'] %}
     select 'user_mapping'::text AS obj_type, um.usename AS obj_name, ':foreign_data_wrapper.'||fdw.oid||':/' || fdw.fdwname || '/:foreign_server.'||sr.oid||':/' || sr.srvname || '/:user_mapping.'||um.umid||':/' || um.usename AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['user_mapping'] }} AS show_node, NULL AS other_info
-    from pg_user_mappings um
-    inner join pg_foreign_server sr on um.srvid = sr.oid
-    inner join pg_foreign_data_wrapper fdw on sr.srvfdw = fdw.oid
+    from pg_catalog.pg_user_mappings um
+    inner join pg_catalog.pg_foreign_server sr on um.srvid = sr.oid
+    inner join pg_catalog.pg_foreign_data_wrapper fdw on sr.srvfdw = fdw.oid
 {% endif %}
 {% if all_obj %}
     UNION
@@ -332,9 +332,9 @@ FROM (
 {% if all_obj or obj_type in ['foreign_table'] %}
     select 'foreign_table'::text AS obj_type, c.relname AS obj_name, ':schema.'||ns.oid||':/' || ns.nspname || '/:foreign_table.'||c.oid||':/' || c.relname AS obj_path, ns.nspname AS schema_name,
     {{ show_node_prefs['foreign_table'] }} AS show_node, NULL AS other_info
-    from pg_foreign_table ft
-    inner join pg_class c on ft.ftrelid = c.oid
-    inner join pg_namespace ns on c.relnamespace = ns.oid
+    from pg_catalog.pg_foreign_table ft
+    inner join pg_catalog.pg_class c on ft.ftrelid = c.oid
+    inner join pg_catalog.pg_namespace ns on c.relnamespace = ns.oid
     AND {{ CATALOGS.DB_SUPPORT('ns') }}
 {% endif %}
 {% if all_obj %}
@@ -343,9 +343,9 @@ FROM (
 {% if all_obj or obj_type in ['extension'] %}
     select 'extension'::text AS obj_type, x.extname AS obj_name, ':extension.'||x.oid||':/' || x.extname AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['extension'] }} AS show_node, NULL AS other_info
-    FROM pg_extension x
-    JOIN pg_namespace n on x.extnamespace=n.oid
-    join pg_available_extensions() e(name, default_version, comment) ON x.extname=e.name
+    FROM pg_catalog.pg_extension x
+    JOIN pg_catalog.pg_namespace n on x.extnamespace=n.oid
+    join pg_catalog.pg_available_extensions() e(name, default_version, comment) ON x.extname=e.name
 {% endif %}
 {% if all_obj %}
     UNION
@@ -353,8 +353,8 @@ FROM (
 {% if all_obj or obj_type in ['collation'] %}
     SELECT 'collation'::text AS obj_type, c.collname AS obj_name, ':schema.'||n.oid||':/' || n.nspname || '/:collation.'||c.oid||':/' || c.collname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['collation'] }} AS show_node, NULL AS other_info
-    FROM pg_collation c
-    JOIN pg_namespace n ON n.oid=c.collnamespace
+    FROM pg_catalog.pg_collation c
+    JOIN pg_catalog.pg_namespace n ON n.oid=c.collnamespace
     WHERE {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
 
diff --git a/web/pgadmin/tools/search_objects/templates/search_objects/sql/ppas/10_plus/search.sql b/web/pgadmin/tools/search_objects/templates/search_objects/sql/ppas/10_plus/search.sql
index 4ed715463..20f40426c 100644
--- a/web/pgadmin/tools/search_objects/templates/search_objects/sql/ppas/10_plus/search.sql
+++ b/web/pgadmin/tools/search_objects/templates/search_objects/sql/ppas/10_plus/search.sql
@@ -4,7 +4,7 @@
 {% set all_obj = true %}
 {% endif %}
 SELECT obj_type, obj_name,
-    REPLACE(obj_path, '/'||sn.schema_name||'/', '/'||{{ CATALOGS.LABELS_SCHEMACOL('sn.schema_name', _) }}||'/') AS obj_path,
+    pg_catalog.REPLACE(obj_path, '/'||sn.schema_name||'/', '/'||{{ CATALOGS.LABELS_SCHEMACOL('sn.schema_name', _) }}||'/') AS obj_path,
     schema_name, show_node, other_info,
     CASE
         WHEN {{ CATALOGS.IS_CATALOG_SCHEMA('sn.schema_name') }} THEN
@@ -33,8 +33,8 @@ FROM (
         WHEN c.relkind = 'm' THEN {{ show_node_prefs['mview'] }}
         ELSE False
     END AS show_node, NULL AS other_info
-    FROM pg_class c
-    LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
+    FROM pg_catalog.pg_class c
+    LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
     {% if all_obj %}
     WHERE c.relkind in ('S','v','m')
     {% elif obj_type == 'sequence' %}
@@ -59,8 +59,8 @@ FROM (
 			select rel.oid, pt.height+1 as height, rel.relkind,
 				CASE rel.relispartition WHEN true THEN ':partition.' ELSE ':table.' END
 				|| rel.oid || ':/' || rel.relname || '/' || pt.path as path
-			from pg_class rel JOIN pg_namespace nsp ON rel.relnamespace = nsp.oid
-			join pg_inherits inh ON inh.inhparent = rel.oid
+			from pg_catalog.pg_class rel JOIN pg_catalog.pg_namespace nsp ON rel.relnamespace = nsp.oid
+			join pg_catalog.pg_inherits inh ON inh.inhparent = rel.oid
 			join table_path_data pt ON inh.inhrelid = pt.oid
 		)
 		select CASE WHEN relkind = 'p' THEN path ELSE ':table.' || c.oid || ':/' || c.relname END AS path
@@ -69,8 +69,8 @@ FROM (
 	CASE WHEN c.relispartition THEN {{ show_node_prefs['partition'] }}
 	    ELSE {{ show_node_prefs['table'] }} END AS show_node,
     NULL AS other_info
-    FROM pg_class c
-    LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
+    FROM pg_catalog.pg_class c
+    LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
     WHERE c.relkind in ('p','r','t')
     {% if obj_type == 'table' %}
     AND NOT c.relispartition
@@ -95,8 +95,8 @@ FROM (
                         select rel.oid, pt.height+1 as height, rel.relkind,
                             CASE rel.relispartition WHEN true THEN ':partition.' ELSE ':table.' END
                             || rel.oid || ':/' || rel.relname || '/' || pt.path as path
-                        from pg_class rel JOIN pg_namespace nsp ON rel.relnamespace = nsp.oid
-                        join pg_inherits inh ON inh.inhparent = rel.oid
+                        from pg_catalog.pg_class rel JOIN pg_catalog.pg_namespace nsp ON rel.relnamespace = nsp.oid
+                        join pg_catalog.pg_inherits inh ON inh.inhparent = rel.oid
                         join table_path_data pt ON inh.inhrelid = pt.oid
                     )
                     select CASE WHEN relkind = 'p' THEN path ELSE ':table.' || tab.oid || ':/' || tab.relname END AS path
@@ -105,14 +105,14 @@ FROM (
         end
         || '/:index.'|| cls.oid ||':/' || cls.relname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['index'] }} AS show_node, NULL AS other_info
-    FROM pg_index idx
-    JOIN pg_class cls ON cls.oid=indexrelid
-    JOIN pg_class tab ON tab.oid=indrelid
-    JOIN pg_namespace n ON n.oid=tab.relnamespace
-    LEFT JOIN pg_depend dep ON (dep.classid = cls.tableoid AND dep.objid = cls.oid AND dep.refobjsubid = '0' AND dep.refclassid=(SELECT oid FROM pg_class WHERE relname='pg_constraint') AND dep.deptype='i')
-    LEFT OUTER JOIN pg_constraint con ON (con.tableoid = dep.refclassid AND con.oid = dep.refobjid)
-    LEFT OUTER JOIN pg_description des ON des.objoid=cls.oid
-    LEFT OUTER JOIN pg_description desp ON (desp.objoid=con.oid AND desp.objsubid = 0)
+    FROM pg_catalog.pg_index idx
+    JOIN pg_catalog.pg_class cls ON cls.oid=indexrelid
+    JOIN pg_catalog.pg_class tab ON tab.oid=indrelid
+    JOIN pg_catalog.pg_namespace n ON n.oid=tab.relnamespace
+    LEFT JOIN pg_catalog.pg_depend dep ON (dep.classid = cls.tableoid AND dep.objid = cls.oid AND dep.refobjsubid = '0' AND dep.refclassid=(SELECT oid FROM pg_catalog.pg_class WHERE relname='pg_constraint') AND dep.deptype='i')
+    LEFT OUTER JOIN pg_catalog.pg_constraint con ON (con.tableoid = dep.refclassid AND con.oid = dep.refobjid)
+    LEFT OUTER JOIN pg_catalog.pg_description des ON des.objoid=cls.oid
+    LEFT OUTER JOIN pg_catalog.pg_description desp ON (desp.objoid=con.oid AND desp.objsubid = 0)
     WHERE contype IS NULL
     AND {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
@@ -158,10 +158,10 @@ FROM (
             ELSE null
             END::text AS obj_type, pr.proname AS obj_name, pr.oid AS obj_oid, n.oid AS schema_oid, n.nspname AS schema_name, np.oid next_schema_oid, np.nspname next_schema_name,
             pg_catalog.pg_get_function_identity_arguments(pr.oid) AS other_info
-        FROM pg_proc pr left join pg_namespace n
-        ON pr.pronamespace = n.oid left JOIN pg_namespace np
-        ON np.oid=n.nspparent left JOIN pg_type t
-        ON t.oid = pr.prorettype left JOIN pg_language l
+        FROM pg_catalog.pg_proc pr left join pg_catalog.pg_namespace n
+        ON pr.pronamespace = n.oid left JOIN pg_catalog.pg_namespace np
+        ON np.oid=n.nspparent left JOIN pg_catalog.pg_type t
+        ON t.oid = pr.prorettype left JOIN pg_catalog.pg_language l
         ON l.oid = pr.prolang
         WHERE NOT (t.typname = 'trigger' AND l.lanname = 'edbspl')
         AND ({{ CATALOGS.DB_SUPPORT('n') }} AND {{ CATALOGS.DB_SUPPORT('np') }})
@@ -175,7 +175,7 @@ FROM (
 {% endif %}
 {% if all_obj or obj_type in ['event_trigger'] %}
     select 'event_trigger'::text AS obj_type, evtname AS obj_name, ':event_trigger.'||oid||':/' || evtname AS obj_path, ''::text AS schema_name,
-    {{ show_node_prefs['index'] }} AS show_node, NULL AS other_info from pg_event_trigger
+    {{ show_node_prefs['index'] }} AS show_node, NULL AS other_info from pg_catalog.pg_event_trigger
 {% endif %}
 {% if all_obj %}
     UNION
@@ -183,7 +183,7 @@ FROM (
 {% if all_obj or obj_type in ['schema'] %}
     select 'schema'::text AS obj_type, n.nspname AS obj_name,
     ':schema.'||n.oid||':/' || n.nspname as obj_path, n.nspname AS schema_name,
-    {{ show_node_prefs['schema'] }} AS show_node, NULL AS other_info from pg_namespace n
+    {{ show_node_prefs['schema'] }} AS show_node, NULL AS other_info from pg_catalog.pg_namespace n
     where n.nspparent = 0
     AND {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
@@ -200,9 +200,9 @@ FROM (
         else 'should not happen'
     end || t.oid || ':/' || t.relname || '/:column.'|| a.attnum ||':/' || a.attname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['column'] }} AS show_node, NULL AS other_info
-    from pg_attribute a
-    inner join pg_class t on a.attrelid = t.oid and t.relkind in ('r','t','p','v','m')
-    left join pg_namespace n on t.relnamespace = n.oid where a.attnum > 0
+    from pg_catalog.pg_attribute a
+    inner join pg_catalog.pg_class t on a.attrelid = t.oid and t.relkind in ('r','t','p','v','m')
+    left join pg_catalog.pg_namespace n on t.relnamespace = n.oid where a.attnum > 0
     and not t.relispartition
 {% endif %}
 {% if all_obj %}
@@ -227,8 +227,8 @@ FROM (
 			select rel.oid, pt.height+1 as height, rel.relkind,
 				CASE rel.relispartition WHEN true THEN ':partition.' ELSE ':table.' END
 				|| rel.oid || ':/' || rel.relname || '/' || pt.path as path
-			from pg_class rel JOIN pg_namespace nsp ON rel.relnamespace = nsp.oid
-			join pg_inherits inh ON inh.inhparent = rel.oid
+			from pg_catalog.pg_class rel JOIN pg_catalog.pg_namespace nsp ON rel.relnamespace = nsp.oid
+			join pg_catalog.pg_inherits inh ON inh.inhparent = rel.oid
 			join table_path_data pt ON inh.inhrelid = pt.oid
 		)
 		select CASE WHEN relkind = 'p' THEN path ELSE ':table.' || t.oid || ':/' || t.relname END AS path
@@ -242,10 +242,10 @@ FROM (
         WHEN c.contype = 'x' THEN  '/:exclusion_constraint.' ||c.conindid
     END ||':/'|| case when tf.relname is null then c.conname else c.conname || ' -> ' || tf.relname end AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['constraints'] }} AS show_node, NULL AS other_info
-    from pg_constraint c
-    left join pg_class t on c.conrelid = t.oid
-    left join pg_class tf on c.confrelid = tf.oid
-    left join pg_namespace n on t.relnamespace = n.oid
+    from pg_catalog.pg_constraint c
+    left join pg_catalog.pg_class t on c.conrelid = t.oid
+    left join pg_catalog.pg_class tf on c.confrelid = tf.oid
+    left join pg_catalog.pg_namespace n on t.relnamespace = n.oid
     where c.contypid = 0
     {% if obj_type == 'check_constraint' %}
     AND c.contype = 'c'
@@ -278,8 +278,8 @@ FROM (
                             select rel.oid, pt.height+1 as height, rel.relkind,
                                 CASE rel.relispartition WHEN true THEN ':partition.' ELSE ':table.' END
                                 || rel.oid || ':/' || rel.relname || '/' || pt.path as path
-                            from pg_class rel JOIN pg_namespace nsp ON rel.relnamespace = nsp.oid
-                            join pg_inherits inh ON inh.inhparent = rel.oid
+                            from pg_catalog.pg_class rel JOIN pg_catalog.pg_namespace nsp ON rel.relnamespace = nsp.oid
+                            join pg_catalog.pg_inherits inh ON inh.inhparent = rel.oid
                             join table_path_data pt ON inh.inhrelid = pt.oid
                         )
                         select CASE WHEN relkind = 'p' THEN path ELSE ':table.' || t.oid || ':/' || t.relname END AS path
@@ -289,9 +289,9 @@ FROM (
             ||'/:rule.'||r.oid||':/'|| r.rulename AS obj_path,
             n.nspname AS schema_name,
             {{ show_node_prefs['rule'] }} AS show_node, NULL AS other_info
-            from pg_rewrite r
-    inner join pg_class t on r.ev_class = t.oid and t.relkind in ('r','t','p','v')
-    left join pg_namespace n on t.relnamespace = n.oid
+            from pg_catalog.pg_rewrite r
+    inner join pg_catalog.pg_class t on r.ev_class = t.oid and t.relkind in ('r','t','p','v')
+    left join pg_catalog.pg_namespace n on t.relnamespace = n.oid
     where {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
 {% if all_obj %}
@@ -311,8 +311,8 @@ FROM (
                     select rel.oid, pt.height+1 as height, rel.relkind,
                         CASE rel.relispartition WHEN true THEN ':partition.' ELSE ':table.' END
                         || rel.oid || ':/' || rel.relname || '/' || pt.path as path
-                    from pg_class rel JOIN pg_namespace nsp ON rel.relnamespace = nsp.oid
-                    join pg_inherits inh ON inh.inhparent = rel.oid
+                    from pg_catalog.pg_class rel JOIN pg_catalog.pg_namespace nsp ON rel.relnamespace = nsp.oid
+                    join pg_catalog.pg_inherits inh ON inh.inhparent = rel.oid
                     join table_path_data pt ON inh.inhrelid = pt.oid
                 )
                 select CASE WHEN relkind = 'p' THEN path ELSE ':table.' || t.oid || ':/' || t.relname END AS path
@@ -320,9 +320,9 @@ FROM (
             )
         end || '/:trigger.'|| tr.oid || ':/' || tr.tgname AS obj_path, n.nspname AS schema_name,
         {{ show_node_prefs['trigger'] }} AS show_node, NULL AS other_info
-        from pg_trigger tr
-    inner join pg_class t on tr.tgrelid = t.oid and t.relkind in ('r', 't', 'p', 'v')
-    left join pg_namespace n on t.relnamespace = n.oid
+        from pg_catalog.pg_trigger tr
+    inner join pg_catalog.pg_class t on tr.tgrelid = t.oid and t.relkind in ('r', 't', 'p', 'v')
+    left join pg_catalog.pg_namespace n on t.relnamespace = n.oid
     where tr.tgisinternal = false
     and {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
@@ -333,10 +333,10 @@ FROM (
     SELECT 'type'::text AS obj_type, t.typname AS obj_name, ':schema.'||n.oid||':/' || n.nspname ||
         '/:type.'|| t.oid ||':/' || t.typname AS obj_path, n.nspname AS schema_name,
         {{ show_node_prefs['type'] }} AS show_node, NULL AS other_info
-    FROM pg_type t
-    LEFT OUTER JOIN pg_type e ON e.oid=t.typelem
-    LEFT OUTER JOIN pg_class ct ON ct.oid=t.typrelid AND ct.relkind <> 'c'
-    LEFT OUTER JOIN pg_namespace n on t.typnamespace = n.oid
+    FROM pg_catalog.pg_type t
+    LEFT OUTER JOIN pg_catalog.pg_type e ON e.oid=t.typelem
+    LEFT OUTER JOIN pg_catalog.pg_class ct ON ct.oid=t.typrelid AND ct.relkind <> 'c'
+    LEFT OUTER JOIN pg_catalog.pg_namespace n on t.typnamespace = n.oid
     WHERE t.typtype != 'd' AND t.typname NOT LIKE E'\\_%'
     {% if not show_system_objects %}
         AND ct.oid is NULL
@@ -351,9 +351,9 @@ FROM (
     SELECT 'cast'::text AS obj_type, format_type(st.oid,NULL) ||'->'|| format_type(tt.oid,tt.typtypmod) AS obj_name,
     ':cast.'||ca.oid||':/' || format_type(st.oid,NULL) ||'->'|| format_type(tt.oid,tt.typtypmod) AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['cast'] }} AS show_node, NULL AS other_info
-    FROM pg_cast ca
-    JOIN pg_type st ON st.oid=castsource
-    JOIN pg_type tt ON tt.oid=casttarget
+    FROM pg_catalog.pg_cast ca
+    JOIN pg_catalog.pg_type st ON st.oid=castsource
+    JOIN pg_catalog.pg_type tt ON tt.oid=casttarget
     {% if not show_system_objects %}
     WHERE ca.oid > {{last_system_oid}}::OID
     {% endif %}
@@ -365,7 +365,7 @@ FROM (
 {% if all_obj or obj_type in ['publication'] %}
     SELECT 'publication'::text AS obj_type, pubname AS obj_name, ':publication.'||pub.oid||':/' || pubname AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['publication'] }} AS show_node, NULL AS other_info
-    FROM pg_publication pub
+    FROM pg_catalog.pg_publication pub
 {% endif %}
 {% if all_obj %}
     UNION
@@ -374,7 +374,7 @@ FROM (
 {% if all_obj or obj_type in ['subscription'] %}
     SELECT 'subscription'::text AS obj_type, subname AS obj_name, ':subscription.'||pub.oid||':/' || subname AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['subscription'] }} AS show_node, NULL AS other_info
-    FROM pg_subscription pub
+    FROM pg_catalog.pg_subscription pub
 {% endif %}
 {% if all_obj %}
     UNION
@@ -383,7 +383,7 @@ FROM (
 {% if all_obj or obj_type in ['language'] %}
     SELECT 'language'::text AS obj_type, lanname AS obj_name, ':language.'||lan.oid||':/' || lanname AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['language'] }} AS show_node, NULL AS other_info
-    FROM pg_language lan
+    FROM pg_catalog.pg_language lan
     WHERE lanispl IS TRUE
 {% endif %}
 {% if all_obj %}
@@ -392,8 +392,8 @@ FROM (
 {% if all_obj or obj_type in ['fts_configuration'] %}
     SELECT 'fts_configuration'::text AS obj_type, cfg.cfgname AS obj_name, ':schema.'||n.oid||':/' || n.nspname || '/:fts_configuration.'||cfg.oid||':/' || cfg.cfgname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['fts_configuration'] }} AS show_node, NULL AS other_info
-    FROM pg_ts_config cfg
-    left join pg_namespace n on cfg.cfgnamespace = n.oid
+    FROM pg_catalog.pg_ts_config cfg
+    left join pg_catalog.pg_namespace n on cfg.cfgnamespace = n.oid
     WHERE {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
 {% if all_obj %}
@@ -402,8 +402,8 @@ FROM (
 {% if all_obj or obj_type in ['fts_dictionary'] %}
     SELECT 'fts_dictionary' AS obj_type, dict.dictname AS obj_name, ':schema.'||ns.oid||':/' || ns.nspname || '/:fts_dictionary.'||dict.oid||':/' || dict.dictname AS obj_path, ns.nspname AS schema_name,
     {{ show_node_prefs['fts_dictionary'] }} AS show_node, NULL AS other_info
-    FROM pg_ts_dict dict
-    left join pg_namespace ns on dict.dictnamespace = ns.oid
+    FROM pg_catalog.pg_ts_dict dict
+    left join pg_catalog.pg_namespace ns on dict.dictnamespace = ns.oid
     WHERE {{ CATALOGS.DB_SUPPORT('ns') }}
 {% endif %}
 {% if all_obj %}
@@ -412,8 +412,8 @@ FROM (
 {% if all_obj or obj_type in ['fts_parser'] %}
     SELECT 'fts_parser' AS obj_type, prs.prsname AS obj_name, ':schema.'||ns.oid||':/' || ns.nspname || '/:fts_parser.'||prs.oid||':/' || prs.prsname AS obj_path, ns.nspname AS schema_name,
     {{ show_node_prefs['fts_parser'] }} AS show_node, NULL AS other_info
-    FROM pg_ts_parser prs
-    left join pg_namespace ns on prs.prsnamespace = ns.oid
+    FROM pg_catalog.pg_ts_parser prs
+    left join pg_catalog.pg_namespace ns on prs.prsnamespace = ns.oid
     WHERE {{ CATALOGS.DB_SUPPORT('ns') }}
 {% endif %}
 {% if all_obj %}
@@ -422,8 +422,8 @@ FROM (
 {% if all_obj or obj_type in ['fts_template'] %}
     SELECT 'fts_template' AS obj_type, tmpl.tmplname AS obj_name, ':schema.'||ns.oid||':/' || ns.nspname || '/:fts_template.'||tmpl.oid||':/' || tmpl.tmplname AS obj_path, ns.nspname AS schema_name,
     {{ show_node_prefs['fts_template'] }} AS show_node, NULL AS other_info
-    FROM pg_ts_template tmpl
-    left join pg_namespace ns on tmpl.tmplnamespace = ns.oid
+    FROM pg_catalog.pg_ts_template tmpl
+    left join pg_catalog.pg_namespace ns on tmpl.tmplnamespace = ns.oid
     AND {{ CATALOGS.DB_SUPPORT('ns') }}
 {% endif %}
 {% if all_obj %}
@@ -432,8 +432,8 @@ FROM (
 {% if all_obj or obj_type in ['domain'] %}
     select 'domain' AS obj_type, t.typname AS obj_name, ':schema.'||n.oid||':/' || n.nspname || '/:domain.'||t.oid||':/' || t.typname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['domain'] }} AS show_node, NULL AS other_info
-    from pg_type t
-    inner join pg_namespace n on t.typnamespace = n.oid
+    from pg_catalog.pg_type t
+    inner join pg_catalog.pg_namespace n on t.typnamespace = n.oid
     where t.typtype = 'd'
     AND n.nspparent = 0
     AND {{ CATALOGS.DB_SUPPORT('n') }}
@@ -446,8 +446,8 @@ FROM (
         c.conname AS obj_name, ':schema.'||n.oid||':/' || n.nspname || '/:domain.'||t.oid||':/' || t.typname || '/:domain_constraints.'||c.oid||':/' || c.conname AS obj_path,
         n.nspname AS schema_name,
         {{ show_node_prefs['domain_constraints'] }} AS show_node, NULL AS other_info
-    FROM pg_constraint c JOIN pg_type t
-    ON t.oid=contypid JOIN pg_namespace n
+    FROM pg_catalog.pg_constraint c JOIN pg_catalog.pg_type t
+    ON t.oid=contypid JOIN pg_catalog.pg_namespace n
     ON n.oid=t.typnamespace
     WHERE t.typtype = 'd'
     AND n.nspparent = 0
@@ -459,7 +459,7 @@ FROM (
 {% if all_obj or obj_type in ['foreign_data_wrapper'] %}
     select 'foreign_data_wrapper' AS obj_type, fdwname AS obj_name, ':foreign_data_wrapper.'||oid||':/' || fdwname AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['foreign_data_wrapper'] }} AS show_node, NULL AS other_info
-    from pg_foreign_data_wrapper
+    from pg_catalog.pg_foreign_data_wrapper
 {% endif %}
 {% if all_obj %}
     UNION
@@ -467,8 +467,8 @@ FROM (
 {% if all_obj or obj_type in ['foreign_server'] %}
     select 'foreign_server' AS obj_type, sr.srvname AS obj_name, ':foreign_data_wrapper.'||fdw.oid||':/' || fdw.fdwname || '/:foreign_server.'||sr.oid||':/' || sr.srvname AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['foreign_server'] }} AS show_node, NULL AS other_info
-    from pg_foreign_server sr
-    inner join pg_foreign_data_wrapper fdw on sr.srvfdw = fdw.oid
+    from pg_catalog.pg_foreign_server sr
+    inner join pg_catalog.pg_foreign_data_wrapper fdw on sr.srvfdw = fdw.oid
 {% endif %}
 {% if all_obj %}
     UNION
@@ -476,9 +476,9 @@ FROM (
 {% if all_obj or obj_type in ['user_mapping'] %}
     select 'user_mapping' AS obj_type, um.usename AS obj_name, ':foreign_data_wrapper.'||fdw.oid||':/' || fdw.fdwname || '/:foreign_server.'||sr.oid||':/' || sr.srvname || '/:user_mapping.'||um.umid||':/' || um.usename AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['user_mapping'] }} AS show_node, NULL AS other_info
-    from pg_user_mappings um
-    inner join pg_foreign_server sr on um.srvid = sr.oid
-    inner join pg_foreign_data_wrapper fdw on sr.srvfdw = fdw.oid
+    from pg_catalog.pg_user_mappings um
+    inner join pg_catalog.pg_foreign_server sr on um.srvid = sr.oid
+    inner join pg_catalog.pg_foreign_data_wrapper fdw on sr.srvfdw = fdw.oid
 {% endif %}
 {% if all_obj %}
     UNION
@@ -486,9 +486,9 @@ FROM (
 {% if all_obj or obj_type in ['foreign_table'] %}
     select 'foreign_table' AS obj_type, c.relname AS obj_name, ':schema.'||ns.oid||':/' || ns.nspname || '/:foreign_table.'||c.oid||':/' || c.relname AS obj_path, ns.nspname AS schema_name,
     {{ show_node_prefs['foreign_table'] }} AS show_node, NULL AS other_info
-    from pg_foreign_table ft
-    inner join pg_class c on ft.ftrelid = c.oid
-    inner join pg_namespace ns on c.relnamespace = ns.oid
+    from pg_catalog.pg_foreign_table ft
+    inner join pg_catalog.pg_class c on ft.ftrelid = c.oid
+    inner join pg_catalog.pg_namespace ns on c.relnamespace = ns.oid
     AND {{ CATALOGS.DB_SUPPORT('ns') }}
 {% endif %}
 {% if all_obj %}
@@ -497,9 +497,9 @@ FROM (
 {% if all_obj or obj_type in ['extension'] %}
     select 'extension' AS obj_type, x.extname AS obj_name, ':extension.'||x.oid||':/' || x.extname AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['extension'] }} AS show_node, NULL AS other_info
-    FROM pg_extension x
-    JOIN pg_namespace n on x.extnamespace=n.oid
-    join pg_available_extensions() e(name, default_version, comment) ON x.extname=e.name
+    FROM pg_catalog.pg_extension x
+    JOIN pg_catalog.pg_namespace n on x.extnamespace=n.oid
+    join pg_catalog.pg_available_extensions() e(name, default_version, comment) ON x.extname=e.name
 {% endif %}
 {% if all_obj %}
     UNION
@@ -507,8 +507,8 @@ FROM (
 {% if all_obj or obj_type in ['collation'] %}
     SELECT 'collation' AS obj_type, c.collname AS obj_name, ':schema.'||n.oid||':/' || n.nspname || '/:collation.'||c.oid||':/' || c.collname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['collation'] }} AS show_node, NULL AS other_info
-    FROM pg_collation c
-    JOIN pg_namespace n ON n.oid=c.collnamespace
+    FROM pg_catalog.pg_collation c
+    JOIN pg_catalog.pg_namespace n ON n.oid=c.collnamespace
     WHERE {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
 {% if all_obj %}
@@ -517,8 +517,8 @@ FROM (
 {% if all_obj or obj_type in ['synonym'] %}
     SELECT 'synonym' AS obj_type, s.synname AS obj_name, ':schema.'||n.oid||':/' || n.nspname || '/:synonym.'||s.oid||':/' || s.synname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['synonym'] }} AS show_node, NULL AS other_info
-    FROM pg_synonym s
-    JOIN pg_namespace n ON n.oid=s.synnamespace
+    FROM pg_catalog.pg_synonym s
+    JOIN pg_catalog.pg_namespace n ON n.oid=s.synnamespace
     WHERE {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
 {% if all_obj %}
@@ -527,8 +527,8 @@ FROM (
 {% if all_obj or obj_type in ['package'] %}
     SELECT 'package' AS obj_type, p.nspname AS obj_name, ':schema.'||n.oid||':/' || n.nspname || '/:package.'||p.oid||':/' || p.nspname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['package'] }} AS show_node, NULL AS other_info
-    FROM pg_namespace p
-    JOIN pg_namespace n ON n.oid=p.nspparent
+    FROM pg_catalog.pg_namespace p
+    JOIN pg_catalog.pg_namespace n ON n.oid=p.nspparent
     WHERE {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
 {% if all_obj %}
@@ -538,8 +538,8 @@ FROM (
     SELECT 'edbvar' AS obj_type, v.varname AS obj_name,
     ':schema.'||n.oid||':/' || n.nspname || '/:package.'||p.oid||':/' || p.nspname || '/:edbvar.'||v.oid||':/' || v.varname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['edbvar'] }} AS show_node, NULL AS other_info
-    FROM edb_variable v JOIN pg_namespace p
-    ON v.varpackage = p.oid JOIN pg_namespace n
+    FROM pg_catalog.edb_variable v JOIN pg_catalog.pg_namespace p
+    ON v.varpackage = p.oid JOIN pg_catalog.pg_namespace n
     ON p.nspparent = n.oid
     WHERE {{ CATALOGS.DB_SUPPORT('p') }}
     AND {{ CATALOGS.DB_SUPPORT('n') }}
@@ -559,8 +559,8 @@ FROM (
                             select rel.oid, pt.height+1 as height, rel.relkind,
                                 CASE rel.relispartition WHEN true THEN ':partition.' ELSE ':table.' END
                                 || rel.oid || ':/' || rel.relname || '/' || pt.path as path
-                            from pg_class rel JOIN pg_namespace nsp ON rel.relnamespace = nsp.oid
-                            join pg_inherits inh ON inh.inhparent = rel.oid
+                            from pg_catalog.pg_class rel JOIN pg_catalog.pg_namespace nsp ON rel.relnamespace = nsp.oid
+                            join pg_catalog.pg_inherits inh ON inh.inhparent = rel.oid
                             join table_path_data pt ON inh.inhrelid = pt.oid
                         )
                         select CASE WHEN relkind = 'p' THEN path ELSE ':table.' || t.oid || ':/' || t.relname END AS path
@@ -569,10 +569,10 @@ FROM (
             end
             ||'/:row_security_policy.'|| pl.oid ||':/'|| pl.polname AS obj_path, n.nspname AS schema_name,
             {{ show_node_prefs['row_security_policy'] }} AS show_node, NULL AS other_info
-            FROM pg_policy pl
-    JOIN pg_class t on pl.polrelid = t.oid and t.relkind in ('r','t','p')
-    JOIN pg_policies rw ON (pl.polname=rw.policyname AND t.relname=rw.tablename)
-    JOIN pg_namespace n on t.relnamespace = n.oid
+            FROM pg_catalog.pg_policy pl
+    JOIN pg_catalog.pg_class t on pl.polrelid = t.oid and t.relkind in ('r','t','p')
+    JOIN pg_catalog.pg_policies rw ON (pl.polname=rw.policyname AND t.relname=rw.tablename)
+    JOIN pg_catalog.pg_namespace n on t.relnamespace = n.oid
     where {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
 
diff --git a/web/pgadmin/tools/search_objects/templates/search_objects/sql/ppas/12_plus/search.sql b/web/pgadmin/tools/search_objects/templates/search_objects/sql/ppas/12_plus/search.sql
index 3633974ec..019b02ccb 100644
--- a/web/pgadmin/tools/search_objects/templates/search_objects/sql/ppas/12_plus/search.sql
+++ b/web/pgadmin/tools/search_objects/templates/search_objects/sql/ppas/12_plus/search.sql
@@ -4,7 +4,7 @@
 {% set all_obj = true %}
 {% endif %}
 SELECT obj_type, obj_name,
-    REPLACE(obj_path, '/'||sn.schema_name||'/', '/'||{{ CATALOGS.LABELS_SCHEMACOL('sn.schema_name', _) }}||'/') AS obj_path,
+    pg_catalog.REPLACE(obj_path, '/'||sn.schema_name||'/', '/'||{{ CATALOGS.LABELS_SCHEMACOL('sn.schema_name', _) }}||'/') AS obj_path,
     schema_name, show_node, other_info,
     CASE
         WHEN {{ CATALOGS.IS_CATALOG_SCHEMA('sn.schema_name') }} THEN
@@ -33,8 +33,8 @@ FROM (
         WHEN c.relkind = 'm' THEN {{ show_node_prefs['mview'] }}
         ELSE False
     END AS show_node, NULL AS other_info
-    FROM pg_class c
-    LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
+    FROM pg_catalog.pg_class c
+    LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
     {% if all_obj %}
     WHERE c.relkind in ('S','v','m')
     {% elif obj_type == 'sequence' %}
@@ -59,8 +59,8 @@ FROM (
 			select rel.oid, pt.height+1 as height, rel.relkind,
 				CASE rel.relispartition WHEN true THEN ':partition.' ELSE ':table.' END
 				|| rel.oid || ':/' || rel.relname || '/' || pt.path as path
-			from pg_class rel JOIN pg_namespace nsp ON rel.relnamespace = nsp.oid
-			join pg_inherits inh ON inh.inhparent = rel.oid
+			from pg_catalog.pg_class rel JOIN pg_catalog.pg_namespace nsp ON rel.relnamespace = nsp.oid
+			join pg_catalog.pg_inherits inh ON inh.inhparent = rel.oid
 			join table_path_data pt ON inh.inhrelid = pt.oid
 		)
 		select CASE WHEN relkind = 'p' THEN path ELSE ':table.' || c.oid || ':/' || c.relname END AS path
@@ -69,8 +69,8 @@ FROM (
 	CASE WHEN c.relispartition THEN {{ show_node_prefs['partition'] }}
 	    ELSE {{ show_node_prefs['table'] }} END AS show_node,
     NULL AS other_info
-    FROM pg_class c
-    LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
+    FROM pg_catalog.pg_class c
+    LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
     WHERE c.relkind in ('p','r','t')
     {% if obj_type == 'table' %}
     AND NOT c.relispartition
@@ -95,8 +95,8 @@ FROM (
                         select rel.oid, pt.height+1 as height, rel.relkind,
                             CASE rel.relispartition WHEN true THEN ':partition.' ELSE ':table.' END
                             || rel.oid || ':/' || rel.relname || '/' || pt.path as path
-                        from pg_class rel JOIN pg_namespace nsp ON rel.relnamespace = nsp.oid
-                        join pg_inherits inh ON inh.inhparent = rel.oid
+                        from pg_catalog.pg_class rel JOIN pg_catalog.pg_namespace nsp ON rel.relnamespace = nsp.oid
+                        join pg_catalog.pg_inherits inh ON inh.inhparent = rel.oid
                         join table_path_data pt ON inh.inhrelid = pt.oid
                     )
                     select CASE WHEN relkind = 'p' THEN path ELSE ':table.' || tab.oid || ':/' || tab.relname END AS path
@@ -105,14 +105,14 @@ FROM (
         end
         || '/:index.'|| cls.oid ||':/' || cls.relname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['index'] }} AS show_node, NULL AS other_info
-    FROM pg_index idx
-    JOIN pg_class cls ON cls.oid=indexrelid
-    JOIN pg_class tab ON tab.oid=indrelid
-    JOIN pg_namespace n ON n.oid=tab.relnamespace
-    LEFT JOIN pg_depend dep ON (dep.classid = cls.tableoid AND dep.objid = cls.oid AND dep.refobjsubid = '0' AND dep.refclassid=(SELECT oid FROM pg_class WHERE relname='pg_constraint') AND dep.deptype='i')
-    LEFT OUTER JOIN pg_constraint con ON (con.tableoid = dep.refclassid AND con.oid = dep.refobjid)
-    LEFT OUTER JOIN pg_description des ON des.objoid=cls.oid
-    LEFT OUTER JOIN pg_description desp ON (desp.objoid=con.oid AND desp.objsubid = 0)
+    FROM pg_catalog.pg_index idx
+    JOIN pg_catalog.pg_class cls ON cls.oid=indexrelid
+    JOIN pg_catalog.pg_class tab ON tab.oid=indrelid
+    JOIN pg_catalog.pg_namespace n ON n.oid=tab.relnamespace
+    LEFT JOIN pg_catalog.pg_depend dep ON (dep.classid = cls.tableoid AND dep.objid = cls.oid AND dep.refobjsubid = '0' AND dep.refclassid=(SELECT oid FROM pg_class WHERE relname='pg_constraint') AND dep.deptype='i')
+    LEFT OUTER JOIN pg_catalog.pg_constraint con ON (con.tableoid = dep.refclassid AND con.oid = dep.refobjid)
+    LEFT OUTER JOIN pg_catalog.pg_description des ON des.objoid=cls.oid
+    LEFT OUTER JOIN pg_catalog.pg_description desp ON (desp.objoid=con.oid AND desp.objsubid = 0)
     WHERE contype IS NULL
     AND {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
@@ -158,10 +158,10 @@ FROM (
             ELSE null
             END::text AS obj_type, pr.proname AS obj_name, pr.oid AS obj_oid, n.oid AS schema_oid, n.nspname AS schema_name, np.oid next_schema_oid, np.nspname next_schema_name,
             pg_catalog.pg_get_function_identity_arguments(pr.oid) AS other_info
-        FROM pg_proc pr left join pg_namespace n
-        ON pr.pronamespace = n.oid left JOIN pg_namespace np
-        ON np.oid=n.nspparent left JOIN pg_type t
-        ON t.oid = pr.prorettype left JOIN pg_language l
+        FROM pg_catalog.pg_proc pr left join pg_catalog.pg_namespace n
+        ON pr.pronamespace = n.oid left JOIN pg_catalog.pg_namespace np
+        ON np.oid=n.nspparent left JOIN pg_catalog.pg_type t
+        ON t.oid = pr.prorettype left JOIN pg_catalog.pg_language l
         ON l.oid = pr.prolang
         WHERE NOT (t.typname = 'trigger' AND l.lanname = 'edbspl')
         AND ({{ CATALOGS.DB_SUPPORT('n') }} AND {{ CATALOGS.DB_SUPPORT('np') }})
@@ -175,7 +175,7 @@ FROM (
 {% endif %}
 {% if all_obj or obj_type in ['event_trigger'] %}
     select 'event_trigger'::text AS obj_type, evtname AS obj_name, ':event_trigger.'||oid||':/' || evtname AS obj_path, ''::text AS schema_name,
-    {{ show_node_prefs['index'] }} AS show_node, NULL AS other_info from pg_event_trigger
+    {{ show_node_prefs['index'] }} AS show_node, NULL AS other_info from pg_catalog.pg_event_trigger
 {% endif %}
 {% if all_obj %}
     UNION
@@ -183,7 +183,7 @@ FROM (
 {% if all_obj or obj_type in ['schema'] %}
     select 'schema'::text AS obj_type, n.nspname AS obj_name,
     ':schema.'||n.oid||':/' || n.nspname as obj_path, n.nspname AS schema_name,
-    {{ show_node_prefs['schema'] }} AS show_node, NULL AS other_info from pg_namespace n
+    {{ show_node_prefs['schema'] }} AS show_node, NULL AS other_info from pg_catalog.pg_namespace n
     where n.nspparent = 0
     AND {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
@@ -200,9 +200,9 @@ FROM (
         else 'should not happen'
     end || t.oid || ':/' || t.relname || '/:column.'|| a.attnum ||':/' || a.attname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['column'] }} AS show_node, NULL AS other_info
-    from pg_attribute a
-    inner join pg_class t on a.attrelid = t.oid and t.relkind in ('r','t','p','v','m')
-    left join pg_namespace n on t.relnamespace = n.oid where a.attnum > 0
+    from pg_catalog.pg_attribute a
+    inner join pg_catalog.pg_class t on a.attrelid = t.oid and t.relkind in ('r','t','p','v','m')
+    left join pg_catalog.pg_namespace n on t.relnamespace = n.oid where a.attnum > 0
     and not t.relispartition
 {% endif %}
 {% if all_obj %}
@@ -227,8 +227,8 @@ FROM (
 			select rel.oid, pt.height+1 as height, rel.relkind,
 				CASE rel.relispartition WHEN true THEN ':partition.' ELSE ':table.' END
 				|| rel.oid || ':/' || rel.relname || '/' || pt.path as path
-			from pg_class rel JOIN pg_namespace nsp ON rel.relnamespace = nsp.oid
-			join pg_inherits inh ON inh.inhparent = rel.oid
+			from pg_catalog.pg_class rel JOIN pg_catalog.pg_namespace nsp ON rel.relnamespace = nsp.oid
+			join pg_catalog.pg_inherits inh ON inh.inhparent = rel.oid
 			join table_path_data pt ON inh.inhrelid = pt.oid
 		)
 		select CASE WHEN relkind = 'p' THEN path ELSE ':table.' || t.oid || ':/' || t.relname END AS path
@@ -242,10 +242,10 @@ FROM (
         WHEN c.contype = 'x' THEN  '/:exclusion_constraint.' ||c.conindid
     END ||':/'|| case when tf.relname is null then c.conname else c.conname || ' -> ' || tf.relname end AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['constraints'] }} AS show_node, NULL AS other_info
-    from pg_constraint c
-    left join pg_class t on c.conrelid = t.oid
-    left join pg_class tf on c.confrelid = tf.oid
-    left join pg_namespace n on t.relnamespace = n.oid
+    from pg_catalog.pg_constraint c
+    left join pg_catalog.pg_class t on c.conrelid = t.oid
+    left join pg_catalog.pg_class tf on c.confrelid = tf.oid
+    left join pg_catalog.pg_namespace n on t.relnamespace = n.oid
     where c.contypid = 0
     {% if obj_type == 'check_constraint' %}
     AND c.contype = 'c'
@@ -278,8 +278,8 @@ FROM (
                             select rel.oid, pt.height+1 as height, rel.relkind,
                                 CASE rel.relispartition WHEN true THEN ':partition.' ELSE ':table.' END
                                 || rel.oid || ':/' || rel.relname || '/' || pt.path as path
-                            from pg_class rel JOIN pg_namespace nsp ON rel.relnamespace = nsp.oid
-                            join pg_inherits inh ON inh.inhparent = rel.oid
+                            from pg_catalog.pg_class rel JOIN pg_catalog.pg_namespace nsp ON rel.relnamespace = nsp.oid
+                            join pg_catalog.pg_inherits inh ON inh.inhparent = rel.oid
                             join table_path_data pt ON inh.inhrelid = pt.oid
                         )
                         select CASE WHEN relkind = 'p' THEN path ELSE ':table.' || t.oid || ':/' || t.relname END AS path
@@ -289,9 +289,9 @@ FROM (
             ||'/:rule.'||r.oid||':/'|| r.rulename AS obj_path,
             n.nspname AS schema_name,
             {{ show_node_prefs['rule'] }} AS show_node, NULL AS other_info
-            from pg_rewrite r
-    inner join pg_class t on r.ev_class = t.oid and t.relkind in ('r','t','p','v')
-    left join pg_namespace n on t.relnamespace = n.oid
+            from pg_catalog.pg_rewrite r
+    inner join pg_catalog.pg_class t on r.ev_class = t.oid and t.relkind in ('r','t','p','v')
+    left join pg_catalog.pg_namespace n on t.relnamespace = n.oid
     where {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
 {% if all_obj %}
@@ -312,8 +312,8 @@ FROM (
                     select rel.oid, pt.height+1 as height, rel.relkind,
                         CASE rel.relispartition WHEN true THEN ':partition.' ELSE ':table.' END
                         || rel.oid || ':/' || rel.relname || '/' || pt.path as path
-                    from pg_class rel JOIN pg_namespace nsp ON rel.relnamespace = nsp.oid
-                    join pg_inherits inh ON inh.inhparent = rel.oid
+                    from pg_catalog.pg_class rel JOIN pg_catalog.pg_namespace nsp ON rel.relnamespace = nsp.oid
+                    join pg_catalog.pg_inherits inh ON inh.inhparent = rel.oid
                     join table_path_data pt ON inh.inhrelid = pt.oid
                 )
                 select CASE WHEN relkind = 'p' THEN path ELSE ':table.' || t.oid || ':/' || t.relname END AS path
@@ -322,9 +322,9 @@ FROM (
         end || CASE WHEN tr.tgpackageoid != 0 THEN '/:compound_trigger.' ELSE '/:trigger.' END || tr.oid || ':/' || tr.tgname AS obj_path, n.nspname AS schema_name,
         CASE WHEN tr.tgpackageoid != 0 THEN {{ show_node_prefs['compound_trigger'] }} ELSE {{ show_node_prefs['trigger'] }} END AS show_node,
         NULL AS other_info
-        from pg_trigger tr
-    inner join pg_class t on tr.tgrelid = t.oid and t.relkind in ('r', 't', 'p', 'v')
-    left join pg_namespace n on t.relnamespace = n.oid
+        from pg_catalog.pg_trigger tr
+    inner join pg_catalog.pg_class t on tr.tgrelid = t.oid and t.relkind in ('r', 't', 'p', 'v')
+    left join pg_catalog.pg_namespace n on t.relnamespace = n.oid
     where tr.tgisinternal = false
     and {{ CATALOGS.DB_SUPPORT('n') }}
     {% if obj_type == 'compound_trigger' %}
@@ -340,10 +340,10 @@ FROM (
     SELECT 'type'::text AS obj_type, t.typname AS obj_name, ':schema.'||n.oid||':/' || n.nspname ||
         '/:type.'|| t.oid ||':/' || t.typname AS obj_path, n.nspname AS schema_name,
         {{ show_node_prefs['type'] }} AS show_node, NULL AS other_info
-    FROM pg_type t
-    LEFT OUTER JOIN pg_type e ON e.oid=t.typelem
-    LEFT OUTER JOIN pg_class ct ON ct.oid=t.typrelid AND ct.relkind <> 'c'
-    LEFT OUTER JOIN pg_namespace n on t.typnamespace = n.oid
+    FROM pg_catalog.pg_type t
+    LEFT OUTER JOIN pg_catalog.pg_type e ON e.oid=t.typelem
+    LEFT OUTER JOIN pg_catalog.pg_class ct ON ct.oid=t.typrelid AND ct.relkind <> 'c'
+    LEFT OUTER JOIN pg_catalog.pg_namespace n on t.typnamespace = n.oid
     WHERE t.typtype != 'd' AND t.typname NOT LIKE E'\\_%'
     {% if not show_system_objects %}
         AND ct.oid is NULL
@@ -358,9 +358,9 @@ FROM (
     SELECT 'cast'::text AS obj_type, format_type(st.oid,NULL) ||'->'|| format_type(tt.oid,tt.typtypmod) AS obj_name,
     ':cast.'||ca.oid||':/' || format_type(st.oid,NULL) ||'->'|| format_type(tt.oid,tt.typtypmod) AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['cast'] }} AS show_node, NULL AS other_info
-    FROM pg_cast ca
-    JOIN pg_type st ON st.oid=castsource
-    JOIN pg_type tt ON tt.oid=casttarget
+    FROM pg_catalog.pg_cast ca
+    JOIN pg_catalog.pg_type st ON st.oid=castsource
+    JOIN pg_catalog.pg_type tt ON tt.oid=casttarget
     {% if not show_system_objects %}
     WHERE ca.oid > {{last_system_oid}}::OID
     {% endif %}
@@ -372,7 +372,7 @@ FROM (
 {% if all_obj or obj_type in ['publication'] %}
     SELECT 'publication'::text AS obj_type, pubname AS obj_name, ':publication.'||pub.oid||':/' || pubname AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['publication'] }} AS show_node, NULL AS other_info
-    FROM pg_publication pub
+    FROM pg_catalog.pg_publication pub
 {% endif %}
 {% if all_obj %}
     UNION
@@ -381,7 +381,7 @@ FROM (
 {% if all_obj or obj_type in ['subscription'] %}
     SELECT 'subscription'::text AS obj_type, subname AS obj_name, ':subscription.'||pub.oid||':/' || subname AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['subscription'] }} AS show_node, NULL AS other_info
-    FROM pg_subscription pub
+    FROM pg_catalog.pg_subscription pub
 {% endif %}
 {% if all_obj %}
     UNION
@@ -390,7 +390,7 @@ FROM (
 {% if all_obj or obj_type in ['language'] %}
     SELECT 'language'::text AS obj_type, lanname AS obj_name, ':language.'||lan.oid||':/' || lanname AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['language'] }} AS show_node, NULL AS other_info
-    FROM pg_language lan
+    FROM pg_catalog.pg_language lan
     WHERE lanispl IS TRUE
 {% endif %}
 {% if all_obj %}
@@ -399,8 +399,8 @@ FROM (
 {% if all_obj or obj_type in ['fts_configuration'] %}
     SELECT 'fts_configuration'::text AS obj_type, cfg.cfgname AS obj_name, ':schema.'||n.oid||':/' || n.nspname || '/:fts_configuration.'||cfg.oid||':/' || cfg.cfgname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['fts_configuration'] }} AS show_node, NULL AS other_info
-    FROM pg_ts_config cfg
-    left join pg_namespace n on cfg.cfgnamespace = n.oid
+    FROM pg_catalog.pg_ts_config cfg
+    left join pg_catalog.pg_namespace n on cfg.cfgnamespace = n.oid
     WHERE {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
 {% if all_obj %}
@@ -409,8 +409,8 @@ FROM (
 {% if all_obj or obj_type in ['fts_dictionary'] %}
     SELECT 'fts_dictionary' AS obj_type, dict.dictname AS obj_name, ':schema.'||ns.oid||':/' || ns.nspname || '/:fts_dictionary.'||dict.oid||':/' || dict.dictname AS obj_path, ns.nspname AS schema_name,
     {{ show_node_prefs['fts_dictionary'] }} AS show_node, NULL AS other_info
-    FROM pg_ts_dict dict
-    left join pg_namespace ns on dict.dictnamespace = ns.oid
+    FROM pg_catalog.pg_ts_dict dict
+    left join pg_catalog.pg_namespace ns on dict.dictnamespace = ns.oid
     WHERE {{ CATALOGS.DB_SUPPORT('ns') }}
 {% endif %}
 {% if all_obj %}
@@ -419,8 +419,8 @@ FROM (
 {% if all_obj or obj_type in ['fts_parser'] %}
     SELECT 'fts_parser' AS obj_type, prs.prsname AS obj_name, ':schema.'||ns.oid||':/' || ns.nspname || '/:fts_parser.'||prs.oid||':/' || prs.prsname AS obj_path, ns.nspname AS schema_name,
     {{ show_node_prefs['fts_parser'] }} AS show_node, NULL AS other_info
-    FROM pg_ts_parser prs
-    left join pg_namespace ns on prs.prsnamespace = ns.oid
+    FROM pg_catalog.pg_ts_parser prs
+    left join pg_catalog.pg_namespace ns on prs.prsnamespace = ns.oid
     WHERE {{ CATALOGS.DB_SUPPORT('ns') }}
 {% endif %}
 {% if all_obj %}
@@ -429,8 +429,8 @@ FROM (
 {% if all_obj or obj_type in ['fts_template'] %}
     SELECT 'fts_template' AS obj_type, tmpl.tmplname AS obj_name, ':schema.'||ns.oid||':/' || ns.nspname || '/:fts_template.'||tmpl.oid||':/' || tmpl.tmplname AS obj_path, ns.nspname AS schema_name,
     {{ show_node_prefs['fts_template'] }} AS show_node, NULL AS other_info
-    FROM pg_ts_template tmpl
-    left join pg_namespace ns on tmpl.tmplnamespace = ns.oid
+    FROM pg_catalog.pg_ts_template tmpl
+    left join pg_catalog.pg_namespace ns on tmpl.tmplnamespace = ns.oid
     AND {{ CATALOGS.DB_SUPPORT('ns') }}
 {% endif %}
 {% if all_obj %}
@@ -439,8 +439,8 @@ FROM (
 {% if all_obj or obj_type in ['domain'] %}
     select 'domain' AS obj_type, t.typname AS obj_name, ':schema.'||n.oid||':/' || n.nspname || '/:domain.'||t.oid||':/' || t.typname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['domain'] }} AS show_node, NULL AS other_info
-    from pg_type t
-    inner join pg_namespace n on t.typnamespace = n.oid
+    from pg_catalog.pg_type t
+    inner join pg_catalog.pg_namespace n on t.typnamespace = n.oid
     where t.typtype = 'd'
     AND n.nspparent = 0
     AND {{ CATALOGS.DB_SUPPORT('n') }}
@@ -453,8 +453,8 @@ FROM (
         c.conname AS obj_name, ':schema.'||n.oid||':/' || n.nspname || '/:domain.'||t.oid||':/' || t.typname || '/:domain_constraints.'||c.oid||':/' || c.conname AS obj_path,
         n.nspname AS schema_name,
         {{ show_node_prefs['domain_constraints'] }} AS show_node, NULL AS other_info
-    FROM pg_constraint c JOIN pg_type t
-    ON t.oid=contypid JOIN pg_namespace n
+    FROM pg_catalog.pg_constraint c JOIN pg_catalog.pg_type t
+    ON t.oid=contypid JOIN pg_catalog.pg_namespace n
     ON n.oid=t.typnamespace
     WHERE t.typtype = 'd'
     AND n.nspparent = 0
@@ -466,7 +466,7 @@ FROM (
 {% if all_obj or obj_type in ['foreign_data_wrapper'] %}
     select 'foreign_data_wrapper' AS obj_type, fdwname AS obj_name, ':foreign_data_wrapper.'||oid||':/' || fdwname AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['foreign_data_wrapper'] }} AS show_node, NULL AS other_info
-    from pg_foreign_data_wrapper
+    from pg_catalog.pg_foreign_data_wrapper
 {% endif %}
 {% if all_obj %}
     UNION
@@ -474,8 +474,8 @@ FROM (
 {% if all_obj or obj_type in ['foreign_server'] %}
     select 'foreign_server' AS obj_type, sr.srvname AS obj_name, ':foreign_data_wrapper.'||fdw.oid||':/' || fdw.fdwname || '/:foreign_server.'||sr.oid||':/' || sr.srvname AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['foreign_server'] }} AS show_node, NULL AS other_info
-    from pg_foreign_server sr
-    inner join pg_foreign_data_wrapper fdw on sr.srvfdw = fdw.oid
+    from pg_catalog.pg_foreign_server sr
+    inner join pg_catalog.pg_foreign_data_wrapper fdw on sr.srvfdw = fdw.oid
 {% endif %}
 {% if all_obj %}
     UNION
@@ -483,9 +483,9 @@ FROM (
 {% if all_obj or obj_type in ['user_mapping'] %}
     select 'user_mapping' AS obj_type, um.usename AS obj_name, ':foreign_data_wrapper.'||fdw.oid||':/' || fdw.fdwname || '/:foreign_server.'||sr.oid||':/' || sr.srvname || '/:user_mapping.'||um.umid||':/' || um.usename AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['user_mapping'] }} AS show_node, NULL AS other_info
-    from pg_user_mappings um
-    inner join pg_foreign_server sr on um.srvid = sr.oid
-    inner join pg_foreign_data_wrapper fdw on sr.srvfdw = fdw.oid
+    from pg_catalog.pg_user_mappings um
+    inner join pg_catalog.pg_foreign_server sr on um.srvid = sr.oid
+    inner join pg_catalog.pg_foreign_data_wrapper fdw on sr.srvfdw = fdw.oid
 {% endif %}
 {% if all_obj %}
     UNION
@@ -493,9 +493,9 @@ FROM (
 {% if all_obj or obj_type in ['foreign_table'] %}
     select 'foreign_table' AS obj_type, c.relname AS obj_name, ':schema.'||ns.oid||':/' || ns.nspname || '/:foreign_table.'||c.oid||':/' || c.relname AS obj_path, ns.nspname AS schema_name,
     {{ show_node_prefs['foreign_table'] }} AS show_node, NULL AS other_info
-    from pg_foreign_table ft
-    inner join pg_class c on ft.ftrelid = c.oid
-    inner join pg_namespace ns on c.relnamespace = ns.oid
+    from pg_catalog.pg_foreign_table ft
+    inner join pg_catalog.pg_class c on ft.ftrelid = c.oid
+    inner join pg_catalog.pg_namespace ns on c.relnamespace = ns.oid
     AND {{ CATALOGS.DB_SUPPORT('ns') }}
 {% endif %}
 {% if all_obj %}
@@ -504,9 +504,9 @@ FROM (
 {% if all_obj or obj_type in ['extension'] %}
     select 'extension' AS obj_type, x.extname AS obj_name, ':extension.'||x.oid||':/' || x.extname AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['extension'] }} AS show_node, NULL AS other_info
-    FROM pg_extension x
-    JOIN pg_namespace n on x.extnamespace=n.oid
-    join pg_available_extensions() e(name, default_version, comment) ON x.extname=e.name
+    FROM pg_catalog.pg_extension x
+    JOIN pg_catalog.pg_namespace n on x.extnamespace=n.oid
+    join pg_catalog.pg_available_extensions() e(name, default_version, comment) ON x.extname=e.name
 {% endif %}
 {% if all_obj %}
     UNION
@@ -514,8 +514,8 @@ FROM (
 {% if all_obj or obj_type in ['collation'] %}
     SELECT 'collation' AS obj_type, c.collname AS obj_name, ':schema.'||n.oid||':/' || n.nspname || '/:collation.'||c.oid||':/' || c.collname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['collation'] }} AS show_node, NULL AS other_info
-    FROM pg_collation c
-    JOIN pg_namespace n ON n.oid=c.collnamespace
+    FROM pg_catalog.pg_collation c
+    JOIN pg_catalog.pg_namespace n ON n.oid=c.collnamespace
     WHERE {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
 {% if all_obj %}
@@ -524,8 +524,8 @@ FROM (
 {% if all_obj or obj_type in ['synonym'] %}
     SELECT 'synonym' AS obj_type, s.synname AS obj_name, ':schema.'||n.oid||':/' || n.nspname || '/:synonym.'||s.oid||':/' || s.synname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['synonym'] }} AS show_node, NULL AS other_info
-    FROM pg_synonym s
-    JOIN pg_namespace n ON n.oid=s.synnamespace
+    FROM pg_catalog.pg_synonym s
+    JOIN pg_catalog.pg_namespace n ON n.oid=s.synnamespace
     WHERE {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
 {% if all_obj %}
@@ -534,8 +534,8 @@ FROM (
 {% if all_obj or obj_type in ['package'] %}
     SELECT 'package' AS obj_type, p.nspname AS obj_name, ':schema.'||n.oid||':/' || n.nspname || '/:package.'||p.oid||':/' || p.nspname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['package'] }} AS show_node, NULL AS other_info
-    FROM pg_namespace p
-    JOIN pg_namespace n ON n.oid=p.nspparent
+    FROM pg_catalog.pg_namespace p
+    JOIN pg_catalog.pg_namespace n ON n.oid=p.nspparent
     WHERE p.nspcompoundtrigger = false
     AND {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
@@ -546,8 +546,8 @@ FROM (
     SELECT 'edbvar' AS obj_type, v.varname AS obj_name,
     ':schema.'||n.oid||':/' || n.nspname || '/:package.'||p.oid||':/' || p.nspname || '/:edbvar.'||v.oid||':/' || v.varname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['edbvar'] }} AS show_node, NULL AS other_info
-    FROM edb_variable v JOIN pg_namespace p
-    ON v.varpackage = p.oid JOIN pg_namespace n
+    FROM pg_catalog.edb_variable v JOIN pg_catalog.pg_namespace p
+    ON v.varpackage = p.oid JOIN pg_catalog.pg_namespace n
     ON p.nspparent = n.oid
     WHERE p.nspcompoundtrigger = false
     AND {{ CATALOGS.DB_SUPPORT('p') }}
@@ -568,8 +568,8 @@ FROM (
                             select rel.oid, pt.height+1 as height, rel.relkind,
                                 CASE rel.relispartition WHEN true THEN ':partition.' ELSE ':table.' END
                                 || rel.oid || ':/' || rel.relname || '/' || pt.path as path
-                            from pg_class rel JOIN pg_namespace nsp ON rel.relnamespace = nsp.oid
-                            join pg_inherits inh ON inh.inhparent = rel.oid
+                            from pg_catalog.pg_class rel JOIN pg_catalog.pg_namespace nsp ON rel.relnamespace = nsp.oid
+                            join pg_catalog.pg_inherits inh ON inh.inhparent = rel.oid
                             join table_path_data pt ON inh.inhrelid = pt.oid
                         )
                         select CASE WHEN relkind = 'p' THEN path ELSE ':table.' || t.oid || ':/' || t.relname END AS path
@@ -578,10 +578,10 @@ FROM (
             end
             ||'/:row_security_policy.'|| pl.oid ||':/'|| pl.polname AS obj_path, n.nspname AS schema_name,
             {{ show_node_prefs['row_security_policy'] }} AS show_node, NULL AS other_info
-            FROM pg_policy pl
-    JOIN pg_class t on pl.polrelid = t.oid and t.relkind in ('r','t','p')
-    JOIN pg_policies rw ON (pl.polname=rw.policyname AND t.relname=rw.tablename)
-    JOIN pg_namespace n on t.relnamespace = n.oid
+            FROM pg_catalog.pg_policy pl
+    JOIN pg_catalog.pg_class t on pl.polrelid = t.oid and t.relkind in ('r','t','p')
+    JOIN pg_catalog.pg_policies rw ON (pl.polname=rw.policyname AND t.relname=rw.tablename)
+    JOIN pg_catalog.pg_namespace n on t.relnamespace = n.oid
     where {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
 
diff --git a/web/pgadmin/tools/search_objects/templates/search_objects/sql/ppas/9.5_plus/search.sql b/web/pgadmin/tools/search_objects/templates/search_objects/sql/ppas/9.5_plus/search.sql
index 1389d546b..8fecd5326 100644
--- a/web/pgadmin/tools/search_objects/templates/search_objects/sql/ppas/9.5_plus/search.sql
+++ b/web/pgadmin/tools/search_objects/templates/search_objects/sql/ppas/9.5_plus/search.sql
@@ -4,7 +4,7 @@
 {% set all_obj = true %}
 {% endif %}
 SELECT obj_type, obj_name,
-    REPLACE(obj_path, '/'||sn.schema_name||'/', '/'||{{ CATALOGS.LABELS_SCHEMACOL('sn.schema_name', _) }}||'/') AS obj_path,
+    pg_catalog.REPLACE(obj_path, '/'||sn.schema_name||'/', '/'||{{ CATALOGS.LABELS_SCHEMACOL('sn.schema_name', _) }}||'/') AS obj_path,
     schema_name, show_node, other_info,
     CASE
         WHEN {{ CATALOGS.IS_CATALOG_SCHEMA('sn.schema_name') }} THEN
@@ -36,8 +36,8 @@ FROM (
         WHEN c.relkind = 'm' THEN {{ show_node_prefs['mview'] }}
         ELSE False
     END AS show_node, NULL AS other_info
-    FROM pg_class c
-    LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
+    FROM pg_catalog.pg_class c
+    LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
     {% if all_obj %}
     WHERE c.relkind in ('r','t','S','v','m')
     {% elif obj_type == 'table' %}
@@ -58,14 +58,14 @@ FROM (
     SELECT 'index'::text AS obj_type, cls.relname AS obj_name,
     ':schema.'|| n.oid || ':/' || n.nspname || '/:table.'|| tab.oid ||':/' || tab.relname || '/:index.'|| cls.oid ||':/' || cls.relname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['index'] }} AS show_node, NULL AS other_info
-    FROM pg_index idx
-    JOIN pg_class cls ON cls.oid=indexrelid
-    JOIN pg_class tab ON tab.oid=indrelid
-    JOIN pg_namespace n ON n.oid=tab.relnamespace
-    LEFT JOIN pg_depend dep ON (dep.classid = cls.tableoid AND dep.objid = cls.oid AND dep.refobjsubid = '0' AND dep.refclassid=(SELECT oid FROM pg_class WHERE relname='pg_constraint') AND dep.deptype='i')
-    LEFT OUTER JOIN pg_constraint con ON (con.tableoid = dep.refclassid AND con.oid = dep.refobjid)
-    LEFT OUTER JOIN pg_description des ON des.objoid=cls.oid
-    LEFT OUTER JOIN pg_description desp ON (desp.objoid=con.oid AND desp.objsubid = 0)
+    FROM pg_catalog.pg_index idx
+    JOIN pg_catalog.pg_class cls ON cls.oid=indexrelid
+    JOIN pg_catalog.pg_class tab ON tab.oid=indrelid
+    JOIN pg_catalog.pg_namespace n ON n.oid=tab.relnamespace
+    LEFT JOIN pg_catalog.pg_depend dep ON (dep.classid = cls.tableoid AND dep.objid = cls.oid AND dep.refobjsubid = '0' AND dep.refclassid=(SELECT oid FROM pg_catalog.pg_class WHERE relname='pg_constraint') AND dep.deptype='i')
+    LEFT OUTER JOIN pg_catalog.pg_constraint con ON (con.tableoid = dep.refclassid AND con.oid = dep.refobjid)
+    LEFT OUTER JOIN pg_catalog.pg_description des ON des.objoid=cls.oid
+    LEFT OUTER JOIN pg_catalog.pg_description desp ON (desp.objoid=con.oid AND desp.objsubid = 0)
     WHERE contype IS NULL
     AND {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
@@ -111,10 +111,10 @@ FROM (
             ELSE null
             END::text AS obj_type, pr.proname AS obj_name, pr.oid AS obj_oid, n.oid AS schema_oid, n.nspname AS schema_name, np.oid next_schema_oid, np.nspname next_schema_name,
             pg_catalog.pg_get_function_identity_arguments(pr.oid) AS other_info
-        FROM pg_proc pr left join pg_namespace n
-        ON pr.pronamespace = n.oid left JOIN pg_namespace np
-        ON np.oid=n.nspparent left JOIN pg_type t
-        ON t.oid = pr.prorettype left JOIN pg_language l
+        FROM pg_catalog.pg_proc pr left join pg_catalog.pg_namespace n
+        ON pr.pronamespace = n.oid left JOIN pg_catalog.pg_namespace np
+        ON np.oid=n.nspparent left JOIN pg_catalog.pg_type t
+        ON t.oid = pr.prorettype left JOIN pg_catalog.pg_language l
         ON l.oid = pr.prolang
         WHERE NOT (t.typname = 'trigger' AND l.lanname = 'edbspl')
         AND ({{ CATALOGS.DB_SUPPORT('n') }} AND {{ CATALOGS.DB_SUPPORT('np') }})
@@ -153,9 +153,9 @@ FROM (
         else 'should not happen'
     end || t.oid || ':/' || t.relname || '/:column.'|| a.attnum ||':/' || a.attname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['column'] }} AS show_node, NULL AS other_info
-    from pg_attribute a
-    inner join pg_class t on a.attrelid = t.oid and t.relkind in ('r', 't','v','m')
-    left join pg_namespace n on t.relnamespace = n.oid where a.attnum > 0
+    from pg_catalog.pg_attribute a
+    inner join pg_catalog.pg_class t on a.attrelid = t.oid and t.relkind in ('r', 't','v','m')
+    left join pg_catalog.pg_namespace n on t.relnamespace = n.oid where a.attnum > 0
 {% endif %}
 {% if all_obj %}
     UNION
@@ -179,10 +179,10 @@ FROM (
         WHEN c.contype = 'x' THEN  '/:exclusion_constraint.' ||c.conindid
     END ||':/'|| case when tf.relname is null then c.conname else c.conname || ' -> ' || tf.relname end AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['constraints'] }} AS show_node, NULL AS other_info
-    from pg_constraint c
-    left join pg_class t on c.conrelid = t.oid
-    left join pg_class tf on c.confrelid = tf.oid
-    left join pg_namespace n on t.relnamespace = n.oid
+    from pg_catalog.pg_constraint c
+    left join pg_catalog.pg_class t on c.conrelid = t.oid
+    left join pg_catalog.pg_class tf on c.confrelid = tf.oid
+    left join pg_catalog.pg_namespace n on t.relnamespace = n.oid
     where c.contypid = 0
     {% if obj_type == 'check_constraint' %}
     AND c.contype = 'c'
@@ -211,9 +211,9 @@ FROM (
             end || t.oid || ':/' || t.relname ||'/:rule.'||r.oid||':/'|| r.rulename AS obj_path,
             n.nspname AS schema_name,
             {{ show_node_prefs['rule'] }} AS show_node, NULL AS other_info
-            from pg_rewrite r
-    inner join pg_class t on r.ev_class = t.oid and t.relkind in ('r', 't','v')
-    left join pg_namespace n on t.relnamespace = n.oid
+            from pg_catalog.pg_rewrite r
+    inner join pg_catalog.pg_class t on r.ev_class = t.oid and t.relkind in ('r', 't','v')
+    left join pg_catalog.pg_namespace n on t.relnamespace = n.oid
     where {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
 {% if all_obj %}
@@ -227,9 +227,9 @@ FROM (
                 else 'should not happen'
             end || t.oid || ':/' || t.relname || '/:trigger.'|| tr.oid || ':/' || tr.tgname AS obj_path, n.nspname AS schema_name,
             {{ show_node_prefs['trigger'] }} AS show_node, NULL AS other_info
-            from pg_trigger tr
-    inner join pg_class t on tr.tgrelid = t.oid and t.relkind in ('r', 't', 'v')
-    left join pg_namespace n on t.relnamespace = n.oid
+            from pg_catalog.pg_trigger tr
+    inner join pg_catalog.pg_class t on tr.tgrelid = t.oid and t.relkind in ('r', 't', 'v')
+    left join pg_catalog.pg_namespace n on t.relnamespace = n.oid
     where tr.tgisinternal = false
     and {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
@@ -240,10 +240,10 @@ FROM (
     SELECT 'type'::text AS obj_type, t.typname AS obj_name, ':schema.'||n.oid||':/' || n.nspname ||
         '/:type.'|| t.oid ||':/' || t.typname AS obj_path, n.nspname AS schema_name,
         {{ show_node_prefs['type'] }} AS show_node, NULL AS other_info
-    FROM pg_type t
-    LEFT OUTER JOIN pg_type e ON e.oid=t.typelem
-    LEFT OUTER JOIN pg_class ct ON ct.oid=t.typrelid AND ct.relkind <> 'c'
-    LEFT OUTER JOIN pg_namespace n on t.typnamespace = n.oid
+    FROM pg_catalog.pg_type t
+    LEFT OUTER JOIN pg_catalog.pg_type e ON e.oid=t.typelem
+    LEFT OUTER JOIN pg_catalog.pg_class ct ON ct.oid=t.typrelid AND ct.relkind <> 'c'
+    LEFT OUTER JOIN pg_catalog.pg_namespace n on t.typnamespace = n.oid
     WHERE t.typtype != 'd' AND t.typname NOT LIKE E'\\_%'
     {% if not show_system_objects %}
         AND ct.oid is NULL
@@ -258,9 +258,9 @@ FROM (
     SELECT 'cast'::text AS obj_type, format_type(st.oid,NULL) ||'->'|| format_type(tt.oid,tt.typtypmod) AS obj_name,
     ':cast.'||ca.oid||':/' || format_type(st.oid,NULL) ||'->'|| format_type(tt.oid,tt.typtypmod) AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['cast'] }} AS show_node, NULL AS other_info
-    FROM pg_cast ca
-    JOIN pg_type st ON st.oid=castsource
-    JOIN pg_type tt ON tt.oid=casttarget
+    FROM pg_catalog.pg_cast ca
+    JOIN pg_catalog.pg_type st ON st.oid=castsource
+    JOIN pg_catalog.pg_type tt ON tt.oid=casttarget
     {% if not show_system_objects %}
     WHERE ca.oid > {{last_system_oid}}::OID
     {% endif %}
@@ -271,7 +271,7 @@ FROM (
 {% if all_obj or obj_type in ['language'] %}
     SELECT 'language'::text AS obj_type, lanname AS obj_name, ':language.'||lan.oid||':/' || lanname AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['language'] }} AS show_node, NULL AS other_info
-    FROM pg_language lan
+    FROM pg_catalog.pg_language lan
     WHERE lanispl IS TRUE
 {% endif %}
 {% if all_obj %}
@@ -280,8 +280,8 @@ FROM (
 {% if all_obj or obj_type in ['fts_configuration'] %}
     SELECT 'fts_configuration'::text AS obj_type, cfg.cfgname AS obj_name, ':schema.'||n.oid||':/' || n.nspname || '/:fts_configuration.'||cfg.oid||':/' || cfg.cfgname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['fts_configuration'] }} AS show_node, NULL AS other_info
-    FROM pg_ts_config cfg
-    left join pg_namespace n on cfg.cfgnamespace = n.oid
+    FROM pg_catalog.pg_ts_config cfg
+    left join pg_catalog.pg_namespace n on cfg.cfgnamespace = n.oid
     WHERE {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
 {% if all_obj %}
@@ -290,8 +290,8 @@ FROM (
 {% if all_obj or obj_type in ['fts_dictionary'] %}
     SELECT 'fts_dictionary'::text AS obj_type, dict.dictname AS obj_name, ':schema.'||ns.oid||':/' || ns.nspname || '/:fts_dictionary.'||dict.oid||':/' || dict.dictname AS obj_path, ns.nspname AS schema_name,
     {{ show_node_prefs['fts_dictionary'] }} AS show_node, NULL AS other_info
-    FROM pg_ts_dict dict
-    left join pg_namespace ns on dict.dictnamespace = ns.oid
+    FROM pg_catalog.pg_ts_dict dict
+    left join pg_catalog.pg_namespace ns on dict.dictnamespace = ns.oid
     WHERE {{ CATALOGS.DB_SUPPORT('ns') }}
 {% endif %}
 {% if all_obj %}
@@ -300,8 +300,8 @@ FROM (
 {% if all_obj or obj_type in ['fts_parser'] %}
     SELECT 'fts_parser'::text AS obj_type, prs.prsname AS obj_name, ':schema.'||ns.oid||':/' || ns.nspname || '/:fts_parser.'||prs.oid||':/' || prs.prsname AS obj_path, ns.nspname AS schema_name,
     {{ show_node_prefs['fts_parser'] }} AS show_node, NULL AS other_info
-    FROM pg_ts_parser prs
-    left join pg_namespace ns on prs.prsnamespace = ns.oid
+    FROM pg_catalog.pg_ts_parser prs
+    left join pg_catalog.pg_namespace ns on prs.prsnamespace = ns.oid
     WHERE {{ CATALOGS.DB_SUPPORT('ns') }}
 {% endif %}
 {% if all_obj %}
@@ -310,8 +310,8 @@ FROM (
 {% if all_obj or obj_type in ['fts_template'] %}
     SELECT 'fts_template'::text AS obj_type, tmpl.tmplname AS obj_name, ':schema.'||ns.oid||':/' || ns.nspname || '/:fts_template.'||tmpl.oid||':/' || tmpl.tmplname AS obj_path, ns.nspname AS schema_name,
     {{ show_node_prefs['fts_template'] }} AS show_node, NULL AS other_info
-    FROM pg_ts_template tmpl
-    left join pg_namespace ns on tmpl.tmplnamespace = ns.oid
+    FROM pg_catalog.pg_ts_template tmpl
+    left join pg_catalog.pg_namespace ns on tmpl.tmplnamespace = ns.oid
     AND {{ CATALOGS.DB_SUPPORT('ns') }}
 {% endif %}
 {% if all_obj %}
@@ -320,8 +320,8 @@ FROM (
 {% if all_obj or obj_type in ['domain'] %}
     select 'domain'::text AS obj_type, t.typname AS obj_name, ':schema.'||n.oid||':/' || n.nspname || '/:domain.'||t.oid||':/' || t.typname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['domain'] }} AS show_node, NULL AS other_info
-    from pg_type t
-    inner join pg_namespace n on t.typnamespace = n.oid
+    from pg_catalog.pg_type t
+    inner join pg_catalog.pg_namespace n on t.typnamespace = n.oid
     where t.typtype = 'd'
     AND n.nspparent = 0
     AND {{ CATALOGS.DB_SUPPORT('n') }}
@@ -334,8 +334,8 @@ FROM (
         c.conname AS obj_name, ':schema.'||n.oid||':/' || n.nspname || '/:domain.'||t.oid||':/' || t.typname || '/:domain_constraints.'||c.oid||':/' || c.conname AS obj_path,
         n.nspname AS schema_name,
         {{ show_node_prefs['domain_constraints'] }} AS show_node, NULL AS other_info
-    FROM pg_constraint c JOIN pg_type t
-    ON t.oid=contypid JOIN pg_namespace n
+    FROM pg_catalog.pg_constraint c JOIN pg_catalog.pg_type t
+    ON t.oid=contypid JOIN pg_catalog.pg_namespace n
     ON n.oid=t.typnamespace
     WHERE t.typtype = 'd'
     AND n.nspparent = 0
@@ -347,7 +347,7 @@ FROM (
 {% if all_obj or obj_type in ['foreign_data_wrapper'] %}
     select 'foreign_data_wrapper'::text AS obj_type, fdwname AS obj_name, ':foreign_data_wrapper.'||oid||':/' || fdwname AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['foreign_data_wrapper'] }} AS show_node, NULL AS other_info
-    from pg_foreign_data_wrapper
+    from pg_catalog.pg_foreign_data_wrapper
 {% endif %}
 {% if all_obj %}
     UNION
@@ -355,8 +355,8 @@ FROM (
 {% if all_obj or obj_type in ['foreign_server'] %}
     select 'foreign_server'::text AS obj_type, sr.srvname AS obj_name, ':foreign_data_wrapper.'||fdw.oid||':/' || fdw.fdwname || '/:foreign_server.'||sr.oid||':/' || sr.srvname AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['foreign_server'] }} AS show_node, NULL AS other_info
-    from pg_foreign_server sr
-    inner join pg_foreign_data_wrapper fdw on sr.srvfdw = fdw.oid
+    from pg_catalog.pg_foreign_server sr
+    inner join pg_catalog.pg_foreign_data_wrapper fdw on sr.srvfdw = fdw.oid
 {% endif %}
 {% if all_obj %}
     UNION
@@ -364,9 +364,9 @@ FROM (
 {% if all_obj or obj_type in ['user_mapping'] %}
     select 'user_mapping'::text AS obj_type, um.usename AS obj_name, ':foreign_data_wrapper.'||fdw.oid||':/' || fdw.fdwname || '/:foreign_server.'||sr.oid||':/' || sr.srvname || '/:user_mapping.'||um.umid||':/' || um.usename AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['user_mapping'] }} AS show_node, NULL AS other_info
-    from pg_user_mappings um
-    inner join pg_foreign_server sr on um.srvid = sr.oid
-    inner join pg_foreign_data_wrapper fdw on sr.srvfdw = fdw.oid
+    from pg_catalog.pg_user_mappings um
+    inner join pg_catalog.pg_foreign_server sr on um.srvid = sr.oid
+    inner join pg_catalog.pg_foreign_data_wrapper fdw on sr.srvfdw = fdw.oid
 {% endif %}
 {% if all_obj %}
     UNION
@@ -374,9 +374,9 @@ FROM (
 {% if all_obj or obj_type in ['foreign_table'] %}
     select 'foreign_table'::text AS obj_type, c.relname AS obj_name, ':schema.'||ns.oid||':/' || ns.nspname || '/:foreign_table.'||c.oid||':/' || c.relname AS obj_path, ns.nspname AS schema_name,
     {{ show_node_prefs['foreign_table'] }} AS show_node, NULL AS other_info
-    from pg_foreign_table ft
-    inner join pg_class c on ft.ftrelid = c.oid
-    inner join pg_namespace ns on c.relnamespace = ns.oid
+    from pg_catalog.pg_foreign_table ft
+    inner join pg_catalog.pg_class c on ft.ftrelid = c.oid
+    inner join pg_catalog.pg_namespace ns on c.relnamespace = ns.oid
     AND {{ CATALOGS.DB_SUPPORT('ns') }}
 {% endif %}
 {% if all_obj %}
@@ -385,9 +385,9 @@ FROM (
 {% if all_obj or obj_type in ['extension'] %}
     select 'extension'::text AS obj_type, x.extname AS obj_name, ':extension.'||x.oid||':/' || x.extname AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['extension'] }} AS show_node, NULL AS other_info
-    FROM pg_extension x
-    JOIN pg_namespace n on x.extnamespace=n.oid
-    join pg_available_extensions() e(name, default_version, comment) ON x.extname=e.name
+    FROM pg_catalog.pg_extension x
+    JOIN pg_catalog.pg_namespace n on x.extnamespace=n.oid
+    join pg_catalog.pg_available_extensions() e(name, default_version, comment) ON x.extname=e.name
 {% endif %}
 {% if all_obj %}
     UNION
@@ -395,8 +395,8 @@ FROM (
 {% if all_obj or obj_type in ['collation'] %}
     SELECT 'collation'::text AS obj_type, c.collname AS obj_name, ':schema.'||n.oid||':/' || n.nspname || '/:collation.'||c.oid||':/' || c.collname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['collation'] }} AS show_node, NULL AS other_info
-    FROM pg_collation c
-    JOIN pg_namespace n ON n.oid=c.collnamespace
+    FROM pg_catalog.pg_collation c
+    JOIN pg_catalog.pg_namespace n ON n.oid=c.collnamespace
     WHERE {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
 {% if all_obj %}
@@ -405,8 +405,8 @@ FROM (
 {% if all_obj or obj_type in ['synonym'] %}
     SELECT 'synonym'::text AS obj_type, s.synname AS obj_name, ':schema.'||n.oid||':/' || n.nspname || '/:synonym.'||s.oid||':/' || s.synname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['synonym'] }} AS show_node, NULL AS other_info
-    FROM pg_synonym s
-    JOIN pg_namespace n ON n.oid=s.synnamespace
+    FROM pg_catalog.pg_synonym s
+    JOIN pg_catalog.pg_namespace n ON n.oid=s.synnamespace
     WHERE {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
 {% if all_obj %}
@@ -415,8 +415,8 @@ FROM (
 {% if all_obj or obj_type in ['package'] %}
     SELECT 'package'::text AS obj_type, p.nspname AS obj_name, ':schema.'||n.oid||':/' || n.nspname || '/:package.'||p.oid||':/' || p.nspname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['package'] }} AS show_node, NULL AS other_info
-    FROM pg_namespace p
-    JOIN pg_namespace n ON n.oid=p.nspparent
+    FROM pg_catalog.pg_namespace p
+    JOIN pg_catalog.pg_namespace n ON n.oid=p.nspparent
     WHERE {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
 {% if all_obj %}
@@ -426,8 +426,8 @@ FROM (
     SELECT 'edbvar'::text AS obj_type, v.varname AS obj_name,
     ':schema.'||n.oid||':/' || n.nspname || '/:package.'||p.oid||':/' || p.nspname || '/:edbvar.'||v.oid||':/' || v.varname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['edbvar'] }} AS show_node, NULL AS other_info
-    FROM edb_variable v JOIN pg_namespace p
-    ON v.varpackage = p.oid JOIN pg_namespace n
+    FROM pg_catalog.edb_variable v JOIN pg_catalog.pg_namespace p
+    ON v.varpackage = p.oid JOIN pg_catalog.pg_namespace n
     ON p.nspparent = n.oid
     WHERE {{ CATALOGS.DB_SUPPORT('p') }}
     AND {{ CATALOGS.DB_SUPPORT('n') }}
@@ -439,10 +439,10 @@ FROM (
     select 'row_security_policy'::text AS obj_type, pl.polname AS obj_name, ':schema.'|| n.oid || ':/' || n.nspname ||
         '/:table.'|| t.oid ||':/' || t.relname || '/:row_security_policy.'|| pl.oid ||':/' || pl.polname AS obj_path, n.nspname AS schema_name,
         {{ show_node_prefs['row_security_policy'] }} AS show_node, NULL AS other_info
-        FROM pg_policy pl
-    JOIN pg_class t on pl.polrelid = t.oid and t.relkind in ('r','t','p')
-    JOIN pg_policies rw ON (pl.polname=rw.policyname AND t.relname=rw.tablename)
-    JOIN pg_namespace n on t.relnamespace = n.oid
+        FROM pg_catalog.pg_policy pl
+    JOIN pg_catalog.pg_class t on pl.polrelid = t.oid and t.relkind in ('r','t','p')
+    JOIN pg_catalog.pg_policies rw ON (pl.polname=rw.policyname AND t.relname=rw.tablename)
+    JOIN pg_catalog.pg_namespace n on t.relnamespace = n.oid
     where {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
 
diff --git a/web/pgadmin/tools/search_objects/templates/search_objects/sql/ppas/default/search.sql b/web/pgadmin/tools/search_objects/templates/search_objects/sql/ppas/default/search.sql
index ae1b12512..8b6e1f133 100644
--- a/web/pgadmin/tools/search_objects/templates/search_objects/sql/ppas/default/search.sql
+++ b/web/pgadmin/tools/search_objects/templates/search_objects/sql/ppas/default/search.sql
@@ -4,7 +4,7 @@
 {% set all_obj = true %}
 {% endif %}
 SELECT obj_type, obj_name,
-    REPLACE(obj_path, '/'||sn.schema_name||'/', '/'||{{ CATALOGS.LABELS_SCHEMACOL('sn.schema_name', _) }}||'/') AS obj_path,
+    pg_catalog.REPLACE(obj_path, '/'||sn.schema_name||'/', '/'||{{ CATALOGS.LABELS_SCHEMACOL('sn.schema_name', _) }}||'/') AS obj_path,
     schema_name, show_node, other_info,
     CASE
         WHEN {{ CATALOGS.IS_CATALOG_SCHEMA('sn.schema_name') }} THEN
@@ -36,8 +36,8 @@ FROM (
         WHEN c.relkind = 'm' THEN {{ show_node_prefs['mview'] }}
         ELSE False
     END AS show_node, NULL AS other_info
-    FROM pg_class c
-    LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
+    FROM pg_catalog.pg_class c
+    LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
     {% if all_obj %}
     WHERE c.relkind in ('r','t','S','v','m')
     {% elif obj_type == 'table' %}
@@ -58,14 +58,14 @@ FROM (
     SELECT 'index'::text AS obj_type, cls.relname AS obj_name,
     ':schema.'|| n.oid || ':/' || n.nspname || '/:table.'|| tab.oid ||':/' || tab.relname || '/:index.'|| cls.oid ||':/' || cls.relname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['index'] }} AS show_node, NULL AS other_info
-    FROM pg_index idx
-    JOIN pg_class cls ON cls.oid=indexrelid
-    JOIN pg_class tab ON tab.oid=indrelid
-    JOIN pg_namespace n ON n.oid=tab.relnamespace
-    LEFT JOIN pg_depend dep ON (dep.classid = cls.tableoid AND dep.objid = cls.oid AND dep.refobjsubid = '0' AND dep.refclassid=(SELECT oid FROM pg_class WHERE relname='pg_constraint') AND dep.deptype='i')
-    LEFT OUTER JOIN pg_constraint con ON (con.tableoid = dep.refclassid AND con.oid = dep.refobjid)
-    LEFT OUTER JOIN pg_description des ON des.objoid=cls.oid
-    LEFT OUTER JOIN pg_description desp ON (desp.objoid=con.oid AND desp.objsubid = 0)
+    FROM pg_catalog.pg_index idx
+    JOIN pg_catalog.pg_class cls ON cls.oid=indexrelid
+    JOIN pg_catalog.pg_class tab ON tab.oid=indrelid
+    JOIN pg_catalog.pg_namespace n ON n.oid=tab.relnamespace
+    LEFT JOIN pg_catalog.pg_depend dep ON (dep.classid = cls.tableoid AND dep.objid = cls.oid AND dep.refobjsubid = '0' AND dep.refclassid=(SELECT oid FROM pg_catalog.pg_class WHERE relname='pg_constraint') AND dep.deptype='i')
+    LEFT OUTER JOIN pg_catalog.pg_constraint con ON (con.tableoid = dep.refclassid AND con.oid = dep.refobjid)
+    LEFT OUTER JOIN pg_catalog.pg_description des ON des.objoid=cls.oid
+    LEFT OUTER JOIN pg_catalog.pg_description desp ON (desp.objoid=con.oid AND desp.objsubid = 0)
     WHERE contype IS NULL
     AND {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
@@ -111,10 +111,10 @@ FROM (
             ELSE null
             END::text AS obj_type, pr.proname AS obj_name, pr.oid AS obj_oid, n.oid AS schema_oid, n.nspname AS schema_name, np.oid next_schema_oid, np.nspname next_schema_name,
             pg_catalog.pg_get_function_identity_arguments(pr.oid) AS other_info
-        FROM pg_proc pr left join pg_namespace n
-        ON pr.pronamespace = n.oid left JOIN pg_namespace np
-        ON np.oid=n.nspparent left JOIN pg_type t
-        ON t.oid = pr.prorettype left JOIN pg_language l
+        FROM pg_catalog.pg_proc pr left join pg_catalog.pg_namespace n
+        ON pr.pronamespace = n.oid left JOIN pg_catalog.pg_namespace np
+        ON np.oid=n.nspparent left JOIN pg_catalog.pg_type t
+        ON t.oid = pr.prorettype left JOIN pg_catalog.pg_language l
         ON l.oid = pr.prolang
         WHERE NOT (t.typname = 'trigger' AND l.lanname = 'edbspl')
         AND ({{ CATALOGS.DB_SUPPORT('n') }} AND {{ CATALOGS.DB_SUPPORT('np') }})
@@ -128,7 +128,7 @@ FROM (
 {% endif %}
 {% if all_obj or obj_type in ['event_trigger'] %}
     select 'event_trigger'::text AS obj_type, evtname AS obj_name, ':event_trigger.'||oid||':/' || evtname AS obj_path, ''::text AS schema_name,
-    {{ show_node_prefs['index'] }} AS show_node, NULL AS other_info from pg_event_trigger
+    {{ show_node_prefs['index'] }} AS show_node, NULL AS other_info from pg_catalog.pg_event_trigger
 {% endif %}
 {% if all_obj %}
     UNION
@@ -136,7 +136,7 @@ FROM (
 {% if all_obj or obj_type in ['schema'] %}
     select 'schema'::text AS obj_type, n.nspname AS obj_name,
     ':schema.'||n.oid||':/' || n.nspname as obj_path, n.nspname AS schema_name,
-    {{ show_node_prefs['schema'] }} AS show_node, NULL AS other_info from pg_namespace n
+    {{ show_node_prefs['schema'] }} AS show_node, NULL AS other_info from pg_catalog.pg_namespace n
     where n.nspparent = 0
     AND {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
@@ -153,9 +153,9 @@ FROM (
         else 'should not happen'
     end || t.oid || ':/' || t.relname || '/:column.'|| a.attnum ||':/' || a.attname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['column'] }} AS show_node, NULL AS other_info
-    from pg_attribute a
-    inner join pg_class t on a.attrelid = t.oid and t.relkind in ('r', 't','v','m')
-    left join pg_namespace n on t.relnamespace = n.oid where a.attnum > 0
+    from pg_catalog.pg_attribute a
+    inner join pg_catalog.pg_class t on a.attrelid = t.oid and t.relkind in ('r', 't','v','m')
+    left join pg_catalog.pg_namespace n on t.relnamespace = n.oid where a.attnum > 0
 {% endif %}
 {% if all_obj %}
     UNION
@@ -179,10 +179,10 @@ FROM (
         WHEN c.contype = 'x' THEN  '/:exclusion_constraint.' ||c.conindid
     END ||':/'|| case when tf.relname is null then c.conname else c.conname || ' -> ' || tf.relname end AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['constraints'] }} AS show_node, NULL AS other_info
-    from pg_constraint c
-    left join pg_class t on c.conrelid = t.oid
-    left join pg_class tf on c.confrelid = tf.oid
-    left join pg_namespace n on t.relnamespace = n.oid
+    from pg_catalog.pg_constraint c
+    left join pg_catalog.pg_class t on c.conrelid = t.oid
+    left join pg_catalog.pg_class tf on c.confrelid = tf.oid
+    left join pg_catalog.pg_namespace n on t.relnamespace = n.oid
     where c.contypid = 0
     {% if obj_type == 'check_constraint' %}
     AND c.contype = 'c'
@@ -211,9 +211,9 @@ FROM (
             end || t.oid || ':/' || t.relname ||'/:rule.'||r.oid||':/'|| r.rulename AS obj_path,
             n.nspname AS schema_name,
             {{ show_node_prefs['rule'] }} AS show_node, NULL AS other_info
-            from pg_rewrite r
-    inner join pg_class t on r.ev_class = t.oid and t.relkind in ('r', 't','v')
-    left join pg_namespace n on t.relnamespace = n.oid
+            from pg_catalog.pg_rewrite r
+    inner join pg_catalog.pg_class t on r.ev_class = t.oid and t.relkind in ('r', 't','v')
+    left join pg_catalog.pg_namespace n on t.relnamespace = n.oid
     where {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
 {% if all_obj %}
@@ -227,9 +227,9 @@ FROM (
                 else 'should not happen'
             end || t.oid || ':/' || t.relname || '/:trigger.'|| tr.oid || ':/' || tr.tgname AS obj_path, n.nspname AS schema_name,
             {{ show_node_prefs['trigger'] }} AS show_node, NULL AS other_info
-            from pg_trigger tr
-    inner join pg_class t on tr.tgrelid = t.oid and t.relkind in ('r', 't', 'v')
-    left join pg_namespace n on t.relnamespace = n.oid
+            from pg_catalog.pg_trigger tr
+    inner join pg_catalog.pg_class t on tr.tgrelid = t.oid and t.relkind in ('r', 't', 'v')
+    left join pg_catalog.pg_namespace n on t.relnamespace = n.oid
     where tr.tgisinternal = false
     and {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
@@ -240,10 +240,10 @@ FROM (
     SELECT 'type'::text AS obj_type, t.typname AS obj_name, ':schema.'||n.oid||':/' || n.nspname ||
         '/:type.'|| t.oid ||':/' || t.typname AS obj_path, n.nspname AS schema_name,
         {{ show_node_prefs['type'] }} AS show_node, NULL AS other_info
-    FROM pg_type t
-    LEFT OUTER JOIN pg_type e ON e.oid=t.typelem
-    LEFT OUTER JOIN pg_class ct ON ct.oid=t.typrelid AND ct.relkind <> 'c'
-    LEFT OUTER JOIN pg_namespace n on t.typnamespace = n.oid
+    FROM pg_catalog.pg_type t
+    LEFT OUTER JOIN pg_catalog.pg_type e ON e.oid=t.typelem
+    LEFT OUTER JOIN pg_catalog.pg_class ct ON ct.oid=t.typrelid AND ct.relkind <> 'c'
+    LEFT OUTER JOIN pg_catalog.pg_namespace n on t.typnamespace = n.oid
     WHERE t.typtype != 'd' AND t.typname NOT LIKE E'\\_%'
     {% if not show_system_objects %}
         AND ct.oid is NULL
@@ -258,9 +258,9 @@ FROM (
     SELECT 'cast'::text AS obj_type, format_type(st.oid,NULL) ||'->'|| format_type(tt.oid,tt.typtypmod) AS obj_name,
     ':cast.'||ca.oid||':/' || format_type(st.oid,NULL) ||'->'|| format_type(tt.oid,tt.typtypmod) AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['cast'] }} AS show_node, NULL AS other_info
-    FROM pg_cast ca
-    JOIN pg_type st ON st.oid=castsource
-    JOIN pg_type tt ON tt.oid=casttarget
+    FROM pg_catalog.pg_cast ca
+    JOIN pg_catalog.pg_type st ON st.oid=castsource
+    JOIN pg_catalog.pg_type tt ON tt.oid=casttarget
     {% if not show_system_objects %}
     WHERE ca.oid > {{last_system_oid}}::OID
     {% endif %}
@@ -271,7 +271,7 @@ FROM (
 {% if all_obj or obj_type in ['language'] %}
     SELECT 'language'::text AS obj_type, lanname AS obj_name, ':language.'||lan.oid||':/' || lanname AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['language'] }} AS show_node, NULL AS other_info
-    FROM pg_language lan
+    FROM pg_catalog.pg_language lan
     WHERE lanispl IS TRUE
 {% endif %}
 {% if all_obj %}
@@ -280,8 +280,8 @@ FROM (
 {% if all_obj or obj_type in ['fts_configuration'] %}
     SELECT 'fts_configuration'::text AS obj_type, cfg.cfgname AS obj_name, ':schema.'||n.oid||':/' || n.nspname || '/:fts_configuration.'||cfg.oid||':/' || cfg.cfgname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['fts_configuration'] }} AS show_node, NULL AS other_info
-    FROM pg_ts_config cfg
-    left join pg_namespace n on cfg.cfgnamespace = n.oid
+    FROM pg_catalog.pg_ts_config cfg
+    left join pg_catalog.pg_namespace n on cfg.cfgnamespace = n.oid
     WHERE {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
 {% if all_obj %}
@@ -290,8 +290,8 @@ FROM (
 {% if all_obj or obj_type in ['fts_dictionary'] %}
     SELECT 'fts_dictionary'::text AS obj_type, dict.dictname AS obj_name, ':schema.'||ns.oid||':/' || ns.nspname || '/:fts_dictionary.'||dict.oid||':/' || dict.dictname AS obj_path, ns.nspname AS schema_name,
     {{ show_node_prefs['fts_dictionary'] }} AS show_node, NULL AS other_info
-    FROM pg_ts_dict dict
-    left join pg_namespace ns on dict.dictnamespace = ns.oid
+    FROM pg_catalog.pg_ts_dict dict
+    left join pg_catalog.pg_namespace ns on dict.dictnamespace = ns.oid
     WHERE {{ CATALOGS.DB_SUPPORT('ns') }}
 {% endif %}
 {% if all_obj %}
@@ -300,8 +300,8 @@ FROM (
 {% if all_obj or obj_type in ['fts_parser'] %}
     SELECT 'fts_parser'::text AS obj_type, prs.prsname AS obj_name, ':schema.'||ns.oid||':/' || ns.nspname || '/:fts_parser.'||prs.oid||':/' || prs.prsname AS obj_path, ns.nspname AS schema_name,
     {{ show_node_prefs['fts_parser'] }} AS show_node, NULL AS other_info
-    FROM pg_ts_parser prs
-    left join pg_namespace ns on prs.prsnamespace = ns.oid
+    FROM pg_catalog.pg_ts_parser prs
+    left join pg_catalog.pg_namespace ns on prs.prsnamespace = ns.oid
     WHERE {{ CATALOGS.DB_SUPPORT('ns') }}
 {% endif %}
 {% if all_obj %}
@@ -310,8 +310,8 @@ FROM (
 {% if all_obj or obj_type in ['fts_template'] %}
     SELECT 'fts_template'::text AS obj_type, tmpl.tmplname AS obj_name, ':schema.'||ns.oid||':/' || ns.nspname || '/:fts_template.'||tmpl.oid||':/' || tmpl.tmplname AS obj_path, ns.nspname AS schema_name,
     {{ show_node_prefs['fts_template'] }} AS show_node, NULL AS other_info
-    FROM pg_ts_template tmpl
-    left join pg_namespace ns on tmpl.tmplnamespace = ns.oid
+    FROM pg_catalog.pg_ts_template tmpl
+    left join pg_catalog.pg_namespace ns on tmpl.tmplnamespace = ns.oid
     AND {{ CATALOGS.DB_SUPPORT('ns') }}
 {% endif %}
 {% if all_obj %}
@@ -320,8 +320,8 @@ FROM (
 {% if all_obj or obj_type in ['domain'] %}
     select 'domain'::text AS obj_type, t.typname AS obj_name, ':schema.'||n.oid||':/' || n.nspname || '/:domain.'||t.oid||':/' || t.typname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['domain'] }} AS show_node, NULL AS other_info
-    from pg_type t
-    inner join pg_namespace n on t.typnamespace = n.oid
+    from pg_catalog.pg_type t
+    inner join pg_catalog.pg_namespace n on t.typnamespace = n.oid
     where t.typtype = 'd'
     AND n.nspparent = 0
     AND {{ CATALOGS.DB_SUPPORT('n') }}
@@ -334,8 +334,8 @@ FROM (
         c.conname AS obj_name, ':schema.'||n.oid||':/' || n.nspname || '/:domain.'||t.oid||':/' || t.typname || '/:domain_constraints.'||c.oid||':/' || c.conname AS obj_path,
         n.nspname AS schema_name,
         {{ show_node_prefs['domain_constraints'] }} AS show_node, NULL AS other_info
-    FROM pg_constraint c JOIN pg_type t
-    ON t.oid=contypid JOIN pg_namespace n
+    FROM pg_catalog.pg_constraint c JOIN pg_catalog.pg_type t
+    ON t.oid=contypid JOIN pg_catalog.pg_namespace n
     ON n.oid=t.typnamespace
     WHERE t.typtype = 'd'
     AND n.nspparent = 0
@@ -347,7 +347,7 @@ FROM (
 {% if all_obj or obj_type in ['foreign_data_wrapper'] %}
     select 'foreign_data_wrapper'::text AS obj_type, fdwname AS obj_name, ':foreign_data_wrapper.'||oid||':/' || fdwname AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['foreign_data_wrapper'] }} AS show_node, NULL AS other_info
-    from pg_foreign_data_wrapper
+    from pg_catalog.pg_foreign_data_wrapper
 {% endif %}
 {% if all_obj %}
     UNION
@@ -355,8 +355,8 @@ FROM (
 {% if all_obj or obj_type in ['foreign_server'] %}
     select 'foreign_server'::text AS obj_type, sr.srvname AS obj_name, ':foreign_data_wrapper.'||fdw.oid||':/' || fdw.fdwname || '/:foreign_server.'||sr.oid||':/' || sr.srvname AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['foreign_server'] }} AS show_node, NULL AS other_info
-    from pg_foreign_server sr
-    inner join pg_foreign_data_wrapper fdw on sr.srvfdw = fdw.oid
+    from pg_catalog.pg_foreign_server sr
+    inner join pg_catalog.pg_foreign_data_wrapper fdw on sr.srvfdw = fdw.oid
 {% endif %}
 {% if all_obj %}
     UNION
@@ -364,9 +364,9 @@ FROM (
 {% if all_obj or obj_type in ['user_mapping'] %}
     select 'user_mapping'::text AS obj_type, um.usename AS obj_name, ':foreign_data_wrapper.'||fdw.oid||':/' || fdw.fdwname || '/:foreign_server.'||sr.oid||':/' || sr.srvname || '/:user_mapping.'||um.umid||':/' || um.usename AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['user_mapping'] }} AS show_node, NULL AS other_info
-    from pg_user_mappings um
-    inner join pg_foreign_server sr on um.srvid = sr.oid
-    inner join pg_foreign_data_wrapper fdw on sr.srvfdw = fdw.oid
+    from pg_catalog.pg_user_mappings um
+    inner join pg_catalog.pg_foreign_server sr on um.srvid = sr.oid
+    inner join pg_catalog.pg_foreign_data_wrapper fdw on sr.srvfdw = fdw.oid
 {% endif %}
 {% if all_obj %}
     UNION
@@ -374,9 +374,9 @@ FROM (
 {% if all_obj or obj_type in ['foreign_table'] %}
     select 'foreign_table'::text AS obj_type, c.relname AS obj_name, ':schema.'||ns.oid||':/' || ns.nspname || '/:foreign_table.'||c.oid||':/' || c.relname AS obj_path, ns.nspname AS schema_name,
     {{ show_node_prefs['foreign_table'] }} AS show_node, NULL AS other_info
-    from pg_foreign_table ft
-    inner join pg_class c on ft.ftrelid = c.oid
-    inner join pg_namespace ns on c.relnamespace = ns.oid
+    from pg_catalog.pg_foreign_table ft
+    inner join pg_catalog.pg_class c on ft.ftrelid = c.oid
+    inner join pg_catalog.pg_namespace ns on c.relnamespace = ns.oid
     AND {{ CATALOGS.DB_SUPPORT('ns') }}
 {% endif %}
 {% if all_obj %}
@@ -385,9 +385,9 @@ FROM (
 {% if all_obj or obj_type in ['extension'] %}
     select 'extension'::text AS obj_type, x.extname AS obj_name, ':extension.'||x.oid||':/' || x.extname AS obj_path, ''::text AS schema_name,
     {{ show_node_prefs['extension'] }} AS show_node, NULL AS other_info
-    FROM pg_extension x
-    JOIN pg_namespace n on x.extnamespace=n.oid
-    join pg_available_extensions() e(name, default_version, comment) ON x.extname=e.name
+    FROM pg_catalog.pg_extension x
+    JOIN pg_catalog.pg_namespace n on x.extnamespace=n.oid
+    join pg_catalog.pg_available_extensions() e(name, default_version, comment) ON x.extname=e.name
 {% endif %}
 {% if all_obj %}
     UNION
@@ -395,8 +395,8 @@ FROM (
 {% if all_obj or obj_type in ['collation'] %}
     SELECT 'collation'::text AS obj_type, c.collname AS obj_name, ':schema.'||n.oid||':/' || n.nspname || '/:collation.'||c.oid||':/' || c.collname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['collation'] }} AS show_node, NULL AS other_info
-    FROM pg_collation c
-    JOIN pg_namespace n ON n.oid=c.collnamespace
+    FROM pg_catalog.pg_collation c
+    JOIN pg_catalog.pg_namespace n ON n.oid=c.collnamespace
     WHERE {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
 {% if all_obj %}
@@ -405,8 +405,8 @@ FROM (
 {% if all_obj or obj_type in ['synonym'] %}
     SELECT 'synonym'::text AS obj_type, s.synname AS obj_name, ':schema.'||n.oid||':/' || n.nspname || '/:synonym.'||s.oid||':/' || s.synname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['synonym'] }} AS show_node, NULL AS other_info
-    FROM pg_synonym s
-    JOIN pg_namespace n ON n.oid=s.synnamespace
+    FROM pg_catalog.pg_synonym s
+    JOIN pg_catalog.pg_namespace n ON n.oid=s.synnamespace
     WHERE {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
 {% if all_obj %}
@@ -415,8 +415,8 @@ FROM (
 {% if all_obj or obj_type in ['package'] %}
     SELECT 'package'::text AS obj_type, p.nspname AS obj_name, ':schema.'||n.oid||':/' || n.nspname || '/:package.'||p.oid||':/' || p.nspname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['package'] }} AS show_node, NULL AS other_info
-    FROM pg_namespace p
-    JOIN pg_namespace n ON n.oid=p.nspparent
+    FROM pg_catalog.pg_namespace p
+    JOIN pg_catalog.pg_namespace n ON n.oid=p.nspparent
     WHERE {{ CATALOGS.DB_SUPPORT('n') }}
 {% endif %}
 {% if all_obj %}
@@ -426,8 +426,8 @@ FROM (
     SELECT 'edbvar'::text AS obj_type, v.varname AS obj_name,
     ':schema.'||n.oid||':/' || n.nspname || '/:package.'||p.oid||':/' || p.nspname || '/:edbvar.'||v.oid||':/' || v.varname AS obj_path, n.nspname AS schema_name,
     {{ show_node_prefs['edbvar'] }} AS show_node, NULL AS other_info
-    FROM edb_variable v JOIN pg_namespace p
-    ON v.varpackage = p.oid JOIN pg_namespace n
+    FROM pg_catalog.edb_variable v JOIN pg_catalog.pg_namespace p
+    ON v.varpackage = p.oid JOIN pg_catalog.pg_namespace n
     ON p.nspparent = n.oid
     WHERE {{ CATALOGS.DB_SUPPORT('p') }}
     AND {{ CATALOGS.DB_SUPPORT('n') }}
diff --git a/web/pgadmin/tools/sqleditor/__init__.py b/web/pgadmin/tools/sqleditor/__init__.py
index e0817e2c0..37cc89c50 100644
--- a/web/pgadmin/tools/sqleditor/__init__.py
+++ b/web/pgadmin/tools/sqleditor/__init__.py
@@ -609,8 +609,8 @@ def fetch_pg_types(columns_info, trans_obj):
 
     if oids:
         status, res = default_conn.execute_dict(
-            "SELECT oid, format_type(oid, NULL) AS typname FROM pg_type "
-            "WHERE oid IN %s ORDER BY oid;", [tuple(oids)]
+            "SELECT oid, pg_catalog.format_type(oid, NULL) AS typname FROM "
+            "pg_catalog.pg_type WHERE oid IN %s ORDER BY oid;", [tuple(oids)]
         )
 
         if not status:
diff --git a/web/pgadmin/tools/sqleditor/templates/sqleditor/sql/11_plus/primary_keys.sql b/web/pgadmin/tools/sqleditor/templates/sqleditor/sql/11_plus/primary_keys.sql
index 459977e90..173aa60fa 100644
--- a/web/pgadmin/tools/sqleditor/templates/sqleditor/sql/11_plus/primary_keys.sql
+++ b/web/pgadmin/tools/sqleditor/templates/sqleditor/sql/11_plus/primary_keys.sql
@@ -1,8 +1,8 @@
 {# ============= Fetch the primary keys for given object id ============= #}
 {% if obj_id %}
 SELECT at.attname, at.attnum, ty.typname
-FROM pg_attribute at LEFT JOIN pg_type ty ON (ty.oid = at.atttypid)
+FROM pg_catalog.pg_attribute at LEFT JOIN pg_catalog.pg_type ty ON (ty.oid = at.atttypid)
 WHERE attrelid={{obj_id}}::oid AND attnum = ANY (
-    (SELECT con.conkey FROM pg_class rel LEFT OUTER JOIN pg_constraint con ON con.conrelid=rel.oid
+    (SELECT con.conkey FROM pg_catalog.pg_class rel LEFT OUTER JOIN pg_catalog.pg_constraint con ON con.conrelid=rel.oid
     AND con.contype='p' WHERE rel.relkind IN ('r','s','t', 'p') AND rel.oid = {{obj_id}}::oid)::oid[])
 {% endif %}
diff --git a/web/pgadmin/tools/sqleditor/templates/sqleditor/sql/default/get_columns.sql b/web/pgadmin/tools/sqleditor/templates/sqleditor/sql/default/get_columns.sql
index 851b98523..b56ed1c78 100644
--- a/web/pgadmin/tools/sqleditor/templates/sqleditor/sql/default/get_columns.sql
+++ b/web/pgadmin/tools/sqleditor/templates/sqleditor/sql/default/get_columns.sql
@@ -1,8 +1,8 @@
 {# ============= Fetch the columns ============= #}
 {% if obj_id %}
 SELECT at.attname, ty.typname, at.attnum
-    FROM pg_attribute at
-    LEFT JOIN pg_type ty ON (ty.oid = at.atttypid)
+    FROM pg_catalog.pg_attribute at
+    LEFT JOIN pg_catalog.pg_type ty ON (ty.oid = at.atttypid)
 WHERE attrelid={{obj_id}}::oid
     AND at.attnum > 0
     AND at.attisdropped = FALSE
diff --git a/web/pgadmin/tools/sqleditor/templates/sqleditor/sql/default/has_oids.sql b/web/pgadmin/tools/sqleditor/templates/sqleditor/sql/default/has_oids.sql
index edeeb839f..4da9109f8 100644
--- a/web/pgadmin/tools/sqleditor/templates/sqleditor/sql/default/has_oids.sql
+++ b/web/pgadmin/tools/sqleditor/templates/sqleditor/sql/default/has_oids.sql
@@ -1,6 +1,6 @@
 {# ============= Check object has OIDs or not ============= #}
 {% if obj_id %}
 SELECT rel.relhasoids AS has_oids
-FROM pg_class rel
+FROM pg_catalog.pg_class rel
 WHERE rel.oid = {{ obj_id }}::oid
 {% endif %}
diff --git a/web/pgadmin/tools/sqleditor/templates/sqleditor/sql/default/objectname.sql b/web/pgadmin/tools/sqleditor/templates/sqleditor/sql/default/objectname.sql
index 188e69db2..f9515cfbe 100644
--- a/web/pgadmin/tools/sqleditor/templates/sqleditor/sql/default/objectname.sql
+++ b/web/pgadmin/tools/sqleditor/templates/sqleditor/sql/default/objectname.sql
@@ -1,7 +1,7 @@
 {# ============= Fetch the schema and object name for given object id ============= #}
 {% if obj_id %}
 SELECT n.nspname, r.relname
-FROM pg_class r
-    LEFT JOIN pg_namespace n ON (r.relnamespace = n.oid)
+FROM pg_catalog.pg_class r
+    LEFT JOIN pg_catalog.pg_namespace n ON (r.relnamespace = n.oid)
 WHERE r.oid = {{obj_id}};
 {% endif %}
diff --git a/web/pgadmin/tools/sqleditor/templates/sqleditor/sql/default/primary_keys.sql b/web/pgadmin/tools/sqleditor/templates/sqleditor/sql/default/primary_keys.sql
index d1e398579..3820077e3 100644
--- a/web/pgadmin/tools/sqleditor/templates/sqleditor/sql/default/primary_keys.sql
+++ b/web/pgadmin/tools/sqleditor/templates/sqleditor/sql/default/primary_keys.sql
@@ -1,8 +1,8 @@
 {# ============= Fetch the primary keys for given object id ============= #}
 {% if obj_id %}
 SELECT at.attname, at.attnum, ty.typname
-FROM pg_attribute at LEFT JOIN pg_type ty ON (ty.oid = at.atttypid)
+FROM pg_catalog.pg_attribute at LEFT JOIN pg_catalog.pg_type ty ON (ty.oid = at.atttypid)
 WHERE attrelid={{obj_id}}::oid AND attnum = ANY (
-    (SELECT con.conkey FROM pg_class rel LEFT OUTER JOIN pg_constraint con ON con.conrelid=rel.oid
+    (SELECT con.conkey FROM pg_catalog.pg_class rel LEFT OUTER JOIN pg_catalog.pg_constraint con ON con.conrelid=rel.oid
     AND con.contype='p' WHERE rel.relkind IN ('r','s','t') AND rel.oid = ({{obj_id}})::oid)::oid[])
 {% endif %}
