Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aNL6Z-0007vi-SM for pgadmin-hackers@arkaria.postgresql.org; Sun, 24 Jan 2016 13:53:23 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aNL6Z-0000M8-6Q for pgadmin-hackers@arkaria.postgresql.org; Sun, 24 Jan 2016 13:53:23 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aNL6L-00006S-Cu for pgadmin-hackers@postgresql.org; Sun, 24 Jan 2016 13:53:09 +0000 Received: from mail-yk0-x234.google.com ([2607:f8b0:4002:c07::234]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1aNL6D-0005U4-Tq for pgadmin-hackers@postgresql.org; Sun, 24 Jan 2016 13:53:07 +0000 Received: by mail-yk0-x234.google.com with SMTP id u68so6177671ykd.2 for ; Sun, 24 Jan 2016 05:53:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=xH8Y8efkx4bzK6I9alMusBRUIpNMHhZsIqPUqRpy8Gs=; b=Z3IMAKGkI4Vzixctt5K6P7WVF1d8AkSHD5YrM0p1XapjN6igcJ2B6I6+UFLPk+rNDg oAy9Scgw2AX+pckpfcflCTr3qTYE8JdlrFWR9dGXy06zSPFXcwTDoVZWo7vUxJtoBDTo 37elaZLihaLn+8Ru8KZOE0Nwh+dmVYs3eSYq2d+Rpq5PSNpUMQ6Gi3ZJ7TNV8Om4g7QM SFw4g9WATQcVA2otI4KiKuD4aZP/4Fcbs//t+JiQJrXzoa96utWkRykdvA8YFO9agmmw yQhiKUoRhulbnLjgF0QM4uYNVXqIiHa3tlx+RjQX/Wc9c1OdB87U3+5rni7uBnaAdPsK 1gAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=xH8Y8efkx4bzK6I9alMusBRUIpNMHhZsIqPUqRpy8Gs=; b=A7U5E9c5UunNzGpCUYHfvomUMrnT8BqlGwlQf4/ozDyvrppE2gRfEJ1iRcn8vsR7uF i6NaIhN1a1ua574wsaeqc4zlImwWnSNlvr4YZjkfOoC/AqW3ueYI/rS+sKoQnuEz7SD2 dILHh313Ko+q+w3R+fV6wkmklOtZEoO9H/8MIXJW+F+FvKgTORvt9fM/r0QoJk6gQoE0 CHEe47GWvCnPFi3gUuSNc7/OaLWLVSOQOBYGbrQjVDYAdtgSZN130HckOO3YHhGSwVVT 26iNEOOb8nkeIBXaDP4UbE7jelUua1ZlOviLlfoYW33CUp74HN5wX8bOP+UK6785wGvl CD8Q== X-Gm-Message-State: AG10YOSraQiVjXINkzogJ2dUFuNeez9fTlJDH7xtH/9g0JiKyVsbi7OOQjlk5pn8sJicfltaZPoEpXqITz/IUQUf MIME-Version: 1.0 X-Received: by 10.37.50.196 with SMTP id y187mr6662832yby.7.1453643580505; Sun, 24 Jan 2016 05:53:00 -0800 (PST) Received: by 10.37.202.75 with HTTP; Sun, 24 Jan 2016 05:53:00 -0800 (PST) In-Reply-To: References: Date: Sun, 24 Jan 2016 19:23:00 +0530 Message-ID: Subject: Re: [pgAdmin3][Extension]: Wrong SQL generated From: Neel Patel To: Surinder Kumar Cc: pgadmin-hackers Content-Type: multipart/mixed; boundary=001a1146de543fa1b0052a14c5a0 X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org --001a1146de543fa1b0052a14c5a0 Content-Type: multipart/alternative; boundary=001a1146de543fa1a9052a14c59e --001a1146de543fa1a9052a14c59e Content-Type: text/plain; charset=UTF-8 Hi, Please find attached patch file for the issue mentioned below. *Issue:- * When user "Edit" any existing extension module property, and try to change the schema and version field to blank then SQL should not be generated for the blank field. Above issue is fixed with attached patch file. Do review it and let us know for any comments. Thanks, Neel Patel On Mon, Jan 18, 2016 at 4:33 PM, Surinder Kumar < surinder.kumar@enterprisedb.com> wrote: > Hi all, > > > While implementing Extension module in pgAdmin4, I came to know that there > is an bug in pgadmin3. > > Following are the steps to reproduce it: > 1. Edit an existing extension. > 2. In definition tab, set schema and version fields to empty. > 3. In SQL tab, it generates an sql for the changes made which is wrong, it > shouldn't generate sql for the schema and version field if it is kept > empty, both fields should be validated. > > > Below is the wrong SQL generated: > > *ALTER EXTENSION btree_gin* > * SET SCHEMA ;* > *ALTER EXTENSION btree_gin* > * UPDATE TO ;* > > > Let me know for any comments. > > Thanks > Surinder Kumar > --001a1146de543fa1a9052a14c59e Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,

Please find attached patch file for= the issue mentioned below.

Issue:-=C2=A0
When user "Edit" any existing extension module property,= and try to change the schema and version field to blank then SQL should no= t be generated for the blank field.

Above issue is= fixed with attached patch file.

Do review it and = let us know for any comments.

Thanks,
Ne= el Patel

On Mon, Jan 18, 2016 at 4:33 PM, Surinder Kumar <surinder= .kumar@enterprisedb.com> wrote:
Hi all,


While implementin= g Extension module in pgAdmin4, I came to know that there is an bug in pgad= min3.

Following are the steps to reproduce it:
1. Edit an existing extension.
2. In definition tab, set s= chema and version fields to empty.
3. In SQL tab, it generates an= sql for the changes made which is wrong, it shouldn't generate sql for= the schema and version field if it is kept empty, both fields should be va= lidated.


Below is the wrong SQL gen= erated:

ALTER EXTENSION btree_gin
=C2=A0 SET SCHEMA ;
ALTER EXTENSION btree_gin
=C2=A0 UPDATE TO ;
<= div>

Let me know fo= r any comments.
Thanks
Surinder Kumar

--001a1146de543fa1a9052a14c59e-- --001a1146de543fa1b0052a14c5a0 Content-Type: application/octet-stream; name="extension_fix.patch" Content-Disposition: attachment; filename="extension_fix.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_ijslujtv0 ZGlmZiAtLWdpdCBhL3BnYWRtaW4vZGxnL2RsZ0V4dGVuc2lvbi5jcHAgYi9w Z2FkbWluL2RsZy9kbGdFeHRlbnNpb24uY3BwCmluZGV4IGNmYTYyYTMuLjdj MjM2MmUgMTAwNjQ0Ci0tLSBhL3BnYWRtaW4vZGxnL2RsZ0V4dGVuc2lvbi5j cHAKKysrIGIvcGdhZG1pbi9kbGcvZGxnRXh0ZW5zaW9uLmNwcApAQCAtMTgw LDEwICsxODAsMTAgQEAgd3hTdHJpbmcgZGxnRXh0ZW5zaW9uOjpHZXRTcWwo KQogCWlmIChleHRlbnNpb24pCiAJewogCQkvLyBlZGl0IG1vZGUKLQkJaWYg KGNiT2JqZWN0c1NjaGVtYS0+R2V0VmFsdWUoKSAhPSBleHRlbnNpb24tPkdl dFNjaGVtYVN0cigpKQorCQlpZiAoIWNiT2JqZWN0c1NjaGVtYS0+R2V0VmFs dWUoKS5Jc0VtcHR5KCkgJiYgY2JPYmplY3RzU2NoZW1hLT5HZXRWYWx1ZSgp ICE9IGV4dGVuc2lvbi0+R2V0U2NoZW1hU3RyKCkpCiAJCQlzcWwgKz0gd3hU KCJBTFRFUiBFWFRFTlNJT04gIikgKyBxdElkZW50KGV4dGVuc2lvbi0+R2V0 TmFtZSgpKQogCQkJICAgICAgICsgIHd4VCgiXG4gIFNFVCBTQ0hFTUEgIikg KyBxdElkZW50KGNiT2JqZWN0c1NjaGVtYS0+R2V0VmFsdWUoKSkgKyB3eFQo IjtcbiIpOwotCQlpZiAoY2JWZXJzaW9uLT5HZXRWYWx1ZSgpICE9IGV4dGVu c2lvbi0+R2V0VmVyc2lvbigpKQorCQlpZiAoIWNiVmVyc2lvbi0+R2V0VmFs dWUoKS5Jc0VtcHR5KCkgJiYgY2JWZXJzaW9uLT5HZXRWYWx1ZSgpICE9IGV4 dGVuc2lvbi0+R2V0VmVyc2lvbigpKQogCQkJc3FsICs9IHd4VCgiQUxURVIg RVhURU5TSU9OICIpICsgcXRJZGVudChleHRlbnNpb24tPkdldE5hbWUoKSkK IAkJCSAgICAgICArICB3eFQoIlxuICBVUERBVEUgVE8gIikgKyBxdElkZW50 KGNiVmVyc2lvbi0+R2V0VmFsdWUoKSkgKyB3eFQoIjtcbiIpOwogCX0K --001a1146de543fa1b0052a14c5a0 Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers --001a1146de543fa1b0052a14c5a0--