public inbox for [email protected]  
help / color / mirror / Atom feed
[pgAdmin4][PATCH] To fix the issue in procedure debugging in EPAS
2+ messages / 2 participants
[nested] [flat]

* [pgAdmin4][PATCH] To fix the issue in procedure debugging in EPAS
@ 2017-06-05 07:13 Murtuza Zabuawala <[email protected]>
  2017-06-06 11:59 ` Re: [pgAdmin4][PATCH] To fix the issue in procedure debugging in EPAS Dave Page <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: Murtuza Zabuawala @ 2017-06-05 07:13 UTC (permalink / raw)
  To: pgadmin-hackers; +Cc: Neel Patel <[email protected]>

Hi,

PFA patch to fix the issue where debugger module is not throwing proper
error for unsupported argument mode type in procedure.
RM#1466

@Neel,
Can you please do quick review of this patch?

--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

diff --git a/web/pgadmin/tools/debugger/__init__.py b/web/pgadmin/tools/debugger/__init__.py
index 2c0dbc4..79e5eae 100644
--- a/web/pgadmin/tools/debugger/__init__.py
+++ b/web/pgadmin/tools/debugger/__init__.py
@@ -197,6 +197,15 @@ def init_function(node_type, sid, did, scid, fid, trid=None):
         elif ppas_server and r_set['rows'][0]['prosrc'].lstrip().startswith('$__EDBwrapped__$'):
             ret_status = False
             msg = gettext("EDB Advanced Server wrapped functions cannot be debugged.")
+        # We cannot debug if PPAS and argument mode is VARIADIC
+        elif ppas_server and r_set['rows'][0]['lanname'] == 'edbspl' and \
+                r_set['rows'][0]['proargmodes'] is not None and \
+                'v' in r_set['rows'][0]['proargmodes']:
+            ret_status = False
+            msg = gettext(
+                "An 'edbspl' target with a variadic argument is not supported"
+                " and cannot be debugged."
+            )
         else:
             # If user is super user then we should check debugger library is loaded or not
             if user['is_superuser']:


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


Attachments:

  [text/plain] RM_1466.diff (1.1K, 3-RM_1466.diff)
  download | inline diff:
diff --git a/web/pgadmin/tools/debugger/__init__.py b/web/pgadmin/tools/debugger/__init__.py
index 2c0dbc4..79e5eae 100644
--- a/web/pgadmin/tools/debugger/__init__.py
+++ b/web/pgadmin/tools/debugger/__init__.py
@@ -197,6 +197,15 @@ def init_function(node_type, sid, did, scid, fid, trid=None):
         elif ppas_server and r_set['rows'][0]['prosrc'].lstrip().startswith('$__EDBwrapped__$'):
             ret_status = False
             msg = gettext("EDB Advanced Server wrapped functions cannot be debugged.")
+        # We cannot debug if PPAS and argument mode is VARIADIC
+        elif ppas_server and r_set['rows'][0]['lanname'] == 'edbspl' and \
+                r_set['rows'][0]['proargmodes'] is not None and \
+                'v' in r_set['rows'][0]['proargmodes']:
+            ret_status = False
+            msg = gettext(
+                "An 'edbspl' target with a variadic argument is not supported"
+                " and cannot be debugged."
+            )
         else:
             # If user is super user then we should check debugger library is loaded or not
             if user['is_superuser']:


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: [pgAdmin4][PATCH] To fix the issue in procedure debugging in EPAS
  2017-06-05 07:13 [pgAdmin4][PATCH] To fix the issue in procedure debugging in EPAS Murtuza Zabuawala <[email protected]>
@ 2017-06-06 11:59 ` Dave Page <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Dave Page @ 2017-06-06 11:59 UTC (permalink / raw)
  To: Murtuza Zabuawala <[email protected]>; +Cc: pgadmin-hackers; Neel Patel <[email protected]>

Thanks, patch applied.

On Mon, Jun 5, 2017 at 8:13 AM, Murtuza Zabuawala
<[email protected]> wrote:
> Hi,
>
> PFA patch to fix the issue where debugger module is not throwing proper
> error for unsupported argument mode type in procedure.
> RM#1466
>
> @Neel,
> Can you please do quick review of this patch?
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> --
> Sent via pgadmin-hackers mailing list ([email protected])
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>



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

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


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




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2017-06-06 11:59 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-06-05 07:13 [pgAdmin4][PATCH] To fix the issue in procedure debugging in EPAS Murtuza Zabuawala <[email protected]>
2017-06-06 11:59 ` Dave Page <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox