public inbox for [email protected]  
help / color / mirror / Atom feed
From: Pradip Parkale <[email protected]>
To: Akshay Joshi <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Subject: Re: [pgAdmin][RM5843] [SQL] - Some 'options' values for function not shown in sql
Date: Wed, 23 Sep 2020 23:30:12 +0530
Message-ID: <CAJ9T6SvJ1z95nGg+_cnVOmjgZ_6PGVXeuEtfyvPp=6nAb9E_tw@mail.gmail.com> (raw)
In-Reply-To: <CANxoLDe4WeNos2AfTgfhXH1fdEdU1gNvCJHsS8OU3wywgmZuUQ@mail.gmail.com>
References: <CAJ9T6Ss_8u-uLrgFxe6xC36a3gLGS2u2mnsG-cjYH1FScrLLvg@mail.gmail.com>
	<CANxoLDef3K1D-y_E4O7W=rgT-4+N9-k-WceHaBncQdL_ERSYeA@mail.gmail.com>
	<CANxoLDe4WeNos2AfTgfhXH1fdEdU1gNvCJHsS8OU3wywgmZuUQ@mail.gmail.com>

Hi Akshay,

Please find the small patch for the ' Parallel Unsafe' option is missing in
SQL. It was missing in first patch for PG96 and PG10.


On Wed, Sep 23, 2020 at 1:25 PM Akshay Joshi <[email protected]>
wrote:

> Thanks, patch applied. It's a small fix so I have fixed it.
>
> On Wed, Sep 23, 2020 at 12:14 PM Akshay Joshi <
> [email protected]> wrote:
>
>> Hi Pradip
>>
>> RESQL tests are failing on EPAS 9.5, 9.6, and 10. Please fix and resend
>> the patch.
>>
>> On Tue, Sep 22, 2020 at 6:41 PM Pradip Parkale <
>> [email protected]> wrote:
>>
>>> Hi Hackers,
>>>
>>> The 'Unsafe' parallel option was not visible in the SQL for function and
>>> procedure. Attached is the patch to fix this issue.
>>>
>>> --
>>> Thanks & Regards,
>>> Pradip Parkale
>>> Software Engineer | EnterpriseDB Corporation
>>>
>>
>>
>> --
>> *Thanks & Regards*
>> *Akshay Joshi*
>> *pgAdmin Hacker | Sr. Software Architect*
>> *EDB Postgres <http://edbpostgres.com>*
>>
>> *Mobile: +91 976-788-8246*
>>
>
>
> --
> *Thanks & Regards*
> *Akshay Joshi*
> *pgAdmin Hacker | Sr. Software Architect*
> *EDB Postgres <http://edbpostgres.com>*
>
> *Mobile: +91 976-788-8246*
>


-- 
Thanks & Regards,
Pradip Parkale
Software Engineer | EnterpriseDB Corporation


Attachments:

  [application/octet-stream] RM5843_v2.patch (3.1K, 3-RM5843_v2.patch)
  download | inline diff:
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/9.6_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/9.6_plus/create.sql
index bdf36cb61..4fadfb054 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/9.6_plus/create.sql
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/9.6_plus/create.sql
@@ -25,8 +25,8 @@ CREATE{% if query_type is defined %}{{' OR REPLACE'}}{% endif %} FUNCTION {{ con
 {% if data.proisstrict %}STRICT {% endif %}
 {% if data.prosecdef %}SECURITY DEFINER {% endif %}
 {% if data.proiswindow %}WINDOW {% endif %}
-{% if data.proparallel and (data.proparallel == 'r' or data.proparallel == 's') %}
-{% if data.proparallel == 'r' %}PARALLEL RESTRICTED{% elif data.proparallel == 's' %}PARALLEL SAFE{% endif %}{% endif -%}
+{% if data.proparallel and (data.proparallel == 'r' or data.proparallel == 's' or data.proparallel == 'u') %}
+{% if data.proparallel == 'r' %} PARALLEL RESTRICTED{% elif data.proparallel == 's' %} PARALLEL SAFE {% elif data.proparallel == 'u' %} PARALLEL UNSAFE{% endif %}{% endif -%}
 {% if data.prorows and (data.prorows | int) > 0 %}
 
     ROWS {{data.prorows}}{% endif -%}{% if data.variables %}{% for v in data.variables %}
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/9.6_plus/properties.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/9.6_plus/properties.sql
new file mode 100644
index 000000000..489b6ead6
--- /dev/null
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/9.6_plus/properties.sql
@@ -0,0 +1,35 @@
+SELECT
+    pr.oid, pr.xmin, pr.proiswindow, pr.prosrc, pr.prosrc AS prosrc_c,
+    pr.pronamespace, pr.prolang, pr.procost, pr.prorows,
+    pr.prosecdef, pr.proleakproof, pr.proisstrict, pr.proretset, pr.provolatile, pr.proparallel,
+    pr.pronargs, pr.prorettype, pr.proallargtypes, pr.proargmodes, pr.probin, pr.proacl,
+    pr.proname, pr.proname AS name, pg_get_function_result(pr.oid) AS prorettypename,
+    typns.nspname AS typnsp, lanname, proargnames, oidvectortypes(proargtypes) AS proargtypenames,
+    pg_get_expr(proargdefaults, 'pg_catalog.pg_class'::regclass) AS proargdefaultvals,
+    pr.pronargdefaults, proconfig, pg_get_userbyid(proowner) AS funcowner, description,
+    (SELECT
+        array_agg(provider || '=' || label)
+    FROM
+        pg_seclabel sl1
+    WHERE
+        sl1.objoid=pr.oid) AS seclabels
+FROM
+    pg_proc pr
+JOIN
+    pg_type typ ON typ.oid=prorettype
+JOIN
+    pg_namespace typns ON typns.oid=typ.typnamespace
+JOIN
+    pg_language lng ON lng.oid=prolang
+LEFT OUTER JOIN
+    pg_description des ON (des.objoid=pr.oid AND des.classoid='pg_proc'::regclass and des.objsubid = 0)
+WHERE
+    proisagg = FALSE
+    AND typname NOT IN ('trigger', 'event_trigger')
+{% if fnid %}
+    AND pr.oid = {{fnid}}::oid
+{% else %}
+    AND pronamespace = {{scid}}::oid
+{% endif %}
+ORDER BY
+    proname;


view thread (8+ 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], [email protected]
  Subject: Re: [pgAdmin][RM5843] [SQL] - Some 'options' values for function not shown in sql
  In-Reply-To: <CAJ9T6SvJ1z95nGg+_cnVOmjgZ_6PGVXeuEtfyvPp=6nAb9E_tw@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