Subject: [Patch] Show databases for Greenplum

From: George Gelashvili <[email-masked]>
Date: Tue, 31 Jan 2017 17:08:54 -0500

Hi Hackers,

We're working on https://redmine.postgresql.org/issues/2132
This patch allows pgAdmin to list databases and schemas when connected to a
Greenplum server.

The fix was largely allowing pgadmin to load templates that work with
Greenplum. To achieve this, we used the versioned template loader in more
places where "9.1_plus" was previously hardcoded.
We also created a set of "default" template directories so that Greenplum
will load the templates that were tagged as 9.1 for now.

Tira & George
diff --git a/web/pgadmin/browser/server_groups/servers/databases/casts/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/casts/__init__.py
index ba7f7ed2..c9535e7b 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/casts/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/casts/__init__.py
@@ -201,7 +201,7 @@ class CastView(PGChildNodeView):
             self.manager = get_driver(PG_DEFAULT_DRIVER).connection_manager(kwargs['sid'])
             self.conn = self.manager.connection(did=kwargs['did'])
             # Set template path for the SQL scripts
-            self.template_path = 'cast/sql/9.1_plus'
+            self.template_path = 'cast/sql/#{0}#'.format(self.manager.version)
 
             return f(*args, **kwargs)
 
diff --git a/web/pgadmin/browser/server_groups/servers/databases/casts/templates/cast/sql/9.1_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/casts/templates/cast/sql/default/create.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/casts/templates/cast/sql/9.1_plus/create.sql
rename to web/pgadmin/browser/server_groups/servers/databases/casts/templates/cast/sql/default/create.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/casts/templates/cast/sql/9.1_plus/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/casts/templates/cast/sql/default/delete.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/casts/templates/cast/sql/9.1_plus/delete.sql
rename to web/pgadmin/browser/server_groups/servers/databases/casts/templates/cast/sql/default/delete.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/casts/templates/cast/sql/9.1_plus/functions.sql b/web/pgadmin/browser/server_groups/servers/databases/casts/templates/cast/sql/default/functions.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/casts/templates/cast/sql/9.1_plus/functions.sql
rename to web/pgadmin/browser/server_groups/servers/databases/casts/templates/cast/sql/default/functions.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/casts/templates/cast/sql/9.1_plus/getsrcandtrgttype.sql b/web/pgadmin/browser/server_groups/servers/databases/casts/templates/cast/sql/default/getsrcandtrgttype.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/casts/templates/cast/sql/9.1_plus/getsrcandtrgttype.sql
rename to web/pgadmin/browser/server_groups/servers/databases/casts/templates/cast/sql/default/getsrcandtrgttype.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/casts/templates/cast/sql/9.1_plus/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/casts/templates/cast/sql/default/nodes.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/casts/templates/cast/sql/9.1_plus/nodes.sql
rename to web/pgadmin/browser/server_groups/servers/databases/casts/templates/cast/sql/default/nodes.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/casts/templates/cast/sql/9.1_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/casts/templates/cast/sql/default/properties.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/casts/templates/cast/sql/9.1_plus/properties.sql
rename to web/pgadmin/browser/server_groups/servers/databases/casts/templates/cast/sql/default/properties.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/casts/templates/cast/sql/9.1_plus/sql.sql b/web/pgadmin/browser/server_groups/servers/databases/casts/templates/cast/sql/default/sql.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/casts/templates/cast/sql/9.1_plus/sql.sql
rename to web/pgadmin/browser/server_groups/servers/databases/casts/templates/cast/sql/default/sql.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/casts/templates/cast/sql/9.1_plus/update.sql b/web/pgadmin/browser/server_groups/servers/databases/casts/templates/cast/sql/default/update.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/casts/templates/cast/sql/9.1_plus/update.sql
rename to web/pgadmin/browser/server_groups/servers/databases/casts/templates/cast/sql/default/update.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/9.1_plus/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/default/acl.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/9.1_plus/acl.sql
rename to web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/default/acl.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/9.1_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/default/create.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/9.1_plus/create.sql
rename to web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/default/create.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/9.1_plus/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/default/delete.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/9.1_plus/delete.sql
rename to web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/default/delete.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/9.1_plus/dependents.sql b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/default/dependents.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/9.1_plus/dependents.sql
rename to web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/default/dependents.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/9.1_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/default/properties.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/9.1_plus/properties.sql
rename to web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/default/properties.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/9.1_plus/update.sql b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/default/update.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/9.1_plus/update.sql
rename to web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/templates/foreign_servers/sql/default/update.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/__init__.py
index dcbc55c6..97c7d9d2 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/__init__.py
@@ -220,7 +220,7 @@ class UserMappingView(PGChildNodeView):
             self.conn = self.manager.connection(did=kwargs['did'])
 
             # Set the template path for the SQL scripts
-            self.template_path = 'user_mappings/sql/9.1_plus'
+            self.template_path = 'user_mappings/sql/#{0}#'.format(self.manager.version)
 
             return f(*args, **kwargs)
 
diff --git a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/templates/user_mappings/sql/9.1_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/templates/user_mappings/sql/default/create.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/templates/user_mappings/sql/9.1_plus/create.sql
rename to web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/templates/user_mappings/sql/default/create.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/templates/user_mappings/sql/9.1_plus/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/templates/user_mappings/sql/default/delete.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/templates/user_mappings/sql/9.1_plus/delete.sql
rename to web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/templates/user_mappings/sql/default/delete.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/templates/user_mappings/sql/9.1_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/templates/user_mappings/sql/default/properties.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/templates/user_mappings/sql/9.1_plus/properties.sql
rename to web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/templates/user_mappings/sql/default/properties.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/templates/user_mappings/sql/9.1_plus/update.sql b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/templates/user_mappings/sql/default/update.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/templates/user_mappings/sql/9.1_plus/update.sql
rename to web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/templates/user_mappings/sql/default/update.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/9.1_plus/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/default/acl.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/9.1_plus/acl.sql
rename to web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/default/acl.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/9.1_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/default/create.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/9.1_plus/create.sql
rename to web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/default/create.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/9.1_plus/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/default/delete.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/9.1_plus/delete.sql
rename to web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/default/delete.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/9.1_plus/handlers.sql b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/default/handlers.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/9.1_plus/handlers.sql
rename to web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/default/handlers.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/9.1_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/default/properties.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/9.1_plus/properties.sql
rename to web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/default/properties.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/9.1_plus/update.sql b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/default/update.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/9.1_plus/update.sql
rename to web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/default/update.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/9.1_plus/validators.sql b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/default/validators.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/9.1_plus/validators.sql
rename to web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/templates/foreign_data_wrappers/sql/default/validators.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/9.1_plus/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/default/acl.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/9.1_plus/acl.sql
rename to web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/default/acl.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/9.1_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/default/create.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/9.1_plus/create.sql
rename to web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/default/create.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/9.1_plus/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/default/delete.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/9.1_plus/delete.sql
rename to web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/default/delete.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/9.1_plus/functions.sql b/web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/default/functions.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/9.1_plus/functions.sql
rename to web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/default/functions.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/9.1_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/default/properties.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/9.1_plus/properties.sql
rename to web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/default/properties.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/9.1_plus/sqlpane.sql b/web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/default/sqlpane.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/9.1_plus/sqlpane.sql
rename to web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/default/sqlpane.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/9.1_plus/templates.sql b/web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/default/templates.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/9.1_plus/templates.sql
rename to web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/default/templates.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/9.1_plus/update.sql b/web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/default/update.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/9.1_plus/update.sql
rename to web/pgadmin/browser/server_groups/servers/databases/languages/templates/languages/sql/default/update.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/__init__.py
index 6d316de2..9c8e86b1 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/__init__.py
@@ -146,8 +146,9 @@ class CatalogObjectView(PGChildNodeView):
                 kwargs['sid']
             )
             self.conn = self.manager.connection(did=kwargs['did'])
-            self.template_path = 'catalog_object/sql/{0}/9.1_plus'.format(
-                'ppas' if self.manager.server_type == 'ppas' else 'pg'
+            self.template_path = 'catalog_object/sql/{0}/#{1}#'.format(
+                'ppas' if self.manager.server_type == 'ppas' else 'pg',
+                self.manager.version
             )
 
             return f(*args, **kwargs)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/columns/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/columns/__init__.py
index 6ccd3bc6..ea2254d8 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/columns/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/columns/__init__.py
@@ -166,7 +166,7 @@ class CatalogObjectColumnsView(PGChildNodeView):
                 kwargs['sid']
             )
             self.conn = self.manager.connection(did=kwargs['did'])
-            self.template_path = 'catalog_object_column/sql/9.1_plus'
+            self.template_path = 'catalog_object_column/sql/#{0}#'.format(self.manager.version)
 
             return f(*args, **kwargs)
 
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/columns/templates/catalog_object_column/sql/9.1_plus/depend.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/columns/templates/catalog_object_column/sql/default/depend.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/columns/templates/catalog_object_column/sql/9.1_plus/depend.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/columns/templates/catalog_object_column/sql/default/depend.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/columns/templates/catalog_object_column/sql/9.1_plus/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/columns/templates/catalog_object_column/sql/default/nodes.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/columns/templates/catalog_object_column/sql/9.1_plus/nodes.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/columns/templates/catalog_object_column/sql/default/nodes.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/columns/templates/catalog_object_column/sql/9.1_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/columns/templates/catalog_object_column/sql/default/properties.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/columns/templates/catalog_object_column/sql/9.1_plus/properties.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/columns/templates/catalog_object_column/sql/default/properties.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/templates/catalog_object/sql/pg/9.1_plus/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/templates/catalog_object/sql/pg/default/nodes.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/templates/catalog_object/sql/pg/9.1_plus/nodes.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/templates/catalog_object/sql/pg/default/nodes.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/templates/catalog_object/sql/pg/9.1_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/templates/catalog_object/sql/pg/default/properties.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/templates/catalog_object/sql/pg/9.1_plus/properties.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/templates/catalog_object/sql/pg/default/properties.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/templates/catalog_object/sql/ppas/9.1_plus/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/templates/catalog_object/sql/ppas/default/nodes.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/templates/catalog_object/sql/ppas/9.1_plus/nodes.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/templates/catalog_object/sql/ppas/default/nodes.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/templates/catalog_object/sql/ppas/9.1_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/templates/catalog_object/sql/ppas/default/properties.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/templates/catalog_object/sql/ppas/9.1_plus/properties.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/catalog_objects/templates/catalog_object/sql/ppas/default/properties.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/__init__.py
index 8a611a9e..76b70187 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/__init__.py
@@ -186,7 +186,7 @@ class CollationView(PGChildNodeView):
             )
             self.conn = self.manager.connection(did=kwargs['did'])
             # Set the template path for the SQL scripts
-            self.template_path = 'collation/sql/9.1_plus'
+            self.template_path = 'collation/sql/#{0}#'.format(self.manager.version)
 
             return f(*args, **kwargs)
         return wrap
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collation/sql/9.1_plus/backend_support.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collation/sql/default/backend_support.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collation/sql/9.1_plus/backend_support.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collation/sql/default/backend_support.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collation/sql/9.1_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collation/sql/default/create.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collation/sql/9.1_plus/create.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collation/sql/default/create.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collation/sql/9.1_plus/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collation/sql/default/delete.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collation/sql/9.1_plus/delete.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collation/sql/default/delete.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collation/sql/9.1_plus/get_collations.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collation/sql/default/get_collations.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collation/sql/9.1_plus/get_collations.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collation/sql/default/get_collations.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collation/sql/9.1_plus/get_name.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collation/sql/default/get_name.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collation/sql/9.1_plus/get_name.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collation/sql/default/get_name.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collation/sql/9.1_plus/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collation/sql/default/get_oid.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collation/sql/9.1_plus/get_oid.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collation/sql/default/get_oid.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collation/sql/9.1_plus/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collation/sql/default/nodes.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collation/sql/9.1_plus/nodes.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collation/sql/default/nodes.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collation/sql/9.1_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collation/sql/default/properties.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collation/sql/9.1_plus/properties.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collation/sql/default/properties.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collation/sql/9.1_plus/update.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collation/sql/default/update.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collation/sql/9.1_plus/update.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/collations/templates/collation/sql/default/update.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/templates/domain_constraints/sql/9.1_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/templates/domain_constraints/sql/default/create.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/templates/domain_constraints/sql/9.1_plus/create.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/templates/domain_constraints/sql/default/create.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/templates/domain_constraints/sql/9.1_plus/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/templates/domain_constraints/sql/default/delete.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/templates/domain_constraints/sql/9.1_plus/delete.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/templates/domain_constraints/sql/default/delete.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/templates/domain_constraints/sql/9.1_plus/get_domain.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/templates/domain_constraints/sql/default/get_domain.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/templates/domain_constraints/sql/9.1_plus/get_domain.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/templates/domain_constraints/sql/default/get_domain.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/templates/domain_constraints/sql/9.1_plus/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/templates/domain_constraints/sql/default/get_oid.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/templates/domain_constraints/sql/9.1_plus/get_oid.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/templates/domain_constraints/sql/default/get_oid.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/templates/domain_constraints/sql/9.1_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/templates/domain_constraints/sql/default/properties.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/templates/domain_constraints/sql/9.1_plus/properties.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/templates/domain_constraints/sql/default/properties.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/templates/domain_constraints/sql/9.1_plus/update.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/templates/domain_constraints/sql/default/update.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/templates/domain_constraints/sql/9.1_plus/update.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/domains/domain_constraints/templates/domain_constraints/sql/default/update.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/9.1_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/default/create.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/9.1_plus/create.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/default/create.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/9.1_plus/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/default/delete.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/9.1_plus/delete.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/default/delete.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/9.1_plus/get_collations.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/default/get_collations.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/9.1_plus/get_collations.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/default/get_collations.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/9.1_plus/get_constraints.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/default/get_constraints.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/9.1_plus/get_constraints.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/default/get_constraints.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/9.1_plus/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/default/get_oid.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/9.1_plus/get_oid.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/default/get_oid.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/9.1_plus/node.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/default/node.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/9.1_plus/node.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/default/node.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/9.1_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/default/properties.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/9.1_plus/properties.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/default/properties.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/9.1_plus/update.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/default/update.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/9.1_plus/update.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/domains/templates/domains/sql/default/update.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.1_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/create.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.1_plus/create.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/create.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.1_plus/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/delete.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.1_plus/delete.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/delete.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.1_plus/get_collations.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/get_collations.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.1_plus/get_collations.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/get_collations.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.1_plus/get_columns.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/get_columns.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.1_plus/get_columns.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/get_columns.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.1_plus/get_constraints.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/get_constraints.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.1_plus/get_constraints.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/get_constraints.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.1_plus/get_foreign_servers.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/get_foreign_servers.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.1_plus/get_foreign_servers.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/get_foreign_servers.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.1_plus/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/get_oid.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.1_plus/get_oid.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/get_oid.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.1_plus/node.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/node.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.1_plus/node.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/node.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.1_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/properties.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.1_plus/properties.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/properties.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.1_plus/types_condition.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/types_condition.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.1_plus/types_condition.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/types_condition.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.1_plus/update.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/update.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/9.1_plus/update.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/templates/foreign_tables/sql/default/update.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/__init__.py
index 0fe28972..cb0f828b 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/__init__.py
@@ -230,7 +230,7 @@ class FtsConfigurationView(PGChildNodeView):
                 kwargs['sid'])
             self.conn = self.manager.connection(did=kwargs['did'])
             # Set the template path for the SQL scripts
-            self.template_path = 'fts_configuration/sql/9.1_plus'
+            self.template_path = 'fts_configuration/sql/#{0}#'.format(self.manager.version)
 
             return f(*args, **kwargs)
         return wrap
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/9.1_plus/copy_config.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/default/copy_config.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/9.1_plus/copy_config.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/default/copy_config.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/9.1_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/default/create.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/9.1_plus/create.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/default/create.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/9.1_plus/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/default/delete.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/9.1_plus/delete.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/default/delete.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/9.1_plus/dictionaries.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/default/dictionaries.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/9.1_plus/dictionaries.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/default/dictionaries.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/9.1_plus/get_name.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/default/get_name.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/9.1_plus/get_name.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/default/get_name.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/9.1_plus/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/default/nodes.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/9.1_plus/nodes.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/default/nodes.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/9.1_plus/parser.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/default/parser.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/9.1_plus/parser.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/default/parser.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/9.1_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/default/properties.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/9.1_plus/properties.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/default/properties.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/9.1_plus/schema.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/default/schema.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/9.1_plus/schema.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/default/schema.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/9.1_plus/sql.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/default/sql.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/9.1_plus/sql.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/default/sql.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/9.1_plus/tokenDictList.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/default/tokenDictList.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/9.1_plus/tokenDictList.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/default/tokenDictList.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/9.1_plus/tokens.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/default/tokens.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/9.1_plus/tokens.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/default/tokens.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/9.1_plus/update.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/default/update.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/9.1_plus/update.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/templates/fts_configuration/sql/default/update.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/__init__.py
index f95c305d..ebbd8197 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/__init__.py
@@ -222,7 +222,7 @@ class FtsDictionaryView(PGChildNodeView):
                 kwargs['sid'])
             self.conn = self.manager.connection(did=kwargs['did'])
             # Set the template path for the SQL scripts
-            self.template_path = 'fts_dictionary/sql/9.1_plus'
+            self.template_path = 'fts_dictionary/sql/#{0}#'.format(self.manager.version)
 
             return f(*args, **kwargs)
         return wrap
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionary/sql/9.1_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionary/sql/default/create.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionary/sql/9.1_plus/create.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionary/sql/default/create.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionary/sql/9.1_plus/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionary/sql/default/delete.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionary/sql/9.1_plus/delete.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionary/sql/default/delete.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionary/sql/9.1_plus/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionary/sql/default/nodes.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionary/sql/9.1_plus/nodes.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionary/sql/default/nodes.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionary/sql/9.1_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionary/sql/default/properties.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionary/sql/9.1_plus/properties.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionary/sql/default/properties.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionary/sql/9.1_plus/schema.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionary/sql/default/schema.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionary/sql/9.1_plus/schema.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionary/sql/default/schema.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionary/sql/9.1_plus/sql.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionary/sql/default/sql.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionary/sql/9.1_plus/sql.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionary/sql/default/sql.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionary/sql/9.1_plus/templates.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionary/sql/default/templates.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionary/sql/9.1_plus/templates.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionary/sql/default/templates.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionary/sql/9.1_plus/update.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionary/sql/default/update.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionary/sql/9.1_plus/update.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/templates/fts_dictionary/sql/default/update.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/__init__.py
index 33ba01d8..67c46a67 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/__init__.py
@@ -220,7 +220,7 @@ class FtsParserView(PGChildNodeView):
                 kwargs['sid'])
             self.conn = self.manager.connection(did=kwargs['did'])
             # Set the template path for the SQL scripts
-            self.template_path = 'fts_parser/sql/9.1_plus'
+            self.template_path = 'fts_parser/sql/#{0}#'.format(self.manager.version)
 
             return f(*args, **kwargs)
         return wrap
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/templates/fts_parser/sql/9.1_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/templates/fts_parser/sql/default/create.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/templates/fts_parser/sql/9.1_plus/create.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/templates/fts_parser/sql/default/create.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/templates/fts_parser/sql/9.1_plus/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/templates/fts_parser/sql/default/delete.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/templates/fts_parser/sql/9.1_plus/delete.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/templates/fts_parser/sql/default/delete.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/templates/fts_parser/sql/9.1_plus/functions.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/templates/fts_parser/sql/default/functions.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/templates/fts_parser/sql/9.1_plus/functions.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/templates/fts_parser/sql/default/functions.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/templates/fts_parser/sql/9.1_plus/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/templates/fts_parser/sql/default/nodes.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/templates/fts_parser/sql/9.1_plus/nodes.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/templates/fts_parser/sql/default/nodes.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/templates/fts_parser/sql/9.1_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/templates/fts_parser/sql/default/properties.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/templates/fts_parser/sql/9.1_plus/properties.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/templates/fts_parser/sql/default/properties.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/templates/fts_parser/sql/9.1_plus/schema.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/templates/fts_parser/sql/default/schema.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/templates/fts_parser/sql/9.1_plus/schema.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/templates/fts_parser/sql/default/schema.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/templates/fts_parser/sql/9.1_plus/sql.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/templates/fts_parser/sql/default/sql.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/templates/fts_parser/sql/9.1_plus/sql.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/templates/fts_parser/sql/default/sql.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/templates/fts_parser/sql/9.1_plus/update.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/templates/fts_parser/sql/default/update.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/templates/fts_parser/sql/9.1_plus/update.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/templates/fts_parser/sql/default/update.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/__init__.py
index 3ec873dc..28d0df34 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/__init__.py
@@ -208,7 +208,7 @@ class FtsTemplateView(PGChildNodeView):
             self.manager = get_driver(PG_DEFAULT_DRIVER).connection_manager(
                 kwargs['sid'])
             self.conn = self.manager.connection(did=kwargs['did'])
-            self.template_path = 'fts_template/sql/9.1_plus'
+            self.template_path = 'fts_template/sql/#{0}#'.format(self.manager.version)
 
             return f(*args, **kwargs)
         return wrap
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_template/sql/9.1_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_template/sql/default/create.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_template/sql/9.1_plus/create.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_template/sql/default/create.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_template/sql/9.1_plus/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_template/sql/default/delete.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_template/sql/9.1_plus/delete.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_template/sql/default/delete.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_template/sql/9.1_plus/functions.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_template/sql/default/functions.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_template/sql/9.1_plus/functions.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_template/sql/default/functions.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_template/sql/9.1_plus/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_template/sql/default/nodes.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_template/sql/9.1_plus/nodes.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_template/sql/default/nodes.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_template/sql/9.1_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_template/sql/default/properties.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_template/sql/9.1_plus/properties.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_template/sql/default/properties.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_template/sql/9.1_plus/schema.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_template/sql/default/schema.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_template/sql/9.1_plus/schema.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_template/sql/default/schema.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_template/sql/9.1_plus/sql.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_template/sql/default/sql.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_template/sql/9.1_plus/sql.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_template/sql/default/sql.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_template/sql/9.1_plus/update.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_template/sql/default/update.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_template/sql/9.1_plus/update.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/templates/fts_template/sql/default/update.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/__init__.py
index b6a3a027..551f8bba 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/__init__.py
@@ -1437,7 +1437,7 @@ It may have been removed by another user or moved to another schema.
             # Get schema name
             status, schema_name = self.conn.execute_scalar(
                 render_template(
-                    'schema/pg/9.1_plus/sql/get_name.sql',
+                    'schema/pg/#{0}#/sql/get_name.sql'.format(self.manager.version),
                     scid=scid
                 )
             )
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.1_plus/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/default/acl.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.1_plus/acl.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/default/acl.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.1_plus/coll_stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/default/coll_stats.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.1_plus/coll_stats.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/default/coll_stats.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.1_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/default/create.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.1_plus/create.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/default/create.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.1_plus/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/default/delete.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.1_plus/delete.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/default/delete.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.1_plus/get_definition.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/default/get_definition.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.1_plus/get_definition.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/default/get_definition.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.1_plus/get_languages.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/default/get_languages.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.1_plus/get_languages.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/default/get_languages.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.1_plus/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/default/get_oid.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.1_plus/get_oid.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/default/get_oid.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.1_plus/get_out_types.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/default/get_out_types.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.1_plus/get_out_types.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/default/get_out_types.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.1_plus/get_schema.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/default/get_schema.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.1_plus/get_schema.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/default/get_schema.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.1_plus/get_types.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/default/get_types.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.1_plus/get_types.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/default/get_types.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.1_plus/node.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/default/node.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.1_plus/node.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/default/node.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.1_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/default/properties.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.1_plus/properties.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/default/properties.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.1_plus/stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/default/stats.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.1_plus/stats.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/default/stats.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.1_plus/update.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/default/update.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.1_plus/update.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/default/update.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.1_plus/variables.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/default/variables.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.1_plus/variables.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/default/variables.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/9.1_plus/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/default/acl.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/9.1_plus/acl.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/default/acl.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/9.1_plus/coll_stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/default/coll_stats.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/9.1_plus/coll_stats.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/default/coll_stats.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/9.1_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/default/create.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/9.1_plus/create.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/default/create.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/9.1_plus/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/default/delete.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/9.1_plus/delete.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/default/delete.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/9.1_plus/get_definition.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/default/get_definition.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/9.1_plus/get_definition.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/default/get_definition.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/9.1_plus/get_languages.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/default/get_languages.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/9.1_plus/get_languages.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/default/get_languages.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/9.1_plus/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/default/get_oid.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/9.1_plus/get_oid.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/default/get_oid.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/9.1_plus/get_out_types.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/default/get_out_types.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/9.1_plus/get_out_types.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/default/get_out_types.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/9.1_plus/get_schema.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/default/get_schema.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/9.1_plus/get_schema.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/default/get_schema.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/9.1_plus/get_types.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/default/get_types.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/9.1_plus/get_types.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/default/get_types.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/9.1_plus/node.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/default/node.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/9.1_plus/node.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/default/node.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/9.1_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/default/properties.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/9.1_plus/properties.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/default/properties.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/9.1_plus/stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/default/stats.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/9.1_plus/stats.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/default/stats.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/9.1_plus/update.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/default/update.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/9.1_plus/update.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/default/update.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/9.1_plus/variables.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/default/variables.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/9.1_plus/variables.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/default/variables.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/9.1_plus/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/default/acl.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/9.1_plus/acl.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/default/acl.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/9.1_plus/coll_stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/default/coll_stats.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/9.1_plus/coll_stats.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/default/coll_stats.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/9.1_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/default/create.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/9.1_plus/create.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/default/create.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/9.1_plus/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/default/delete.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/9.1_plus/delete.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/default/delete.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/9.1_plus/get_definition.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/default/get_definition.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/9.1_plus/get_definition.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/default/get_definition.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/9.1_plus/get_languages.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/default/get_languages.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/9.1_plus/get_languages.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/default/get_languages.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/9.1_plus/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/default/get_oid.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/9.1_plus/get_oid.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/default/get_oid.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/9.1_plus/get_out_types.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/default/get_out_types.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/9.1_plus/get_out_types.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/default/get_out_types.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/9.1_plus/get_schema.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/default/get_schema.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/9.1_plus/get_schema.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/default/get_schema.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/9.1_plus/get_types.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/default/get_types.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/9.1_plus/get_types.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/default/get_types.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/9.1_plus/node.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/default/node.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/9.1_plus/node.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/default/node.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/9.1_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/default/properties.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/9.1_plus/properties.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/default/properties.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/9.1_plus/stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/default/stats.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/9.1_plus/stats.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/default/stats.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/9.1_plus/update.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/default/update.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/9.1_plus/update.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/default/update.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/9.1_plus/variables.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/default/variables.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/9.1_plus/variables.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/default/variables.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/9.1_plus/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/default/acl.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/9.1_plus/acl.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/default/acl.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/9.1_plus/coll_stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/default/coll_stats.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/9.1_plus/coll_stats.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/default/coll_stats.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/9.1_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/default/create.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/9.1_plus/create.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/default/create.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/9.1_plus/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/default/delete.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/9.1_plus/delete.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/default/delete.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/9.1_plus/get_definition.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/default/get_definition.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/9.1_plus/get_definition.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/default/get_definition.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/9.1_plus/get_languages.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/default/get_languages.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/9.1_plus/get_languages.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/default/get_languages.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/9.1_plus/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/default/get_oid.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/9.1_plus/get_oid.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/default/get_oid.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/9.1_plus/get_out_types.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/default/get_out_types.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/9.1_plus/get_out_types.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/default/get_out_types.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/9.1_plus/get_schema.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/default/get_schema.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/9.1_plus/get_schema.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/default/get_schema.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/9.1_plus/get_types.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/default/get_types.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/9.1_plus/get_types.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/default/get_types.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/9.1_plus/node.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/default/node.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/9.1_plus/node.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/default/node.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/9.1_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/default/properties.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/9.1_plus/properties.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/default/properties.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/9.1_plus/stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/default/stats.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/9.1_plus/stats.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/default/stats.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/9.1_plus/update.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/default/update.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/9.1_plus/update.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/default/update.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/9.1_plus/variables.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/default/variables.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/9.1_plus/variables.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/default/variables.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/9.1_plus/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/default/acl.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/9.1_plus/acl.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/default/acl.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/9.1_plus/coll_stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/default/coll_stats.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/9.1_plus/coll_stats.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/default/coll_stats.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/9.1_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/default/create.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/9.1_plus/create.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/default/create.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/9.1_plus/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/default/delete.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/9.1_plus/delete.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/default/delete.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/9.1_plus/get_definition.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/default/get_definition.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/9.1_plus/get_definition.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/default/get_definition.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/9.1_plus/get_languages.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/default/get_languages.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/9.1_plus/get_languages.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/default/get_languages.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/9.1_plus/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/default/get_oid.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/9.1_plus/get_oid.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/default/get_oid.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/9.1_plus/get_out_types.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/default/get_out_types.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/9.1_plus/get_out_types.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/default/get_out_types.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/9.1_plus/get_schema.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/default/get_schema.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/9.1_plus/get_schema.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/default/get_schema.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/9.1_plus/get_types.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/default/get_types.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/9.1_plus/get_types.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/default/get_types.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/9.1_plus/node.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/default/node.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/9.1_plus/node.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/default/node.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/9.1_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/default/properties.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/9.1_plus/properties.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/default/properties.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/9.1_plus/stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/default/stats.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/9.1_plus/stats.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/default/stats.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/9.1_plus/update.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/default/update.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/9.1_plus/update.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/default/update.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/9.1_plus/variables.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/default/variables.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/9.1_plus/variables.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/default/variables.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/__init__.py
index 850c2417..82a15013 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/__init__.py
@@ -145,7 +145,7 @@ class SequenceView(PGChildNodeView):
                     self.conn = self.manager.connection(did=kwargs['did'])
                 else:
                     self.conn = self.manager.connection()
-                self.template_path = 'sequence/sql/9.1_plus'
+                self.template_path = 'sequence/sql/#{0}#'.format(self.manager.version)
                 self.acl = ['r', 'w', 'U']
 
                 return f(self, *args, **kwargs)
@@ -735,7 +735,7 @@ class SequenceView(PGChildNodeView):
             # Get schema name
             status, schema_name = self.conn.execute_scalar(
                 render_template(
-                    'schema/pg/9.1_plus/sql/get_name.sql',
+                    'schema/pg/#{0}#/sql/get_name.sql'.format(self.manager.version),
                     scid=scid
                 )
             )
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/9.1_plus/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/default/acl.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/9.1_plus/acl.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/default/acl.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/9.1_plus/backend_support.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/default/backend_support.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/9.1_plus/backend_support.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/default/backend_support.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/9.1_plus/coll_stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/default/coll_stats.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/9.1_plus/coll_stats.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/default/coll_stats.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/9.1_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/default/create.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/9.1_plus/create.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/default/create.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/9.1_plus/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/default/delete.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/9.1_plus/delete.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/default/delete.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/9.1_plus/get_def.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/default/get_def.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/9.1_plus/get_def.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/default/get_def.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/9.1_plus/get_dependencies.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/default/get_dependencies.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/9.1_plus/get_dependencies.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/default/get_dependencies.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/9.1_plus/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/default/get_oid.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/9.1_plus/get_oid.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/default/get_oid.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/9.1_plus/grant.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/default/grant.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/9.1_plus/grant.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/default/grant.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/9.1_plus/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/default/nodes.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/9.1_plus/nodes.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/default/nodes.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/9.1_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/default/properties.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/9.1_plus/properties.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/default/properties.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/9.1_plus/stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/default/stats.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/9.1_plus/stats.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/default/stats.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/9.1_plus/update.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/default/update.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/9.1_plus/update.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/templates/sequence/sql/default/update.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonym/sql/9.1_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonym/sql/default/create.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonym/sql/9.1_plus/create.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonym/sql/default/create.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonym/sql/9.1_plus/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonym/sql/default/delete.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonym/sql/9.1_plus/delete.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonym/sql/default/delete.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonym/sql/9.1_plus/get_objects.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonym/sql/default/get_objects.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonym/sql/9.1_plus/get_objects.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonym/sql/default/get_objects.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonym/sql/9.1_plus/get_parent_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonym/sql/default/get_parent_oid.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonym/sql/9.1_plus/get_parent_oid.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonym/sql/default/get_parent_oid.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonym/sql/9.1_plus/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonym/sql/default/nodes.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonym/sql/9.1_plus/nodes.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonym/sql/default/nodes.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonym/sql/9.1_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonym/sql/default/properties.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonym/sql/9.1_plus/properties.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonym/sql/default/properties.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonym/sql/9.1_plus/update.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonym/sql/default/update.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonym/sql/9.1_plus/update.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/templates/synonym/sql/default/update.sql
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 2bf604f8..e5093a20 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
@@ -73,7 +73,7 @@ class IndexesModule(CollectionNodeModule):
             if 'vid' not in kwargs:
                 return True
 
-            template_path = 'index/sql/9.1_plus'
+            template_path = 'index/sql/#{0}#'.format(manager.version)
             SQL = render_template("/".join(
                 [template_path, 'backend_support.sql']), vid=kwargs['vid'])
             status, res = conn.execute_scalar(SQL)
@@ -232,7 +232,7 @@ class IndexesView(PGChildNodeView):
                 kwargs['did'] in self.manager.db_info else 0
 
             # we will set template path for sql scripts
-            self.template_path = 'index/sql/9.1_plus'
+            self.template_path = 'index/sql/#{0}#'.format(self.manager.version)
 
             # We need parent's name eg table name and schema name
             # when we create new index in update we can fetch it using
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/__init__.py
new file mode 100644
index 00000000..e69de29b
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/9.1_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/default/create.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/9.1_plus/create.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/default/create.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/9.1_plus/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/default/delete.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/9.1_plus/delete.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/default/delete.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/9.1_plus/get_name.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/default/get_name.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/9.1_plus/get_name.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/default/get_name.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/9.1_plus/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/default/get_oid.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/9.1_plus/get_oid.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/default/get_oid.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/9.1_plus/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
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/9.1_plus/get_oid_with_transaction.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/default/get_oid_with_transaction.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/9.1_plus/get_parent.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/default/get_parent.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/9.1_plus/get_parent.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/default/get_parent.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/9.1_plus/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/default/nodes.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/9.1_plus/nodes.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/default/nodes.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/9.1_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/default/properties.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/9.1_plus/properties.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/default/properties.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/9.1_plus/update.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/default/update.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/9.1_plus/update.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/check_constraint/sql/default/update.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/9.1_plus/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/default/acl.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/9.1_plus/acl.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/default/acl.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/9.1_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/default/create.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/9.1_plus/create.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/default/create.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/9.1_plus/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/default/delete.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/9.1_plus/delete.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/default/delete.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/9.1_plus/depend.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/default/depend.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/9.1_plus/depend.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/default/depend.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/9.1_plus/edit_mode_types.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/default/edit_mode_types.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/9.1_plus/edit_mode_types.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/default/edit_mode_types.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/9.1_plus/get_collations.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/default/get_collations.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/9.1_plus/get_collations.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/default/get_collations.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/9.1_plus/get_inherited_tables.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/default/get_inherited_tables.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/9.1_plus/get_inherited_tables.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/default/get_inherited_tables.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/9.1_plus/get_parent.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/default/get_parent.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/9.1_plus/get_parent.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/default/get_parent.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/9.1_plus/get_position.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/default/get_position.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/9.1_plus/get_position.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/default/get_position.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/9.1_plus/get_types.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/default/get_types.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/9.1_plus/get_types.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/default/get_types.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/9.1_plus/is_referenced.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/default/is_referenced.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/9.1_plus/is_referenced.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/default/is_referenced.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/9.1_plus/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/default/nodes.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/9.1_plus/nodes.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/default/nodes.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/9.1_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/default/properties.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/9.1_plus/properties.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/default/properties.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/9.1_plus/stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/default/stats.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/9.1_plus/stats.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/default/stats.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/9.1_plus/update.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/default/update.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/9.1_plus/update.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/column/sql/default/update.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/begin.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/begin.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/begin.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/begin.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/create.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/create.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/create.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/delete.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/delete.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/delete.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/end.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/end.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/end.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/end.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/get_access_methods.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_access_methods.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/get_access_methods.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_access_methods.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/get_constraint_cols.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_constraint_cols.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/get_constraint_cols.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_constraint_cols.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/get_name.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_name.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/get_name.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_name.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_oid.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/get_oid.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_oid.sql
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/default/get_oid_with_transaction.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/get_oid_with_transaction.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_oid_with_transaction.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/get_oper_class.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_oper_class.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/get_oper_class.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_oper_class.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/get_operator.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_operator.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/get_operator.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_operator.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/get_parent.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_parent.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/get_parent.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/get_parent.sql
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/default/nodes.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/nodes.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/nodes.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/properties.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/properties.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/properties.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/stats.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/stats.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/stats.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/update.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/update.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/9.1_plus/update.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/exclusion_constraint/sql/default/update.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/9.1_plus/alter.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/default/alter.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/9.1_plus/alter.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/default/alter.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/9.1_plus/backend_support.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/default/backend_support.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/9.1_plus/backend_support.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/default/backend_support.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/9.1_plus/coll_stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/default/coll_stats.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/9.1_plus/coll_stats.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/default/coll_stats.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/9.1_plus/column_details.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/default/column_details.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/9.1_plus/column_details.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/default/column_details.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/9.1_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/default/create.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/9.1_plus/create.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/default/create.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/9.1_plus/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/default/delete.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/9.1_plus/delete.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/default/delete.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/9.1_plus/get_am.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/default/get_am.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/9.1_plus/get_am.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/default/get_am.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/9.1_plus/get_collations.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/default/get_collations.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/9.1_plus/get_collations.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/default/get_collations.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/9.1_plus/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/default/get_oid.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/9.1_plus/get_oid.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/default/get_oid.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/9.1_plus/get_op_class.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/default/get_op_class.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/9.1_plus/get_op_class.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/default/get_op_class.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/9.1_plus/get_parent.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/default/get_parent.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/9.1_plus/get_parent.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/default/get_parent.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/9.1_plus/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/default/nodes.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/9.1_plus/nodes.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/default/nodes.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/9.1_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/default/properties.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/9.1_plus/properties.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/default/properties.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/9.1_plus/stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/default/stats.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/9.1_plus/stats.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/default/stats.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/9.1_plus/update.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/default/update.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/9.1_plus/update.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/index/sql/default/update.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/__init__.py
new file mode 100644
index 00000000..e69de29b
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/__init__.py
new file mode 100644
index 00000000..e69de29b
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/acl.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/acl.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/acl.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/backend_support.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/backend_support.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/backend_support.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/backend_support.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/coll_table_stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/coll_table_stats.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/coll_table_stats.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/coll_table_stats.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/create.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/create.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/create.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/delete.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/delete.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/delete.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/depend.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/depend.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/depend.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/depend.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/enable_disable_trigger.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/enable_disable_trigger.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/enable_disable_trigger.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/enable_disable_trigger.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/get_columns_for_table.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/get_columns_for_table.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/get_columns_for_table.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/get_columns_for_table.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/get_inherits.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/get_inherits.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/get_inherits.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/get_inherits.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/get_oftype.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/get_oftype.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/get_oftype.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/get_oftype.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/get_oid.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/get_oid.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/get_oid.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/get_relations.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/get_relations.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/get_relations.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/get_relations.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/get_schema.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/get_schema.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/get_schema.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/get_schema.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/get_schema_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/get_schema_oid.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/get_schema_oid.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/get_schema_oid.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/get_table.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/get_table.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/get_table.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/get_table.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/get_tables_for_constraints.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/get_tables_for_constraints.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/get_tables_for_constraints.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/get_tables_for_constraints.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/get_types_where_condition.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/get_types_where_condition.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/get_types_where_condition.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/get_types_where_condition.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/nodes.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/nodes.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/nodes.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/properties.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/properties.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/properties.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/reset_stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/reset_stats.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/reset_stats.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/reset_stats.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/sql.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/sql.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/sql.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/sql.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/stats.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/stats.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/stats.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/truncate.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/truncate.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/truncate.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/truncate.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/update.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/update.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/9.1_plus/update.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/default/update.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/tests/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/table/sql/tests/__init__.py
new file mode 100644
index 00000000..e69de29b
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/9.1_plus/alter.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/default/alter.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/9.1_plus/alter.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/default/alter.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/9.1_plus/backend_support.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/default/backend_support.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/9.1_plus/backend_support.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/default/backend_support.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/9.1_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/default/create.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/9.1_plus/create.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/default/create.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/9.1_plus/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/default/delete.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/9.1_plus/delete.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/default/delete.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/9.1_plus/enable_disable_trigger.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/default/enable_disable_trigger.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/9.1_plus/enable_disable_trigger.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/default/enable_disable_trigger.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/9.1_plus/get_columns.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/default/get_columns.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/9.1_plus/get_columns.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/default/get_columns.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/9.1_plus/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/default/get_oid.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/9.1_plus/get_oid.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/default/get_oid.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/9.1_plus/get_parent.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/default/get_parent.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/9.1_plus/get_parent.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/default/get_parent.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/9.1_plus/get_triggerfunctions.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/default/get_triggerfunctions.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/9.1_plus/get_triggerfunctions.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/default/get_triggerfunctions.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/9.1_plus/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/default/nodes.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/9.1_plus/nodes.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/default/nodes.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/9.1_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/default/properties.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/9.1_plus/properties.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/default/properties.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/9.1_plus/update.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/default/update.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/9.1_plus/update.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/tables/templates/trigger/sql/default/update.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/triggers/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/triggers/__init__.py
index baa2f789..fc770112 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/triggers/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/triggers/__init__.py
@@ -73,7 +73,7 @@ class TriggerModule(CollectionNodeModule):
             if 'vid' not in kwargs:
                 return True
 
-            template_path = 'trigger/sql/9.1_plus'
+            template_path = 'trigger/sql/#{0}#'.format(manager.version)
             SQL = render_template("/".join(
                 [template_path, 'backend_support.sql']), vid=kwargs['vid']
             )
@@ -263,7 +263,7 @@ class TriggerView(PGChildNodeView):
                 kwargs['did'] in self.manager.db_info else 0
 
             # we will set template path for sql scripts
-            self.template_path = 'trigger/sql/9.1_plus'
+            self.template_path = 'trigger/sql/#{0}#'.format(self.manager.version)
             # Store server type
             self.server_type = self.manager.server_type
             # We need parent's name eg table name and schema name
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/datatype/sql/9.1_plus/get_types.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/datatype/sql/default/get_types.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/templates/datatype/sql/9.1_plus/get_types.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/templates/datatype/sql/default/get_types.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/pg/9.1_plus/allowed_privs.json b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/pg/default/allowed_privs.json
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/pg/9.1_plus/allowed_privs.json
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/pg/default/allowed_privs.json
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/pg/9.1_plus/sql/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/pg/default/sql/acl.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/pg/9.1_plus/sql/acl.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/pg/default/sql/acl.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/pg/9.1_plus/sql/create.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/pg/default/sql/create.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/pg/9.1_plus/sql/create.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/pg/default/sql/create.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/pg/9.1_plus/sql/defacl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/pg/default/sql/defacl.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/pg/9.1_plus/sql/defacl.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/pg/default/sql/defacl.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/pg/9.1_plus/sql/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/pg/default/sql/delete.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/pg/9.1_plus/sql/delete.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/pg/default/sql/delete.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/pg/9.1_plus/sql/get_name.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/pg/default/sql/get_name.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/pg/9.1_plus/sql/get_name.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/pg/default/sql/get_name.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/pg/9.1_plus/sql/is_catalog.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/pg/default/sql/is_catalog.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/pg/9.1_plus/sql/is_catalog.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/pg/default/sql/is_catalog.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/pg/9.1_plus/sql/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/pg/default/sql/nodes.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/pg/9.1_plus/sql/nodes.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/pg/default/sql/nodes.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/pg/9.1_plus/sql/oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/pg/default/sql/oid.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/pg/9.1_plus/sql/oid.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/pg/default/sql/oid.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/pg/9.1_plus/sql/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/pg/default/sql/properties.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/pg/9.1_plus/sql/properties.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/pg/default/sql/properties.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/pg/9.1_plus/sql/update.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/pg/default/sql/update.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/pg/9.1_plus/sql/update.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/templates/schema/pg/default/sql/update.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/__init__.py
index c14c3e86..0bc82532 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/__init__.py
@@ -232,7 +232,7 @@ class TypeView(PGChildNodeView, DataTypeReader):
             self.acl = ['U']
 
             # we will set template path for sql scripts
-            self.template_path = 'type/sql/9.1_plus'
+            self.template_path = 'type/sql/#{0}#'.format(self.manager.version)
 
             return f(*args, **kwargs)
         return wrap
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/9.1_plus/acl.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/default/acl.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/9.1_plus/acl.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/default/acl.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/9.1_plus/additional_properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/default/additional_properties.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/9.1_plus/additional_properties.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/default/additional_properties.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/9.1_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/default/create.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/9.1_plus/create.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/default/create.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/9.1_plus/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/default/delete.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/9.1_plus/delete.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/default/delete.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/9.1_plus/get_collations.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/default/get_collations.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/9.1_plus/get_collations.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/default/get_collations.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/9.1_plus/get_external_functions.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/default/get_external_functions.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/9.1_plus/get_external_functions.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/default/get_external_functions.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/9.1_plus/get_oid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/default/get_oid.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/9.1_plus/get_oid.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/default/get_oid.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/9.1_plus/get_scid.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/default/get_scid.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/9.1_plus/get_scid.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/default/get_scid.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/9.1_plus/get_subtypes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/default/get_subtypes.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/9.1_plus/get_subtypes.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/default/get_subtypes.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/9.1_plus/get_types.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/default/get_types.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/9.1_plus/get_types.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/default/get_types.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/9.1_plus/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/default/nodes.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/9.1_plus/nodes.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/default/nodes.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/9.1_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/default/properties.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/9.1_plus/properties.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/default/properties.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/9.1_plus/update.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/default/update.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/9.1_plus/update.sql
rename to web/pgadmin/browser/server_groups/servers/databases/schemas/types/templates/type/sql/default/update.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/__init__.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/__init__.py
index c60269cf..ff43312f 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/__init__.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/__init__.py
@@ -305,24 +305,14 @@ class ViewNode(PGChildNodeView, VacuumSettings):
         """
         Returns the template path for PPAS servers.
         """
-        return 'ppas/{0}'.format(
-            '9.4_plus' if ver >= 90400 else
-            '9.3_plus' if ver >= 90300 else
-            '9.2_plus' if ver >= 90200 else
-            '9.1_plus'
-        )
+        return 'ppas/#{0}#'.format(ver)
 
     @staticmethod
     def pg_template_path(ver):
         """
         Returns the template path for PostgreSQL servers.
         """
-        return 'pg/{0}'.format(
-            '9.4_plus' if ver >= 90400 else
-            '9.3_plus' if ver >= 90300 else
-            '9.2_plus' if ver >= 90200 else
-            '9.1_plus'
-        )
+        return 'pg/#{0}#'.format(ver)
 
     @check_precondition
     def list(self, gid, sid, did, scid):
@@ -760,7 +750,7 @@ class ViewNode(PGChildNodeView, VacuumSettings):
 
         self.index_temp_path = 'index'
         SQL = render_template("/".join([self.index_temp_path,
-                                        'sql/9.1_plus/column_details.sql']), idx=idx)
+                                        'sql/#{0}#/column_details.sql'.format(self.manager.version)]), idx=idx)
         status, rset = self.conn.execute_2darray(SQL)
         if not status:
             return internal_server_error(errormsg=rset)
@@ -874,7 +864,7 @@ class ViewNode(PGChildNodeView, VacuumSettings):
 
         SQL_data = ''
         SQL = render_template("/".join(
-            [self.trigger_temp_path, 'sql/9.1_plus/properties.sql']),
+            [self.trigger_temp_path, 'sql/#{0}#/properties.sql'.format(self.manager.version)]),
             tid=vid)
 
         status, data = self.conn.execute_dict(SQL)
@@ -883,7 +873,7 @@ class ViewNode(PGChildNodeView, VacuumSettings):
 
         for trigger in data['rows']:
             SQL = render_template("/".join(
-                [self.trigger_temp_path, 'sql/9.1_plus/properties.sql']),
+                [self.trigger_temp_path, 'sql/#{0}#/properties.sql'.format(self.manager.version)]),
                 tid=trigger['oid'],
                 tgrelid=vid
             )
@@ -904,7 +894,7 @@ class ViewNode(PGChildNodeView, VacuumSettings):
             res_rows = trigger_definition(res_rows)
 
             SQL = render_template("/".join(
-                [self.trigger_temp_path, 'sql/9.1_plus/create.sql']),
+                [self.trigger_temp_path, 'sql/#{0}#/create.sql'.format(self.manager.version)]),
                 data=res_rows, display_comments=True)
             SQL_data += '\n'
             SQL_data += SQL
@@ -920,16 +910,16 @@ class ViewNode(PGChildNodeView, VacuumSettings):
 
         self.index_temp_path = 'index'
         SQL_data = ''
-        SQL = render_template("/".join(
-            [self.index_temp_path, 'sql/9.1_plus/properties.sql']), tid=vid)
         status, data = self.conn.execute_dict(SQL)
         if not status:
+            SQL = render_template("/".join(
+                [self.index_temp_path, 'sql/#{0}#/properties.sql'.format(self.manager.version)]), tid=vid)
             return internal_server_error(errormsg=data)
 
         for index in data['rows']:
             res = []
             SQL = render_template("/".join(
-                [self.index_temp_path, 'sql/9.1_plus/properties.sql']),
+                [self.index_temp_path, 'sql/#{0}#/properties.sql'.format(self.manager.version)]),
                 idx=index['oid'],
                 tid=vid
             )
@@ -944,7 +934,7 @@ class ViewNode(PGChildNodeView, VacuumSettings):
             data = self.get_index_column_details(index['oid'], data)
 
             SQL = render_template("/".join(
-                [self.index_temp_path, 'sql/9.1_plus/create.sql']),
+                [self.index_temp_path, 'sql/#{0}#/create.sql'.format(self.manager.version)]),
                 data=data, display_comments=True)
             SQL_data += '\n'
             SQL_data += SQL
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/default/acl.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/acl.sql
rename to web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/acl.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/allowed_privs.json b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/allowed_privs.json
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/allowed_privs.json
rename to web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/allowed_privs.json
diff --git a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/alter_offline.sql b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/alter_offline.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/alter_offline.sql
rename to web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/alter_offline.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/alter_online.sql b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/alter_online.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/alter_online.sql
rename to web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/alter_online.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/create.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/create.sql
rename to web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/create.sql
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/default/defacl.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/defacl.sql
rename to web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/defacl.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/delete.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/delete.sql
rename to web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/delete.sql
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/default/get_ctypes.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/get_ctypes.sql
rename to web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/get_ctypes.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/get_encodings.sql b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/get_encodings.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/get_encodings.sql
rename to web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/get_encodings.sql
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/default/get_variables.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/get_variables.sql
rename to web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/get_variables.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/grant.sql b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/grant.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/grant.sql
rename to web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/grant.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/nodes.sql b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/nodes.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/nodes.sql
rename to web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/nodes.sql
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/default/properties.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/properties.sql
rename to web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/properties.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/stats.sql b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/stats.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/stats.sql
rename to web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/stats.sql
diff --git a/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/variables.sql b/web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/variables.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/9.1_plus/variables.sql
rename to web/pgadmin/browser/server_groups/servers/databases/templates/databases/sql/default/variables.sql
diff --git a/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/9.1_plus/acl.sql b/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/acl.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/9.1_plus/acl.sql
rename to web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/acl.sql
diff --git a/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/9.1_plus/alter.sql b/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/alter.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/9.1_plus/alter.sql
rename to web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/alter.sql
diff --git a/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/9.1_plus/create.sql b/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/create.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/9.1_plus/create.sql
rename to web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/create.sql
diff --git a/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/9.1_plus/delete.sql b/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/delete.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/9.1_plus/delete.sql
rename to web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/delete.sql
diff --git a/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/9.1_plus/dependents.sql b/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/dependents.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/9.1_plus/dependents.sql
rename to web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/dependents.sql
diff --git a/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/9.1_plus/move_objects.sql b/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/move_objects.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/9.1_plus/move_objects.sql
rename to web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/move_objects.sql
diff --git a/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/9.1_plus/nodes.sql b/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/nodes.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/9.1_plus/nodes.sql
rename to web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/nodes.sql
diff --git a/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/9.1_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/properties.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/9.1_plus/properties.sql
rename to web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/properties.sql
diff --git a/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/9.1_plus/stats.sql b/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/stats.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/9.1_plus/stats.sql
rename to web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/stats.sql
diff --git a/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/9.1_plus/update.sql b/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/update.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/9.1_plus/update.sql
rename to web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/update.sql
diff --git a/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/9.1_plus/variables.sql b/web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/variables.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/9.1_plus/variables.sql
rename to web/pgadmin/browser/server_groups/servers/tablespaces/templates/tablespaces/sql/default/variables.sql
diff --git a/web/pgadmin/browser/server_groups/servers/templates/connect/sql/8.3_plus/check_recovery.sql b/web/pgadmin/browser/server_groups/servers/templates/connect/sql/default/check_recovery.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/templates/connect/sql/8.3_plus/check_recovery.sql
rename to web/pgadmin/browser/server_groups/servers/templates/connect/sql/default/check_recovery.sql
diff --git a/web/pgadmin/browser/server_groups/servers/templates/connect/sql/tests/test_check_recovery.py b/web/pgadmin/browser/server_groups/servers/templates/connect/sql/tests/test_check_recovery.py
index 713a3129..47c7b487 100644
--- a/web/pgadmin/browser/server_groups/servers/templates/connect/sql/tests/test_check_recovery.py
+++ b/web/pgadmin/browser/server_groups/servers/templates/connect/sql/tests/test_check_recovery.py
@@ -6,7 +6,7 @@ from regression import test_utils
 
 class TestCheckRecovery(BaseTestGenerator):
 
-    versions_to_test = ["8.3_plus", "9.0_plus"]
+    versions_to_test = ["default", "9.0_plus"]
 
     def runTest(self):
 
diff --git a/web/pgadmin/browser/server_groups/servers/templates/depends/sql/9.1_plus/dependents.sql b/web/pgadmin/browser/server_groups/servers/templates/depends/sql/default/dependents.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/templates/depends/sql/9.1_plus/dependents.sql
rename to web/pgadmin/browser/server_groups/servers/templates/depends/sql/default/dependents.sql
diff --git a/web/pgadmin/browser/server_groups/servers/templates/servers/sql/9.1_plus/change_password.sql b/web/pgadmin/browser/server_groups/servers/templates/servers/sql/default/change_password.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/templates/servers/sql/9.1_plus/change_password.sql
rename to web/pgadmin/browser/server_groups/servers/templates/servers/sql/default/change_password.sql
diff --git a/web/pgadmin/browser/server_groups/servers/templates/servers/sql/9.1_plus/stats.sql b/web/pgadmin/browser/server_groups/servers/templates/servers/sql/default/stats.sql
similarity index 100%
rename from web/pgadmin/browser/server_groups/servers/templates/servers/sql/9.1_plus/stats.sql
rename to web/pgadmin/browser/server_groups/servers/templates/servers/sql/default/stats.sql
diff --git a/web/pgadmin/dashboard/templates/dashboard/sql/9.1_plus/activity.sql b/web/pgadmin/dashboard/templates/dashboard/sql/default/activity.sql
similarity index 100%
rename from web/pgadmin/dashboard/templates/dashboard/sql/9.1_plus/activity.sql
rename to web/pgadmin/dashboard/templates/dashboard/sql/default/activity.sql
diff --git a/web/pgadmin/dashboard/templates/dashboard/sql/9.1_plus/bio_stats.sql b/web/pgadmin/dashboard/templates/dashboard/sql/default/bio_stats.sql
similarity index 100%
rename from web/pgadmin/dashboard/templates/dashboard/sql/9.1_plus/bio_stats.sql
rename to web/pgadmin/dashboard/templates/dashboard/sql/default/bio_stats.sql
diff --git a/web/pgadmin/dashboard/templates/dashboard/sql/9.1_plus/config.sql b/web/pgadmin/dashboard/templates/dashboard/sql/default/config.sql
similarity index 100%
rename from web/pgadmin/dashboard/templates/dashboard/sql/9.1_plus/config.sql
rename to web/pgadmin/dashboard/templates/dashboard/sql/default/config.sql
diff --git a/web/pgadmin/dashboard/templates/dashboard/sql/9.1_plus/locks.sql b/web/pgadmin/dashboard/templates/dashboard/sql/default/locks.sql
similarity index 100%
rename from web/pgadmin/dashboard/templates/dashboard/sql/9.1_plus/locks.sql
rename to web/pgadmin/dashboard/templates/dashboard/sql/default/locks.sql
diff --git a/web/pgadmin/dashboard/templates/dashboard/sql/9.1_plus/prepared.sql b/web/pgadmin/dashboard/templates/dashboard/sql/default/prepared.sql
similarity index 100%
rename from web/pgadmin/dashboard/templates/dashboard/sql/9.1_plus/prepared.sql
rename to web/pgadmin/dashboard/templates/dashboard/sql/default/prepared.sql
diff --git a/web/pgadmin/dashboard/templates/dashboard/sql/9.1_plus/session_stats.sql b/web/pgadmin/dashboard/templates/dashboard/sql/default/session_stats.sql
similarity index 100%
rename from web/pgadmin/dashboard/templates/dashboard/sql/9.1_plus/session_stats.sql
rename to web/pgadmin/dashboard/templates/dashboard/sql/default/session_stats.sql
diff --git a/web/pgadmin/dashboard/templates/dashboard/sql/9.1_plus/ti_stats.sql b/web/pgadmin/dashboard/templates/dashboard/sql/default/ti_stats.sql
similarity index 100%
rename from web/pgadmin/dashboard/templates/dashboard/sql/9.1_plus/ti_stats.sql
rename to web/pgadmin/dashboard/templates/dashboard/sql/default/ti_stats.sql
diff --git a/web/pgadmin/dashboard/templates/dashboard/sql/9.1_plus/to_stats.sql b/web/pgadmin/dashboard/templates/dashboard/sql/default/to_stats.sql
similarity index 100%
rename from web/pgadmin/dashboard/templates/dashboard/sql/9.1_plus/to_stats.sql
rename to web/pgadmin/dashboard/templates/dashboard/sql/default/to_stats.sql
diff --git a/web/pgadmin/dashboard/templates/dashboard/sql/9.1_plus/tps_stats.sql b/web/pgadmin/dashboard/templates/dashboard/sql/default/tps_stats.sql
similarity index 100%
rename from web/pgadmin/dashboard/templates/dashboard/sql/9.1_plus/tps_stats.sql
rename to web/pgadmin/dashboard/templates/dashboard/sql/default/tps_stats.sql
diff --git a/web/pgadmin/misc/templates/sqlautocomplete/sql/9.1_plus/columns.sql b/web/pgadmin/misc/templates/sqlautocomplete/sql/default/columns.sql
similarity index 100%
rename from web/pgadmin/misc/templates/sqlautocomplete/sql/9.1_plus/columns.sql
rename to web/pgadmin/misc/templates/sqlautocomplete/sql/default/columns.sql
diff --git a/web/pgadmin/misc/templates/sqlautocomplete/sql/9.1_plus/databases.sql b/web/pgadmin/misc/templates/sqlautocomplete/sql/default/databases.sql
similarity index 100%
rename from web/pgadmin/misc/templates/sqlautocomplete/sql/9.1_plus/databases.sql
rename to web/pgadmin/misc/templates/sqlautocomplete/sql/default/databases.sql
diff --git a/web/pgadmin/misc/templates/sqlautocomplete/sql/9.1_plus/datatypes.sql b/web/pgadmin/misc/templates/sqlautocomplete/sql/default/datatypes.sql
similarity index 100%
rename from web/pgadmin/misc/templates/sqlautocomplete/sql/9.1_plus/datatypes.sql
rename to web/pgadmin/misc/templates/sqlautocomplete/sql/default/datatypes.sql
diff --git a/web/pgadmin/misc/templates/sqlautocomplete/sql/9.1_plus/functions.sql b/web/pgadmin/misc/templates/sqlautocomplete/sql/default/functions.sql
similarity index 100%
rename from web/pgadmin/misc/templates/sqlautocomplete/sql/9.1_plus/functions.sql
rename to web/pgadmin/misc/templates/sqlautocomplete/sql/default/functions.sql
diff --git a/web/pgadmin/misc/templates/sqlautocomplete/sql/9.1_plus/keywords.sql b/web/pgadmin/misc/templates/sqlautocomplete/sql/default/keywords.sql
similarity index 100%
rename from web/pgadmin/misc/templates/sqlautocomplete/sql/9.1_plus/keywords.sql
rename to web/pgadmin/misc/templates/sqlautocomplete/sql/default/keywords.sql
diff --git a/web/pgadmin/misc/templates/sqlautocomplete/sql/9.1_plus/schema.sql b/web/pgadmin/misc/templates/sqlautocomplete/sql/default/schema.sql
similarity index 100%
rename from web/pgadmin/misc/templates/sqlautocomplete/sql/9.1_plus/schema.sql
rename to web/pgadmin/misc/templates/sqlautocomplete/sql/default/schema.sql
diff --git a/web/pgadmin/misc/templates/sqlautocomplete/sql/9.1_plus/tableview.sql b/web/pgadmin/misc/templates/sqlautocomplete/sql/default/tableview.sql
similarity index 100%
rename from web/pgadmin/misc/templates/sqlautocomplete/sql/9.1_plus/tableview.sql
rename to web/pgadmin/misc/templates/sqlautocomplete/sql/default/tableview.sql
diff --git a/web/pgadmin/tools/grant_wizard/__init__.py b/web/pgadmin/tools/grant_wizard/__init__.py
index 21c9927d..566e7744 100644
--- a/web/pgadmin/tools/grant_wizard/__init__.py
+++ b/web/pgadmin/tools/grant_wizard/__init__.py
@@ -111,10 +111,8 @@ def check_precondition(f):
         # Here args[0] will hold self & kwargs will hold gid,sid,did
 
         server_info.clear()
-        server_info['manager'] = get_driver(
-            PG_DEFAULT_DRIVER).connection_manager(
-            kwargs['sid']
-        )
+        server_info['manager'] = get_driver(PG_DEFAULT_DRIVER)\
+            .connection_manager(kwargs['sid'])
         server_info['conn'] = server_info['manager'].connection(
             did=kwargs['did']
         )
@@ -128,9 +126,9 @@ def check_precondition(f):
         server_info['server_type'] = server_info['manager'].server_type
         server_info['version'] = server_info['manager'].version
         if server_info['server_type'] == 'pg':
-            server_info['template_path'] = 'grant_wizard/pg/9.1_plus'
+            server_info['template_path'] = 'grant_wizard/pg/#{0}#'.format(server_info['version'])
         elif server_info['server_type'] == 'ppas':
-            server_info['template_path'] = 'grant_wizard/ppas/9.1_plus'
+            server_info['template_path'] = 'grant_wizard/ppas/#{0}#'.format(server_info['version'])
 
         return f(*args, **kwargs)
 
diff --git a/web/pgadmin/tools/sqleditor/templates/sqleditor/sql/9.1_plus/delete.sql b/web/pgadmin/tools/sqleditor/templates/sqleditor/sql/default/delete.sql
similarity index 100%
rename from web/pgadmin/tools/sqleditor/templates/sqleditor/sql/9.1_plus/delete.sql
rename to web/pgadmin/tools/sqleditor/templates/sqleditor/sql/default/delete.sql
diff --git a/web/pgadmin/tools/sqleditor/templates/sqleditor/sql/9.1_plus/insert.sql b/web/pgadmin/tools/sqleditor/templates/sqleditor/sql/default/insert.sql
similarity index 100%
rename from web/pgadmin/tools/sqleditor/templates/sqleditor/sql/9.1_plus/insert.sql
rename to web/pgadmin/tools/sqleditor/templates/sqleditor/sql/default/insert.sql
diff --git a/web/pgadmin/tools/sqleditor/templates/sqleditor/sql/9.1_plus/objectname.sql b/web/pgadmin/tools/sqleditor/templates/sqleditor/sql/default/objectname.sql
similarity index 100%
rename from web/pgadmin/tools/sqleditor/templates/sqleditor/sql/9.1_plus/objectname.sql
rename to web/pgadmin/tools/sqleditor/templates/sqleditor/sql/default/objectname.sql
diff --git a/web/pgadmin/tools/sqleditor/templates/sqleditor/sql/9.1_plus/objectquery.sql b/web/pgadmin/tools/sqleditor/templates/sqleditor/sql/default/objectquery.sql
similarity index 100%
rename from web/pgadmin/tools/sqleditor/templates/sqleditor/sql/9.1_plus/objectquery.sql
rename to web/pgadmin/tools/sqleditor/templates/sqleditor/sql/default/objectquery.sql
diff --git a/web/pgadmin/tools/sqleditor/templates/sqleditor/sql/9.1_plus/primary_keys.sql b/web/pgadmin/tools/sqleditor/templates/sqleditor/sql/default/primary_keys.sql
similarity index 100%
rename from web/pgadmin/tools/sqleditor/templates/sqleditor/sql/9.1_plus/primary_keys.sql
rename to web/pgadmin/tools/sqleditor/templates/sqleditor/sql/default/primary_keys.sql
diff --git a/web/pgadmin/tools/sqleditor/templates/sqleditor/sql/9.1_plus/update.sql b/web/pgadmin/tools/sqleditor/templates/sqleditor/sql/default/update.sql
similarity index 100%
rename from web/pgadmin/tools/sqleditor/templates/sqleditor/sql/9.1_plus/update.sql
rename to web/pgadmin/tools/sqleditor/templates/sqleditor/sql/default/update.sql
diff --git a/web/pgadmin/tools/sqleditor/templates/sqleditor/sql/9.1_plus/validate.sql b/web/pgadmin/tools/sqleditor/templates/sqleditor/sql/default/validate.sql
similarity index 100%
rename from web/pgadmin/tools/sqleditor/templates/sqleditor/sql/9.1_plus/validate.sql
rename to web/pgadmin/tools/sqleditor/templates/sqleditor/sql/default/validate.sql
diff --git a/web/pgadmin/utils/tests/templates/some_feature/sql/9.1_plus/some_action_with_default.sql b/web/pgadmin/utils/tests/templates/some_feature/sql/9.1_plus/some_action_with_default.sql
new file mode 100644
index 00000000..0775bc9c
--- /dev/null
+++ b/web/pgadmin/utils/tests/templates/some_feature/sql/9.1_plus/some_action_with_default.sql
@@ -0,0 +1 @@
+Some other feature 9.1 SQL
diff --git a/web/pgadmin/utils/tests/templates/some_feature/sql/9.2_plus/some_action_with_default.sql b/web/pgadmin/utils/tests/templates/some_feature/sql/9.2_plus/some_action_with_default.sql
new file mode 100644
index 00000000..33a5d4fc
--- /dev/null
+++ b/web/pgadmin/utils/tests/templates/some_feature/sql/9.2_plus/some_action_with_default.sql
@@ -0,0 +1 @@
+Some other feature 9.2 SQL
diff --git a/web/pgadmin/utils/tests/templates/some_feature/sql/default/some_action_with_default.sql b/web/pgadmin/utils/tests/templates/some_feature/sql/default/some_action_with_default.sql
new file mode 100644
index 00000000..c45d9c91
--- /dev/null
+++ b/web/pgadmin/utils/tests/templates/some_feature/sql/default/some_action_with_default.sql
@@ -0,0 +1 @@
+Some default SQL
\ No newline at end of file
diff --git a/web/pgadmin/utils/tests/test_versioned_template_loader.py b/web/pgadmin/utils/tests/test_versioned_template_loader.py
index b2f5c4c0..5431fd7d 100644
--- a/web/pgadmin/utils/tests/test_versioned_template_loader.py
+++ b/web/pgadmin/utils/tests/test_versioned_template_loader.py
@@ -42,6 +42,13 @@ class TestVersionedTemplateLoader(BaseTestGenerator):
         self.assertEqual("Some 9.2 SQL", content)
         self.assertIn("some_feature/sql/9.2_plus/some_action.sql", filename)
 
+    def test_get_source_when_the_version_is_9_0_and_there_are_templates_for_9_1_and_9_2_returns_default_template(self):
+
+        content, filename, up_to_dateness = self.loader.get_source(None, "some_feature/sql/#90000#/some_action_with_default.sql")
+
+        self.assertEqual("Some default SQL", content)
+        self.assertIn("some_feature/sql/default/some_action_with_default.sql", filename)
+
     def test_raise_not_found_exception_when_postgres_version_less_than_all_available_sql_templates(self):
 
         try:
diff --git a/web/pgadmin/utils/versioned_template_loader.py b/web/pgadmin/utils/versioned_template_loader.py
index 88922f37..cf41bab5 100644
--- a/web/pgadmin/utils/versioned_template_loader.py
+++ b/web/pgadmin/utils/versioned_template_loader.py
@@ -14,7 +14,7 @@ class VersionedTemplateLoader(DispatchingJinjaLoader):
             {'name': "9.2_plus", 'number': 90200},
             {'name': "9.1_plus", 'number': 90100},
             {'name': "9.0_plus", 'number': 90000},
-            {'name': "8.3_plus", 'number': 80300}
+            {'name': "default", 'number': 0}
         )
 
         if len(template_path_parts) == 1:

-- 
Sent via pgadmin-hackers mailing list ([email-masked])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers

---

From: Dave Page <[email-masked]>
Date: Wed, 1 Feb 2017 09:59:41 +0000

Thanks George, patch applied.

Fahar; whilst this is a technically simple patch, it was also very
large. Please keep an eye out for any issues.

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

---

From: Fahar Abbas <[email-masked]>
Date: Wed, 1 Feb 2017 15:06:19 +0500

I was also thinking with same pattern and we need to verify this change
thoroughly.

Thanks Dave.

Regards,

-- 
Syed Fahar Abbas
Quality Management Group

EnterpriseDB Corporation
Phone Office: +92-51-835-8874
Phone Direct: +92-51-8466803
Mobile: +92-333-5409707
Skype ID: syed.fahar.abbas
Website: www.enterprisedb.com