Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fSloh-0007IR-2N for pgadmin-hackers@arkaria.postgresql.org; Tue, 12 Jun 2018 16:06:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fSlof-00042l-HH for pgadmin-hackers@arkaria.postgresql.org; Tue, 12 Jun 2018 16:06:41 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fSlof-00042b-Ap for pgadmin-hackers@lists.postgresql.org; Tue, 12 Jun 2018 16:06:41 +0000 Received: from mx0b-00296801.pphosted.com ([148.163.153.148]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fSloZ-0001FH-LX for pgadmin-hackers@postgresql.org; Tue, 12 Jun 2018 16:06:40 +0000 Received: from pps.filterd (m0114585.ppops.net [127.0.0.1]) by mx0b-00296801.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w5CG6WkV000447 for ; Tue, 12 Jun 2018 16:06:32 GMT Received: from mail-io0-f198.google.com (mail-io0-f198.google.com [209.85.223.198]) by mx0b-00296801.pphosted.com with ESMTP id 2jjgaag2ej-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 12 Jun 2018 16:06:32 +0000 Received: by mail-io0-f198.google.com with SMTP id v10-v6so18407434iog.18 for ; Tue, 12 Jun 2018 09:06:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VYqIjbmVJdfaq9reAFOd7oDhDjBm9KyonNT+xPwL7mQ=; b=IDk+qwNTHpm+C+APqgyh5f7GNUXGbV31lZFpPh6dDpIZqiZGzToZJ8e+NVMLfYI3md gwRM/xmTfV24RxHofOP/w6EjxkrsiSiS2hvBCpkwjdGkj3dny7wDHuIPGFrKR2FTcLK+ /2BHo8EVl7B/G5PNW+dTewPnembFJjGXHtvsJO7C8dhzy0S0rGPfMG32zHJU0ioeSGY1 ekKcQKuf+TxZbdFjuuL4LhjMQjXdUIVDzmS2ug1TjH/cZ4Lif9FhVxvSqTqdNSXaU2ZP sNdVyPFaQDBql30oqqLCweRC6GtBB6EpCl/NCgheAuDyn4pK32cD+zBmcr3z/unt1EBL ICOA== X-Gm-Message-State: APt69E0/rb5dAJorsF9Z4B2QV9Y53RDm5+CKN5UtJA1xedx8IyIFEsBy VqO42o/XbvLRpwlxj6cdJJ+32AgbKWuB3ni9txVvglD7zHp9nkoSaV59GRp1fNIsxK26KyO+cCf dYgf9MpGvwameSuw7DCSmwQ19SkjZCHs6FPRNUehaHe/6BIRdMSxg1yXN13YHZbpHpdq4 X-Received: by 2002:a6b:2653:: with SMTP id m80-v6mr1063758iom.301.1528819591427; Tue, 12 Jun 2018 09:06:31 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJQr2Ghgox9k6b7+kXar8ypSqe7z+122QQ3p5FDAwreYnzWedA1mxbMHl6+TkLkUX2WvLPIAVhzyB+6xe+TMdQ= X-Received: by 2002:a6b:2653:: with SMTP id m80-v6mr1063733iom.301.1528819591105; Tue, 12 Jun 2018 09:06:31 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Victoria Henry Date: Tue, 12 Jun 2018 12:06:19 -0400 Message-ID: Subject: Re: [pgAdmin4][Patch]: RM 3362 - Fix the functions for PG v11, and add support procedure for PG v11 To: Khushboo Vashi Cc: Dave Page , pgadmin-hackers Content-Type: multipart/alternative; boundary="000000000000a764c6056e740c26" X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-06-12_01:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=2 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1806120181 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --000000000000a764c6056e740c26 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Khushboo, The following change is allowing the creation of procedures in postgresql versions less then 11 and also GreenPlum --- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions= /static/js/procedure.js +++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions= /static/js/procedure.js @@ -71,11 +71,7 @@ define('pgadmin.node.procedure', [ if ('catalog' in node_hierarchy) return false; - // Procedures supported only in PPAS - return ( - 'server' in node_hierarchy && - node_hierarchy['server'].server_type =3D=3D 'ppas' - ); + return true; Now that the Procedures are a thing in Postgresql maybe they should live in their own module. In the tests for trigger functions we are not consistent on the naming of the utils , in some places we call it funcs_utils in others trigger_funcs_utils. Thanks =E2=80=8B Victoria & Joao On Tue, Jun 12, 2018 at 3:10 AM Khushboo Vashi < khushboo.vashi@enterprisedb.com> wrote: > Hi, > > Please find the attached updated patch. > > On Fri, Jun 8, 2018 at 2:21 PM, Dave Page wrote: > >> Hi >> >> On Thu, Jun 7, 2018 at 11:27 AM, Khushboo Vashi < >> khushboo.vashi@enterprisedb.com> wrote: >> >>> Hi, >>> >>> Please ignore my previous patch, find the attached updated one. >>> >> >> I found a couple of issues with this: >> >> - Clicking the + button on the Parameters tab does nothing in either >> Create or Edit modes >> >> Fixed > >> - The debugger fails to start (though, perhaps that's because the plugin >> doesn't have Ashesh's latest patches in it). >> >> FYI, I was trying to test the debugger with: >> >> -- PROCEDURE: public.dummy_proc(integer) >> >> -- DROP PROCEDURE public.dummy_proc(integer); >> >> CREATE OR REPLACE PROCEDURE public.dummy_proc( >> id integer) >> LANGUAGE 'plpgsql' >> >> AS $BODY$BEGIN >> raise notice 'id is %', id; >> END;$BODY$; >> >> Fixed. Tested with the latest code of the plugin. > >> Thanks! >> >> Thanks, > Khushboo > >> -- >> Dave Page >> Blog: http://pgsnake.blogspot.com >> Twitter: @pgsnake >> >> EnterpriseDB UK: http://www.enterprisedb.com >> The Enterprise PostgreSQL Company >> > > --000000000000a764c6056e740c26 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Hi Khushboo,

The following change is allowin= g the creation of procedures in postgresql versions less then 11 and also G= reenPlum

--- a/web/pgadmin/browser=
/server_groups/servers/databases/schemas/functions/static/js/procedure.js
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions=
/static/js/procedure.js
@@ -71,11 +71,7 @@ define('pgadmin.node.procedure', [
         if ('catalog' in node_hierarchy)
           return false;

-        // Procedures supported only in PPAS
-        return (
-          'server' in node_hierarchy &&
-            node_hierarchy['server'].server_type =3D=3D 'ppas&=
#39;
-        );
+        return true;

Now that the Proce= dures are a thing in Postgresql maybe they should live in their own module.=
In the tests for trigger functions we are not consistent on the naming = of the utils , in some places we call it funcs_utils in others trigger_funcs_utils.

Thanks

=E2=80=8B
Victori= a & Joao

On = Tue, Jun 12, 2018 at 3:10 AM Khushboo Vashi <khushboo.vashi@enterprisedb.com> wrote:
<= /div>
Hi,
Please find the attached updated patch.

On Fri, Jun 8, 2018 at 2:21 PM, Dave = Page <dpage@pgadmin.org> wrote:
Hi

On Thu, Jun 7, 2018 at 11:27 AM, Khushboo Vashi <khushboo.vashi@enterprisedb.com> wrote:
Hi,

=
Please ignore my previous patch, find the attached updated= one.

I found a couple o= f issues with this:

- Clicking the + button on the= Parameters tab does nothing in either Create or Edit modes

<= /div>
Fixed=C2=A0
- The debugger fails to start (though, perhaps th= at's because the plugin doesn't have Ashesh's latest patches in= it).

FYI, I was trying to test the debugger with:=

-- PROCEDURE: public.dummy_proc(integer)

-- DROP PROCEDURE public.dummy_proc(integer);

CREATE OR REPLACE=C2=A0 PROCEDURE public.dummy_proc(
id integer)
LA= NGUAGE 'plpgsql'

AS $BODY$BEGIN
= =C2=A0 raise notice 'id is %', id;
END;$BODY$;

Fixed. Tested with the = latest code of the plugin.
= Thanks!

Tha= nks,
Khushboo=C2=A0
--
Dave Page
Blog: http://pgsnake.blogspot.= com
Twitter: @pgsnake

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

--000000000000a764c6056e740c26--