public inbox for [email protected]  
help / color / mirror / Atom feed
From: Akshay Joshi <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: [pgAdmin4][Patch] - RM 3549 Trigger function with return type event_trigger is not displayed in tree view with EPAS server
Date: Fri, 4 Jan 2019 15:18:44 +0530
Message-ID: <CANxoLDch-JuF8Rm8OSOekY7e=NZ1qK7pgSxE9Ar+XTRLTMBg6g@mail.gmail.com> (raw)

Hi Hackers,

Attached is the patch to fix RM #3549 Trigger function with return type
event_trigger is not displayed in tree view with EPAS server.

Please review it.

-- 
*Akshay Joshi*

*Sr. Software Architect *



*Phone: +91 20-3058-9517Mobile: +91 976-788-8246*


Attachments:

  [application/octet-stream] RM_3549.patch (3.2K, 3-RM_3549.patch)
  download | inline diff:
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/11_plus/coll_stats.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/11_plus/coll_stats.sql
index cd8cecdf..9879f43e 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/11_plus/coll_stats.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/11_plus/coll_stats.sql
@@ -15,6 +15,6 @@ WHERE
             pg_type typ ON typ.oid=p.prorettype
         WHERE
             p.prokind IN ('f', 'w')
-            AND typname = 'trigger'
+            AND typname IN ('trigger', 'event_trigger')
     )
 ORDER BY funcname;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/11_plus/delete.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/11_plus/delete.sql
index a2d698bc..f7f906b3 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/11_plus/delete.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/11_plus/delete.sql
@@ -12,7 +12,7 @@ JOIN
 WHERE
     pr.prokind IN ('f', 'w')
     AND pronamespace = {{scid}}::oid
-    AND typname = 'trigger'
+    AND typname IN ('trigger', 'event_trigger')
     AND pr.oid = {{fnid}};
 {% endif %}
 
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/11_plus/node.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/11_plus/node.sql
index 592ef754..70119f4f 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/11_plus/node.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/11_plus/node.sql
@@ -17,6 +17,6 @@ WHERE
 {% if scid %}
     AND pronamespace = {{scid}}::oid
 {% endif %}
-    AND typname = 'trigger' AND lanname != 'edbspl'
+    AND typname IN ('trigger', 'event_trigger') AND lanname != 'edbspl'
 ORDER BY
     proname;
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/11_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/11_plus/properties.sql
index 7fc529b9..7de1ef21 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/11_plus/properties.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/trigger_function/ppas/sql/11_plus/properties.sql
@@ -22,7 +22,7 @@ LEFT OUTER JOIN
     pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass)
 WHERE
     pr.prokind IN ('f', 'w')
-    AND typname = 'trigger' AND lanname != 'edbspl'
+    AND typname IN ('trigger', 'event_trigger') AND lanname != 'edbspl'
 {% if fnid %}
     AND pr.oid = {{fnid}}::oid
 {% else %}


view thread (2+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: [pgAdmin4][Patch] - RM 3549 Trigger function with return type event_trigger is not displayed in tree view with EPAS server
  In-Reply-To: <CANxoLDch-JuF8Rm8OSOekY7e=NZ1qK7pgSxE9Ar+XTRLTMBg6g@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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