Subject: [pgAdmin][Patch]: Fixed RM 1467

From: Khushboo Vashi <[email-masked]>
Date: Thu, 4 Aug 2016 16:51:09 +0530

Hi,

Please find the attached patch for the fix of RM 1467:  Unable to drop
trigger function, function and procedures.

The issue was produced because of execute_2darray function change.

Thanks,
Khushboo
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 810bb49..ca69cac 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
@@ -799,13 +799,11 @@ class FunctionView(PGChildNodeView, DataTypeReader):
                     )
                 )
 
-            name, func_args, nspname = res['rows'][0]
-
             SQL = render_template("/".join([self.sql_template_path,
                                             'delete.sql']),
-                                  name=name,
-                                  func_args=func_args,
-                                  nspname=nspname,
+                                  name=res['rows'][0]['name'],
+                                  func_args=res['rows'][0]['func_args'],
+                                  nspname=res['rows'][0]['nspname'],
                                   cascade=cascade)
             status, res = self.conn.execute_scalar(SQL)
             if not status:
@@ -1327,7 +1325,8 @@ It may have been removed by another user or moved to another schema.
         if not status:
             return internal_server_error(errormsg=res)
 
-        func_def, name = res['rows'][0]
+        func_def = res['rows'][0]['func_def']
+        name = res['rows'][0]['name']
 
         # Fetch only arguments
         argString = name[name.rfind('('):].strip('(').strip(')')

-- 
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: Thu, 4 Aug 2016 15:36:10 +0100

Thanks, applied.

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

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