public inbox for [email protected]help / color / mirror / Atom feed
[pgAdmin][RM5843] [SQL] - Some 'options' values for function not shown in sql 8+ messages / 2 participants [nested] [flat]
* [pgAdmin][RM5843] [SQL] - Some 'options' values for function not shown in sql @ 2020-09-22 13:11 Pradip Parkale <[email protected]> 0 siblings, 1 reply; 8+ messages in thread From: Pradip Parkale @ 2020-09-22 13:11 UTC (permalink / raw) To: pgadmin-hackers 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 Attachments: [application/octet-stream] RM5843.patch (8.2K, 3-RM5843.patch) download | inline diff: diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/11_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/11_plus/create.sql index bdf36cb61..77bf6ef9b 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/11_plus/create.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/11_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/12_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/12_plus/create.sql index 48decdb1f..565b86f1d 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/12_plus/create.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/12_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 %} diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/12_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/12_plus/create.sql index fc29a6c1a..99b64e38d 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/12_plus/create.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/12_plus/create.sql @@ -21,8 +21,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.procost %} COST {{data.procost}}{% endif %}{% if data.prorows and (data.prorows | int) > 0 %} diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/9.6_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/9.6_plus/create.sql index 9c7a78298..fd2383b38 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/9.6_plus/create.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/9.6_plus/create.sql @@ -21,8 +21,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.procost %} COST {{data.procost}}{% endif %}{% if data.prorows and (data.prorows | int) > 0 %} diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/11_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/11_plus/create.sql index e364f2789..f6f62887c 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/11_plus/create.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/11_plus/create.sql @@ -20,8 +20,8 @@ LANGUAGE {{ data.lanname|qtLiteral }}{% if data.prosecdef %} {% if data.lanname == 'edbspl' %} {{ data.provolatile }} {% if data.proleakproof %}LEAKPROOF {% endif %} {% if data.proisstrict %}STRICT {% 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.procost %} +{% 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.procost %} COST {{data.procost}}{% endif %}{% if data.prorows and (data.prorows | int) > 0 %} diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/9.6_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/9.6_plus/create.sql index 2c11bd8db..581d81abd 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/9.6_plus/create.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/9.6_plus/create.sql @@ -17,8 +17,8 @@ CREATE OR REPLACE PROCEDURE {{ conn|qtIdent(data.pronamespace, data.name) }}{% i {{ data.provolatile }} {% if data.proleakproof %}LEAKPROOF {% endif %} {% if data.proisstrict %}STRICT {% endif %} {% if data.prosecdef %}SECURITY DEFINER{% 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.procost %} +{% 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.procost %} COST {{data.procost}}{% endif %}{% if data.prorows and (data.prorows | int) > 0 %} ^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: [pgAdmin][RM5843] [SQL] - Some 'options' values for function not shown in sql @ 2020-09-23 06:44 Akshay Joshi <[email protected]> parent: Pradip Parkale <[email protected]> 0 siblings, 1 reply; 8+ messages in thread From: Akshay Joshi @ 2020-09-23 06:44 UTC (permalink / raw) To: Pradip Parkale <[email protected]>; +Cc: pgadmin-hackers 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* ^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: [pgAdmin][RM5843] [SQL] - Some 'options' values for function not shown in sql @ 2020-09-23 07:55 Akshay Joshi <[email protected]> parent: Akshay Joshi <[email protected]> 0 siblings, 1 reply; 8+ messages in thread From: Akshay Joshi @ 2020-09-23 07:55 UTC (permalink / raw) To: Pradip Parkale <[email protected]>; +Cc: pgadmin-hackers 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* ^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: [pgAdmin][RM5843] [SQL] - Some 'options' values for function not shown in sql @ 2020-09-23 18:00 Pradip Parkale <[email protected]> parent: Akshay Joshi <[email protected]> 0 siblings, 1 reply; 8+ messages in thread From: Pradip Parkale @ 2020-09-23 18:00 UTC (permalink / raw) To: Akshay Joshi <[email protected]>; +Cc: pgadmin-hackers 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; ^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: [pgAdmin][RM5843] [SQL] - Some 'options' values for function not shown in sql @ 2020-10-01 08:55 Pradip Parkale <[email protected]> parent: Pradip Parkale <[email protected]> 0 siblings, 1 reply; 8+ messages in thread From: Pradip Parkale @ 2020-10-01 08:55 UTC (permalink / raw) To: Akshay Joshi <[email protected]>; +Cc: pgadmin-hackers Hi Akshay, Please find the attached patch to allow the user to modify the option settings of the procedure. This issue was only for PPAS 11 and PPAS 12. On Wed, Sep 23, 2020 at 11:30 PM Pradip Parkale < [email protected]> wrote: > 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 > -- Thanks & Regards, Pradip Parkale Software Engineer | EnterpriseDB Corporation Attachments: [application/octet-stream] RM5843_v3.patch (1.3K, 3-RM5843_v3.patch) download | inline diff: diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/11_plus/update.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/11_plus/update.sql index b8df9b933..6e711724d 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/11_plus/update.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/11_plus/update.sql @@ -22,8 +22,9 @@ CREATE OR REPLACE PROCEDURE {{ conn|qtIdent(o_data.pronamespace, name) }}({% if LANGUAGE {{ data.lanname|qtLiteral }} {% else %} LANGUAGE {{ o_data.lanname|qtLiteral }} {% endif %} +{{ data.provolatile }} {% if ('prosecdef' in data and data.prosecdef) or ('prosecdef' not in data and o_data.prosecdef) %}SECURITY DEFINER{% endif %} -{% if data.lanname == 'edbspl' %} +{% if data.lanname == 'edbspl' or (o_data.lanname == 'edbspl' and not 'lanname' in data ) %} {% if ('proleakproof' in data and data.proleakproof) or ('proleakproof' not in data and o_data.proleakproof) %} LEAKPROOF{% else %} NOT LEAKPROOF{% endif %} {% if ('proisstrict' in data and data.proisstrict) or ('proisstrict' not in data and o_data.proisstrict) %} STRICT{% endif %} ^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: [pgAdmin][RM5843] [SQL] - Some 'options' values for function not shown in sql @ 2020-10-05 09:11 Akshay Joshi <[email protected]> parent: Pradip Parkale <[email protected]> 0 siblings, 1 reply; 8+ messages in thread From: Akshay Joshi @ 2020-10-05 09:11 UTC (permalink / raw) To: Pradip Parkale <[email protected]>; +Cc: pgadmin-hackers Thanks, patch applied. On Thu, Oct 1, 2020 at 2:25 PM Pradip Parkale < [email protected]> wrote: > Hi Akshay, > > Please find the attached patch to allow the user to modify the option > settings of the procedure. This issue was only for PPAS 11 and PPAS 12. > > On Wed, Sep 23, 2020 at 11:30 PM Pradip Parkale < > [email protected]> wrote: > >> 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 >> > > > -- > 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* ^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: [pgAdmin][RM5843] [SQL] - Some 'options' values for function not shown in sql @ 2020-10-12 06:29 Pradip Parkale <[email protected]> parent: Akshay Joshi <[email protected]> 0 siblings, 1 reply; 8+ messages in thread From: Pradip Parkale @ 2020-10-12 06:29 UTC (permalink / raw) To: Akshay Joshi <[email protected]>; +Cc: pgadmin-hackers Hi Akshay, Please find the attached patch for below issues: 1) The volatility option is not reflecting. It stays volatile always when creating the function - Fixed 2) Set "Returns as set" to true and enter estimated rows like 12. Now set returns as set to false and save. It gives ERROR: ROWS is not applicable when function does not return a set. Need to clear estimated rows when returns as set is false. - Fixed 3) If estimated rows are added and support function is selected then SQL looks ugly. - Fixed On Mon, Oct 5, 2020 at 2:41 PM Akshay Joshi <[email protected]> wrote: > Thanks, patch applied. > > On Thu, Oct 1, 2020 at 2:25 PM Pradip Parkale < > [email protected]> wrote: > >> Hi Akshay, >> >> Please find the attached patch to allow the user to modify the option >> settings of the procedure. This issue was only for PPAS 11 and PPAS 12. >> >> On Wed, Sep 23, 2020 at 11:30 PM Pradip Parkale < >> [email protected]> wrote: >> >>> 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 >>> >> >> >> -- >> 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, Pradip Parkale Software Engineer | EnterpriseDB Corporation Attachments: [application/octet-stream] RM5843_v4.patch (22.2K, 3-RM5843_v4.patch) download | inline diff: 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 4c1ce416b..fb8dec7f7 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 @@ -1448,12 +1448,11 @@ class FunctionView(PGChildNodeView, DataTypeReader, SchemaDiffObjectCompare): # Get Schema Name from its OID. self._get_schema_name_from_oid(data) - if 'provolatile' in data: - data['provolatile'] = vol_dict[data['provolatile']]\ - if data['provolatile'] else '' - if fnid is not None: # Edit Mode + if 'provolatile' in data: + data['provolatile'] = vol_dict[data['provolatile']] \ + if data['provolatile'] else '' all_ids_dict = { 'gid': gid, diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/static/js/function.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/static/js/function.js index 4b132c182..fdfc2afff 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/static/js/function.js +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/static/js/function.js @@ -310,7 +310,7 @@ define('pgadmin.node.function', [ },{ id: 'prorows', label: gettext('Estimated rows'), type: 'text', deps: ['proretset'], visible: 'isVisible', readonly: 'isReadonly', - group: gettext('Options'), + group: gettext('Options'),disabled: 'isDisabled', },{ id: 'proleakproof', label: gettext('Leak proof?'), group: gettext('Options'), cell:'boolean', type: 'switch', min_version: 90200, @@ -456,6 +456,9 @@ define('pgadmin.node.function', [ return !m.isNew(); case 'prorows': if(m.get('proretset') == true) { + setTimeout(function() { + m.set('prorows', 0); + }, 10); return false; } return true; diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/12_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/12_plus/create.sql index b4f164f9b..7fc9fee57 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/12_plus/create.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/pg/sql/12_plus/create.sql @@ -31,7 +31,6 @@ CREATE{% if query_type is defined %}{{' OR REPLACE'}}{% endif %} FUNCTION {{ con ROWS {{data.prorows}} {% endif %} {% if data.prosupportfunc %} - SUPPORT {{ data.prosupportfunc }} {% endif -%} {% if data.variables %}{% for v in data.variables %} diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/9.5_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/9.5_plus/create.sql index d79183996..caad0bfad 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/9.5_plus/create.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/functions/ppas/sql/9.5_plus/create.sql @@ -17,7 +17,7 @@ CREATE{% if query_type is defined %}{{' OR REPLACE'}}{% endif %} FUNCTION {{ con RETURNS{% if data.proretset and (data.prorettypename.startswith('SETOF ') or data.prorettypename.startswith('TABLE')) %} {{ data.prorettypename }} {% elif data.proretset %} SETOF {{ data.prorettypename }}{% else %} {{ data.prorettypename }}{% endif %} LANGUAGE {{ data.lanname|qtLiteral }} - {% if data.provolatile %}{% if data.provolatile == 'i' %}IMMUTABLE{% elif data.provolatile == 's' %}STABLE{% else %}VOLATILE{% endif %} {% endif %}{% if data.proleakproof %}LEAKPROOF {% endif %} + {% if data.provolatile %}{% if data.provolatile == 'i' %}IMMUTABLE{% elif data.provolatile == 'STABLE' %}STABLE{% else %}VOLATILE{% endif %} {% endif %}{% if data.proleakproof %}LEAKPROOF {% endif %} {% if data.proisstrict %}STRICT {% endif %} {% if data.prosecdef %}SECURITY DEFINER {% endif %} {% if data.proiswindow %}WINDOW{% endif %}{% if data.procost %} diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/9.6_plus/create.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/9.6_plus/create.sql index 581d81abd..a533b7dec 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/9.6_plus/create.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/9.6_plus/create.sql @@ -14,7 +14,7 @@ CREATE OR REPLACE PROCEDURE {{ conn|qtIdent(data.pronamespace, data.name) }}{% i ){% endif %} {% endif %} - {{ data.provolatile }} {% if data.proleakproof %}LEAKPROOF {% endif %} + {% if data.provolatile %}{% if data.provolatile == 'i' %}IMMUTABLE{% elif data.provolatile == 's' %}STABLE{% else %}VOLATILE{% endif %} {% endif %}{% if data.proleakproof %}LEAKPROOF {% endif %} {% if data.proisstrict %}STRICT {% endif %} {% if data.prosecdef %}SECURITY DEFINER{% endif %} {% if data.proparallel and (data.proparallel == 'r' or data.proparallel == 's' or data.proparallel == 'u') %} diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/9.6_plus/update.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/9.6_plus/update.sql index 6e7cd54af..c1d7576e3 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/9.6_plus/update.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/templates/procedures/ppas/sql/9.6_plus/update.sql @@ -17,7 +17,7 @@ CREATE OR REPLACE PROCEDURE {{ conn|qtIdent(o_data.pronamespace, name) }}{% if d ) {% endif %} - {{ data.provolatile }} {% if ('proleakproof' in data and data.proleakproof) or ('proleakproof' not in data and o_data.proleakproof) %}LEAKPROOF{% else %}NOT LEAKPROOF{% endif %} + {% if 'provolatile' in data and data.provolatile %}{{ data.provolatile }} {% elif 'provolatile' not in data and o_data.provolatile %}{{ o_data.provolatile }}{% endif %} {% if ('proleakproof' in data and data.proleakproof) or ('proleakproof' not in data and o_data.proleakproof) %}LEAKPROOF{% else %}NOT LEAKPROOF{% endif %} {% if ('proisstrict' in data and data.proisstrict) or ('proisstrict' not in data and o_data.proisstrict) %} STRICT{% endif %} {% if ('prosecdef' in data and data.prosecdef) or ('prosecdef' not in data and o_data.prosecdef) %} SECURITY DEFINER{% endif %} diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/pg/11_plus/test_trigger_functions.json b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/pg/11_plus/test_trigger_functions.json index a2e9fc70d..6abea3d2a 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/pg/11_plus/test_trigger_functions.json +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/pg/11_plus/test_trigger_functions.json @@ -119,7 +119,7 @@ "prorettypename": "trigger", "prorows": "4321", "prosecdef": true, - "provolatile": "s", + "provolatile": "v", "prosrc": "begin\nselect 1;\nend;", "seclabels": [], "variables": [{ @@ -170,7 +170,7 @@ "prorettypename": "event_trigger", "prorows": "4321", "prosecdef": true, - "provolatile": "s", + "provolatile": "v", "prosrc": "begin\nselect 1;\nend;", "seclabels": [], "variables": [{ diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/pg/12_plus/create_event_trigger_full.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/pg/12_plus/create_event_trigger_full.sql index 1bdbb6e01..8bdba7063 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/pg/12_plus/create_event_trigger_full.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/pg/12_plus/create_event_trigger_full.sql @@ -6,7 +6,7 @@ CREATE FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"() RETURNS SETOF event_trigger LANGUAGE 'plpgsql' COST 1234 - VOLATILE LEAKPROOF STRICT SECURITY DEFINER WINDOW + STABLE LEAKPROOF STRICT SECURITY DEFINER WINDOW ROWS 4321 SET application_name='appname' AS $BODY$ diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/pg/12_plus/create_plain_trigger_full.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/pg/12_plus/create_plain_trigger_full.sql index 3a51119ea..bf2069e8b 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/pg/12_plus/create_plain_trigger_full.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/pg/12_plus/create_plain_trigger_full.sql @@ -6,7 +6,7 @@ CREATE FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"() RETURNS SETOF trigger LANGUAGE 'plpgsql' COST 1234 - VOLATILE LEAKPROOF STRICT SECURITY DEFINER WINDOW + STABLE LEAKPROOF STRICT SECURITY DEFINER WINDOW ROWS 4321 SET application_name='appname' SET search_path=public, pg_temp diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/pg/9.5_plus/test_trigger_functions.json b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/pg/9.5_plus/test_trigger_functions.json index a2e9fc70d..6abea3d2a 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/pg/9.5_plus/test_trigger_functions.json +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/pg/9.5_plus/test_trigger_functions.json @@ -119,7 +119,7 @@ "prorettypename": "trigger", "prorows": "4321", "prosecdef": true, - "provolatile": "s", + "provolatile": "v", "prosrc": "begin\nselect 1;\nend;", "seclabels": [], "variables": [{ @@ -170,7 +170,7 @@ "prorettypename": "event_trigger", "prorows": "4321", "prosecdef": true, - "provolatile": "s", + "provolatile": "v", "prosrc": "begin\nselect 1;\nend;", "seclabels": [], "variables": [{ diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/pg/9.6_plus/test_trigger_functions.json b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/pg/9.6_plus/test_trigger_functions.json index a2e9fc70d..6abea3d2a 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/pg/9.6_plus/test_trigger_functions.json +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/pg/9.6_plus/test_trigger_functions.json @@ -119,7 +119,7 @@ "prorettypename": "trigger", "prorows": "4321", "prosecdef": true, - "provolatile": "s", + "provolatile": "v", "prosrc": "begin\nselect 1;\nend;", "seclabels": [], "variables": [{ @@ -170,7 +170,7 @@ "prorettypename": "event_trigger", "prorows": "4321", "prosecdef": true, - "provolatile": "s", + "provolatile": "v", "prosrc": "begin\nselect 1;\nend;", "seclabels": [], "variables": [{ diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/pg/default/test_trigger_functions.json b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/pg/default/test_trigger_functions.json index a2e9fc70d..6abea3d2a 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/pg/default/test_trigger_functions.json +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/pg/default/test_trigger_functions.json @@ -119,7 +119,7 @@ "prorettypename": "trigger", "prorows": "4321", "prosecdef": true, - "provolatile": "s", + "provolatile": "v", "prosrc": "begin\nselect 1;\nend;", "seclabels": [], "variables": [{ @@ -170,7 +170,7 @@ "prorettypename": "event_trigger", "prorows": "4321", "prosecdef": true, - "provolatile": "s", + "provolatile": "v", "prosrc": "begin\nselect 1;\nend;", "seclabels": [], "variables": [{ diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/ppas/11_plus/test_trigger_functions.json b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/ppas/11_plus/test_trigger_functions.json index 7810fef81..da99d9d4c 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/ppas/11_plus/test_trigger_functions.json +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/ppas/11_plus/test_trigger_functions.json @@ -109,7 +109,7 @@ "prorettypename": "trigger", "prorows": "4321", "prosecdef": true, - "provolatile": "s", + "provolatile": "v", "prosrc": "begin\nselect 1;\nend;", "seclabels": [], "variables": [{ @@ -150,7 +150,7 @@ "prorettypename": "event_trigger", "prorows": "4321", "prosecdef": true, - "provolatile": "s", + "provolatile": "v", "prosrc": "begin\nselect 1;\nend;", "seclabels": [], "variables": [{ diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/ppas/12_plus/test_trigger_functions.json b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/ppas/12_plus/test_trigger_functions.json index cc1182082..3f20cf801 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/ppas/12_plus/test_trigger_functions.json +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/ppas/12_plus/test_trigger_functions.json @@ -119,7 +119,7 @@ "prorettypename": "trigger", "prorows": "4321", "prosecdef": true, - "provolatile": "s", + "provolatile": "v", "prosrc": "begin\nselect 1;\nend;", "seclabels": [], "variables": [{ @@ -170,7 +170,7 @@ "prorettypename": "event_trigger", "prorows": "4321", "prosecdef": true, - "provolatile": "s", + "provolatile": "v", "prosrc": "begin\nselect 1;\nend;", "seclabels": [], "variables": [{ diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/ppas/9.6_plus/alter_proc_opt.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/ppas/9.6_plus/alter_proc_opt.sql index fd1073634..c7cfe58d1 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/ppas/9.6_plus/alter_proc_opt.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/ppas/9.6_plus/alter_proc_opt.sql @@ -4,7 +4,7 @@ CREATE OR REPLACE PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"( i1 integer) - STABLE SECURITY DEFINER PARALLEL RESTRICTED + VOLATILE SECURITY DEFINER PARALLEL RESTRICTED COST 120 SET application_name='pgadmin' AS begin diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/ppas/9.6_plus/alter_proc_opt_msql.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/ppas/9.6_plus/alter_proc_opt_msql.sql index fd1073634..c7cfe58d1 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/ppas/9.6_plus/alter_proc_opt_msql.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/ppas/9.6_plus/alter_proc_opt_msql.sql @@ -4,7 +4,7 @@ CREATE OR REPLACE PROCEDURE public."Proc1_$%{}[]()&*^!@""'`\/#"( i1 integer) - STABLE SECURITY DEFINER PARALLEL RESTRICTED + VOLATILE SECURITY DEFINER PARALLEL RESTRICTED COST 120 SET application_name='pgadmin' AS begin diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/ppas/9.6_plus/create_plain_trigger_full.sql b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/ppas/9.6_plus/create_plain_trigger_full.sql index 8ba2ad109..2b1d9f6ff 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/ppas/9.6_plus/create_plain_trigger_full.sql +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/ppas/9.6_plus/create_plain_trigger_full.sql @@ -6,7 +6,7 @@ CREATE FUNCTION public."Trig1_$%{}[]()&*^!@""'`\/#"() RETURNS SETOF trigger LANGUAGE 'plpgsql' COST 1234 - VOLATILE LEAKPROOF STRICT SECURITY DEFINER WINDOW + STABLE LEAKPROOF STRICT SECURITY DEFINER WINDOW ROWS 4321 SET application_name='appname' SET search_path=public, pg_temp diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/ppas/9.6_plus/test_procedures.json b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/ppas/9.6_plus/test_procedures.json index 474853cf2..46dd89cc4 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/ppas/9.6_plus/test_procedures.json +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/ppas/9.6_plus/test_procedures.json @@ -8,9 +8,16 @@ "data": { "name": "Proc1_$%{}[]()&*^!@\"'`\\/#", "acl": [], - "arguments": [{"argtype": "integer", "argmode": "IN", "argname": "i1", "argdefval": ""}], + "arguments": [ + { + "argtype": "integer", + "argmode": "IN", + "argname": "i1", + "argdefval": "" + } + ], "funcowner": "enterprisedb", - "lanname": "edbspl", + "lanname": "plpgsql", "options": [], "pronamespace": 2200, "prosrc": "begin\nselect 1;\nend;", @@ -25,7 +32,8 @@ "probin": "$libdir/" }, "expected_sql_file": "create_procedure.sql" - }, { + }, + { "type": "alter", "name": "Alter procedure comment", "endpoint": "NODE-procedure.obj_id", @@ -35,19 +43,27 @@ }, "expected_sql_file": "alter_proc_comment.sql", "expected_msql_file": "alter_proc_comment_msql.sql" - }, { + }, + { "type": "alter", "name": "Alter procedure param", "endpoint": "NODE-procedure.obj_id", + "provolatile": "s", "sql_endpoint": "NODE-procedure.sql_id", "data": { "variables": { - "added": [{"name": "application_name", "value": "pgadmin"}] + "added": [ + { + "name": "application_name", + "value": "pgadmin" + } + ] } }, "expected_sql_file": "alter_proc_param.sql", "expected_msql_file": "alter_proc_param_msql.sql" - }, { + }, + { "type": "alter", "name": "Alter procedure options", "endpoint": "NODE-procedure.obj_id", @@ -60,7 +76,8 @@ }, "expected_sql_file": "alter_proc_opt.sql", "expected_msql_file": "alter_proc_opt_msql.sql" - }, { + }, + { "type": "delete", "name": "Drop procedure", "endpoint": "NODE-procedure.delete_id", diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/ppas/9.6_plus/test_trigger_functions.json b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/ppas/9.6_plus/test_trigger_functions.json index 7810fef81..96e2fc382 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/ppas/9.6_plus/test_trigger_functions.json +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/ppas/9.6_plus/test_trigger_functions.json @@ -150,7 +150,7 @@ "prorettypename": "event_trigger", "prorows": "4321", "prosecdef": true, - "provolatile": "s", + "provolatile": "v", "prosrc": "begin\nselect 1;\nend;", "seclabels": [], "variables": [{ diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/ppas/default/test_procedures.json b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/ppas/default/test_procedures.json index 474853cf2..f908a56ee 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/ppas/default/test_procedures.json +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/ppas/default/test_procedures.json @@ -53,7 +53,7 @@ "endpoint": "NODE-procedure.obj_id", "sql_endpoint": "NODE-procedure.sql_id", "data": { - "provolatile": "s", + "provolatile": "v", "proparallel": "r", "description": "some comment", "procost": "120" diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/ppas/default/test_trigger_functions.json b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/ppas/default/test_trigger_functions.json index 7810fef81..da99d9d4c 100644 --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/ppas/default/test_trigger_functions.json +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/ppas/default/test_trigger_functions.json @@ -109,7 +109,7 @@ "prorettypename": "trigger", "prorows": "4321", "prosecdef": true, - "provolatile": "s", + "provolatile": "v", "prosrc": "begin\nselect 1;\nend;", "seclabels": [], "variables": [{ @@ -150,7 +150,7 @@ "prorettypename": "event_trigger", "prorows": "4321", "prosecdef": true, - "provolatile": "s", + "provolatile": "v", "prosrc": "begin\nselect 1;\nend;", "seclabels": [], "variables": [{ ^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: [pgAdmin][RM5843] [SQL] - Some 'options' values for function not shown in sql @ 2020-10-12 08:40 Akshay Joshi <[email protected]> parent: Pradip Parkale <[email protected]> 0 siblings, 0 replies; 8+ messages in thread From: Akshay Joshi @ 2020-10-12 08:40 UTC (permalink / raw) To: Pradip Parkale <[email protected]>; +Cc: pgadmin-hackers Thanks, patch applied. On Mon, Oct 12, 2020 at 11:59 AM Pradip Parkale < [email protected]> wrote: > Hi Akshay, > > Please find the attached patch for below issues: > 1) The volatility option is not reflecting. It stays volatile always when > creating the function - Fixed > 2) Set "Returns as set" to true and enter estimated rows like 12. Now set > returns as set to false and save. It gives ERROR: ROWS is not applicable > when function does not return a set. Need to clear estimated rows when > returns as set is false. - Fixed > 3) If estimated rows are added and support function is selected then SQL > looks ugly. - Fixed > > On Mon, Oct 5, 2020 at 2:41 PM Akshay Joshi <[email protected]> > wrote: > >> Thanks, patch applied. >> >> On Thu, Oct 1, 2020 at 2:25 PM Pradip Parkale < >> [email protected]> wrote: >> >>> Hi Akshay, >>> >>> Please find the attached patch to allow the user to modify the option >>> settings of the procedure. This issue was only for PPAS 11 and PPAS 12. >>> >>> On Wed, Sep 23, 2020 at 11:30 PM Pradip Parkale < >>> [email protected]> wrote: >>> >>>> 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 >>>> >>> >>> >>> -- >>> 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, > 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* ^ permalink raw reply [nested|flat] 8+ messages in thread
end of thread, other threads:[~2020-10-12 08:40 UTC | newest] Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2020-09-22 13:11 [pgAdmin][RM5843] [SQL] - Some 'options' values for function not shown in sql Pradip Parkale <[email protected]> 2020-09-23 06:44 ` Akshay Joshi <[email protected]> 2020-09-23 07:55 ` Akshay Joshi <[email protected]> 2020-09-23 18:00 ` Pradip Parkale <[email protected]> 2020-10-01 08:55 ` Pradip Parkale <[email protected]> 2020-10-05 09:11 ` Akshay Joshi <[email protected]> 2020-10-12 06:29 ` Pradip Parkale <[email protected]> 2020-10-12 08:40 ` Akshay Joshi <[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