public inbox for [email protected]  
help / color / mirror / Atom feed
From: Murtuza Zabuawala <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: [pgAdmin4[RM#3935] Grant wizard fails to list down functions
Date: Mon, 28 Jan 2019 12:01:12 +0530
Message-ID: <CAKKotZTf=gmr3F6QvgbFfi1DEFZCAtB17Ai9UZD4fBHJqyLCaA@mail.gmail.com> (raw)

Hi,

PFA patch to fix the issue where EPAS DB instance running with
*no-redwood-compat* mode fails to list down functions objects in grant
wizard due to 'char' -> 'int' type cast error.


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


Attachments:

  [application/octet-stream] RM_3935.diff (1.5K, 3-RM_3935.diff)
  download | inline diff:
diff --git a/web/pgadmin/tools/grant_wizard/templates/grant_wizard/ppas/11_plus/sql/function.sql b/web/pgadmin/tools/grant_wizard/templates/grant_wizard/ppas/11_plus/sql/function.sql
index 1115b72e..577f8c98 100644
--- a/web/pgadmin/tools/grant_wizard/templates/grant_wizard/ppas/11_plus/sql/function.sql
+++ b/web/pgadmin/tools/grant_wizard/templates/grant_wizard/ppas/11_plus/sql/function.sql
@@ -21,7 +21,7 @@ WHERE
     pronamespace = {{ node_id }}::oid
     AND typname {{ 'NOT' if type != 'trigger_function' else '' }} IN ('trigger', 'event_trigger')
     AND pr.prokind = '{{ kind }}'
-    AND pr.protype = {{ 0 if type != 'procedure' else 1 }}
+    AND pr.protype = {{'0' if type != 'procedure' else '1'}}::char
 ORDER BY
     proname
 {% endif %}
diff --git a/web/pgadmin/tools/grant_wizard/templates/grant_wizard/ppas/9.1_plus/sql/function.sql b/web/pgadmin/tools/grant_wizard/templates/grant_wizard/ppas/9.1_plus/sql/function.sql
index 822134da..1fede48e 100644
--- a/web/pgadmin/tools/grant_wizard/templates/grant_wizard/ppas/9.1_plus/sql/function.sql
+++ b/web/pgadmin/tools/grant_wizard/templates/grant_wizard/ppas/9.1_plus/sql/function.sql
@@ -19,7 +19,7 @@ LEFT OUTER JOIN pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_pr
 WHERE
     proisagg = FALSE AND pronamespace = {{ node_id }}::oid
     AND typname {{ 'NOT' if type != 'trigger_function' else '' }} IN ('trigger', 'event_trigger')
-    AND pr.protype = {{ 0 if type != 'procedure' else 1 }}
+    AND pr.protype = {{'0' if type != 'procedure' else '1'}}::char
 ORDER BY
     proname
 {% endif %}


view thread (6+ 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[RM#3935] Grant wizard fails to list down functions
  In-Reply-To: <CAKKotZTf=gmr3F6QvgbFfi1DEFZCAtB17Ai9UZD4fBHJqyLCaA@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