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 99cf94a..5119b80 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
@@ -886,6 +886,20 @@ class FunctionView(PGChildNodeView, DataTypeReader):
             scid: Schema Id
             fnid: Function Id
         """
+        data_prop = self._fetch_properties(gid, sid, did, scid, fnid)
+
+        # Get Schema Name from its OID.
+        if 'pronamespace' in data_prop:
+            data_prop['pronamespace'] = self._get_schema(data_prop[
+                'pronamespace'])
+
+        # Parse privilege data
+        if 'acl' in data_prop:
+            data_prop['acl'] = parse_priv_to_db(data_prop['acl'], ['X'])
+
+        # Fetch the function definition.
+        grant_SQL = render_template("/".join([self.sql_template_path,
+                                    'grant.sql']), data=data_prop)

         if self.node_type == 'procedure':
             object_type = 'procedure'
@@ -902,7 +916,8 @@ class FunctionView(PGChildNodeView, DataTypeReader):
             object_type = 'function'
             # Fetch the function definition.
             SQL = render_template("/".join([self.sql_template_path,
-                                  'get_definition.sql']), fnid=fnid, scid=scid)
+                                  'get_definition.sql']),
+                                  fnid=fnid, scid=scid)
             status, res = self.conn.execute_2darray(SQL)
             if not status:
                 return internal_server_error(errormsg=res)
@@ -915,7 +930,7 @@ class FunctionView(PGChildNodeView, DataTypeReader):

 """.format(object_type.upper(), name)

-        SQL = sql_header + func_def
+        SQL = sql_header + func_def + '\n' + grant_SQL
         SQL = re.sub('\n{2,}', '\n\n', SQL)

         return ajax_response(response=SQL)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.1_plus/grant.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.1_plus/grant.sql
new file mode 100644
index 0000000..8523219
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.1_plus/grant.sql
@@ -0,0 +1,2 @@
+{% import 'macros/functions/privilege.macros' as PRIVILEGE %}
+{% if data.acl %}{% for p in data.acl %}{{ PRIVILEGE.SET(conn, "FUNCTION", p.grantee, data.name, p.without_grant, p.with_grant, data.pronamespace, data.proargs)}}{% endfor %}{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.2_plus/grant.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.2_plus/grant.sql
new file mode 100644
index 0000000..8523219
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.2_plus/grant.sql
@@ -0,0 +1,2 @@
+{% import 'macros/functions/privilege.macros' as PRIVILEGE %}
+{% if data.acl %}{% for p in data.acl %}{{ PRIVILEGE.SET(conn, "FUNCTION", p.grantee, data.name, p.without_grant, p.with_grant, data.pronamespace, data.proargs)}}{% endfor %}{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.5_plus/grant.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.5_plus/grant.sql
new file mode 100644
index 0000000..8523219
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/pg/sql/9.5_plus/grant.sql
@@ -0,0 +1,2 @@
+{% import 'macros/functions/privilege.macros' as PRIVILEGE %}
+{% if data.acl %}{% for p in data.acl %}{{ PRIVILEGE.SET(conn, "FUNCTION", p.grantee, data.name, p.without_grant, p.with_grant, data.pronamespace, data.proargs)}}{% endfor %}{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/9.1_plus/grant.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/9.1_plus/grant.sql
new file mode 100644
index 0000000..8523219
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/9.1_plus/grant.sql
@@ -0,0 +1,2 @@
+{% import 'macros/functions/privilege.macros' as PRIVILEGE %}
+{% if data.acl %}{% for p in data.acl %}{{ PRIVILEGE.SET(conn, "FUNCTION", p.grantee, data.name, p.without_grant, p.with_grant, data.pronamespace, data.proargs)}}{% endfor %}{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/9.2_plus/grant.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/9.2_plus/grant.sql
new file mode 100644
index 0000000..8523219
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/9.2_plus/grant.sql
@@ -0,0 +1,2 @@
+{% import 'macros/functions/privilege.macros' as PRIVILEGE %}
+{% if data.acl %}{% for p in data.acl %}{{ PRIVILEGE.SET(conn, "FUNCTION", p.grantee, data.name, p.without_grant, p.with_grant, data.pronamespace, data.proargs)}}{% endfor %}{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/9.5_plus/grant.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/9.5_plus/grant.sql
new file mode 100644
index 0000000..8523219
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/function/ppas/sql/9.5_plus/grant.sql
@@ -0,0 +1,2 @@
+{% import 'macros/functions/privilege.macros' as PRIVILEGE %}
+{% if data.acl %}{% for p in data.acl %}{{ PRIVILEGE.SET(conn, "FUNCTION", p.grantee, data.name, p.without_grant, p.with_grant, data.pronamespace, data.proargs)}}{% endfor %}{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/9.1_plus/grant.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/9.1_plus/grant.sql
new file mode 100644
index 0000000..eee5257
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/9.1_plus/grant.sql
@@ -0,0 +1,2 @@
+{% import 'macros/functions/privilege.macros' as PRIVILEGE %}
+{% if data.acl %}{% for p in data.acl %}{{ PRIVILEGE.SET(conn, "PROCEDURE", p.grantee, data.name, p.without_grant, p.with_grant, data.pronamespace, data.proargs)}}{% endfor %}{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/9.2_plus/grant.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/9.2_plus/grant.sql
new file mode 100644
index 0000000..eee5257
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/9.2_plus/grant.sql
@@ -0,0 +1,2 @@
+{% import 'macros/functions/privilege.macros' as PRIVILEGE %}
+{% if data.acl %}{% for p in data.acl %}{{ PRIVILEGE.SET(conn, "PROCEDURE", p.grantee, data.name, p.without_grant, p.with_grant, data.pronamespace, data.proargs)}}{% endfor %}{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/9.5_plus/grant.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/9.5_plus/grant.sql
new file mode 100644
index 0000000..eee5257
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedure/ppas/sql/9.5_plus/grant.sql
@@ -0,0 +1,2 @@
+{% import 'macros/functions/privilege.macros' as PRIVILEGE %}
+{% if data.acl %}{% for p in data.acl %}{{ PRIVILEGE.SET(conn, "PROCEDURE", p.grantee, data.name, p.without_grant, p.with_grant, data.pronamespace, data.proargs)}}{% endfor %}{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/9.1_plus/grant.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/9.1_plus/grant.sql
new file mode 100644
index 0000000..8523219
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/9.1_plus/grant.sql
@@ -0,0 +1,2 @@
+{% import 'macros/functions/privilege.macros' as PRIVILEGE %}
+{% if data.acl %}{% for p in data.acl %}{{ PRIVILEGE.SET(conn, "FUNCTION", p.grantee, data.name, p.without_grant, p.with_grant, data.pronamespace, data.proargs)}}{% endfor %}{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/9.2_plus/grant.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/9.2_plus/grant.sql
new file mode 100644
index 0000000..8523219
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/9.2_plus/grant.sql
@@ -0,0 +1,2 @@
+{% import 'macros/functions/privilege.macros' as PRIVILEGE %}
+{% if data.acl %}{% for p in data.acl %}{{ PRIVILEGE.SET(conn, "FUNCTION", p.grantee, data.name, p.without_grant, p.with_grant, data.pronamespace, data.proargs)}}{% endfor %}{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/9.5_plus/grant.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/9.5_plus/grant.sql
new file mode 100644
index 0000000..8523219
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/pg/sql/9.5_plus/grant.sql
@@ -0,0 +1,2 @@
+{% import 'macros/functions/privilege.macros' as PRIVILEGE %}
+{% if data.acl %}{% for p in data.acl %}{{ PRIVILEGE.SET(conn, "FUNCTION", p.grantee, data.name, p.without_grant, p.with_grant, data.pronamespace, data.proargs)}}{% endfor %}{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/9.1_plus/grant.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/9.1_plus/grant.sql
new file mode 100644
index 0000000..8523219
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/9.1_plus/grant.sql
@@ -0,0 +1,2 @@
+{% import 'macros/functions/privilege.macros' as PRIVILEGE %}
+{% if data.acl %}{% for p in data.acl %}{{ PRIVILEGE.SET(conn, "FUNCTION", p.grantee, data.name, p.without_grant, p.with_grant, data.pronamespace, data.proargs)}}{% endfor %}{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/9.2_plus/grant.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/9.2_plus/grant.sql
new file mode 100644
index 0000000..8523219
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/9.2_plus/grant.sql
@@ -0,0 +1,2 @@
+{% import 'macros/functions/privilege.macros' as PRIVILEGE %}
+{% if data.acl %}{% for p in data.acl %}{{ PRIVILEGE.SET(conn, "FUNCTION", p.grantee, data.name, p.without_grant, p.with_grant, data.pronamespace, data.proargs)}}{% endfor %}{% endif %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/9.5_plus/grant.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/9.5_plus/grant.sql
new file mode 100644
index 0000000..8523219
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/9.5_plus/grant.sql
@@ -0,0 +1,2 @@
+{% import 'macros/functions/privilege.macros' as PRIVILEGE %}
+{% if data.acl %}{% for p in data.acl %}{{ PRIVILEGE.SET(conn, "FUNCTION", p.grantee, data.name, p.without_grant, p.with_grant, data.pronamespace, data.proargs)}}{% endfor %}{% endif %}
