Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ihTyu-0004qZ-3c for pgadmin-hackers@arkaria.postgresql.org; Wed, 18 Dec 2019 07:42:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ihTys-0002vI-Ev for pgadmin-hackers@arkaria.postgresql.org; Wed, 18 Dec 2019 07:42:50 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1ihTys-0002vB-2Q for pgadmin-hackers@lists.postgresql.org; Wed, 18 Dec 2019 07:42:50 +0000 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ihTyk-0002u3-Qe for pgadmin-hackers@postgresql.org; Wed, 18 Dec 2019 07:42:49 +0000 Received: by mail-ed1-x52f.google.com with SMTP id m8so822328edi.13 for ; Tue, 17 Dec 2019 23:42:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rBU/bb5y9QLNtMURita7o3+GGHGgQ66WF6UUS1HCQWQ=; b=OZJ2qeF1bwJzAFOmCbySb3i38lvDrkEz3YaQtzh561xmK9JKAzSyFEuBUhBWcwQDeK ZB4E4jlen1kJd39YfLDrIP513lPt+eCRND12EPZSa+rrTgGJOar7/HHKQnzkV5rB8HY2 HxQA4mWGSUibnqWya1iK8O5ExIsD4wMqnESCCTRhHgv7YlGp/L/O504/O8BOupe96cUd JrQAC3MUDIqbioERK6YgpfDzzq/77A8C7HSTujMt9sJTTXVaIGxXKyCOXWvJ1K8y4TIL GsMKRyVZJdQYZl5zLbCo9C9bV7l7qX8HNTg7E6u40vkE9FxW/kagW1Vm7MRqlwUkJ9XQ SIDA== 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=rBU/bb5y9QLNtMURita7o3+GGHGgQ66WF6UUS1HCQWQ=; b=bKtEp7EVmdbplWSiYUIKnhpajlZQyh7ztqmm4wVgTX8KXdnvuBFtIIwNs24ImfgAIb XqsCKFraezrl2vORVpM0eMe2KAWXluGTgCQ5HwazmAEJK5OaLkDrNvCPDlM392ma8KOv zLfOJdD12KjiZ3Xoo9CBBimS6C8HHIhePHN5hEkWOKA0f6JHVvmB67sekNxHJGZkt1CT Sg3bwb2iPh59fo2tOLL+HAXZus7rJM03N2IqaEH6hqu2svPXWli6KPBUObMREXcyleio 1UrtfccP4eFJ+aveD+RWFOu8XpG73yBKwxpyHAdkh0dFEOAC1Rp6NZrqhhh1Wg6tOfR1 IvBQ== X-Gm-Message-State: APjAAAViTuslbxJHF/4gJPfkfOVdBl5hKPxrrAaQ6crTvdLr/GFLSnae YrQ1g0oPnpl8GDmBJerkTBijRWihNoTMYb70vdlNuXNSD4xE5EpFYdcyASI23wgYPgZ2HKqo8cN xDzg9wA9wAvc11xz7Mx6/rxuysfLpz/gr/+DfC7glZDD/crTBdvkktmJ8g+xytjqRigxFw+srgJ lrrWfmHwpipE1fKuAEALu6Jk58uNgImaH5vUfMtme4AYeF0xg8+Nxr7WCy X-Google-Smtp-Source: APXvYqzwW2fzZ6uZy8TvlfHCJQ80DlH1L6ZnE9NeansFsnDA/lKEoF2yezvMXmC3+YAISuwZnWdvVDa0t01FODOqtso= X-Received: by 2002:aa7:c946:: with SMTP id h6mr700803edt.186.1576654961115; Tue, 17 Dec 2019 23:42:41 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Aditya Toshniwal Date: Wed, 18 Dec 2019 13:12:04 +0530 Message-ID: Subject: Re: [pgAdmin][RM4988] Refactoring of all the SQL files used by pgAdmin4 To: pgadmin-hackers Cc: Akshay Joshi Content-Type: multipart/mixed; boundary="000000000000e433970599f596e1" X-CLOUD-SEC-AV-Info: edb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --000000000000e433970599f596e1 Content-Type: multipart/alternative; boundary="000000000000e433950599f596df" --000000000000e433950599f596df Content-Type: text/plain; charset="UTF-8" Hi Hackers, Had couple of typos in the previous patch. Although the edit types were passed to the front end, they were not filtered and all the types were displayed in edit table dialog. Kindly find the patch to fix it. On Mon, Dec 16, 2019 at 6:54 PM Akshay Joshi wrote: > Thanks, patch applied. > > On Mon, Dec 16, 2019 at 5:40 PM Aditya Toshniwal < > aditya.toshniwal@enterprisedb.com> wrote: > >> Hi Hackers, >> >> Attached patch which is related to RM4988, reduces the number of hits to edit_mode_types.sql >> (an expensive one). >> Currently, this is query is executed for every column one by one when >> table properties dialog is opened. I've added edit_mode_types_bulk.sql, >> which will fetch the edit types for all the distinct column types used in >> the table in a single DB trip and use that data for each column. >> Also, while generating RE-SQL for columns, edit_mode_types.sql will not >> be executed. >> This will definitely reduce time. >> >> Kindly review. >> >> -- >> Thanks and Regards, >> Aditya Toshniwal >> Sr. Software Engineer | EnterpriseDB India | Pune >> "Don't Complain about Heat, Plant a TREE" >> > > > -- > *Thanks & Regards* > *Akshay Joshi* > > *Sr. Software Architect* > *EnterpriseDB Software India Private Limited* > *Mobile: +91 976-788-8246* > -- Thanks and Regards, Aditya Toshniwal pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune "Don't Complain about Heat, Plant a TREE" --000000000000e433950599f596df Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Hackers,

Had couple of typos in the pr= evious patch. Although the edit types were passed to the front end, they we= re not filtered and all the types were displayed in edit table dialog.
Kind= ly find the patch to fix it.

On Mon, Dec 16, 2019 at 6:54 PM Akshay Jo= shi <akshay.joshi@enter= prisedb.com> wrote:
Thanks, patch applied.

On Mon, Dec 16, 2019 at 5= :40 PM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:
<= div style=3D"font-family:verdana,sans-serif">Hi Hackers,

Attached patch which is related to RM4988, reduce= s the number of hits to=C2=A0edit_mode_types.sql (an expensive one).
Currently, this is query is executed= for every column one by one when table properties dialog is opened. I'= ve added=C2=A0edit_mode_types_bulk.sql, which will fetch the edit types for all the = distinct column types used in the table in a single DB trip and use that da= ta for each column.
Also, while generating RE-SQL for columns,=C2=A0edit_mode_types.sql will not be executed.
This will definitely reduc= e time.

Kindly review.<= /font>

--
Thanks and Regards,
Aditya Toshniwal
Sr. Software Engineer |=C2=A0Ente= rpriseDB India |=C2=A0Pune
"Don't Complain about Heat, Plant a TREE"<= /div>


--
Thanks & Regards
Akshay Joshi
<= font color=3D"#3333FF">Sr. Software Architect=
<= font color=3D"#000000" face=3D"arial, sans-serif">EnterpriseDB Software = India Private Limited
Mobile: +91 976-788-8246=


--
Thanks and Regards,Aditya Toshniwal
pgAdmin Hacker | Sr. S= oftware Engineer |=C2=A0EnterpriseDB India |=C2=A0Pune
"Don't Complain about Heat= , Plant a TREE"
=
--000000000000e433950599f596df-- --000000000000e433970599f596e1 Content-Type: application/octet-stream; name="RM4988.edit_types.typos.patch" Content-Disposition: attachment; filename="RM4988.edit_types.typos.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_k4azmnyw0 ZGlmZiAtLWdpdCBhL3dlYi9wZ2FkbWluL2Jyb3dzZXIvc2VydmVyX2dyb3Vwcy9zZXJ2ZXJzL2Rh dGFiYXNlcy9zY2hlbWFzL3RhYmxlcy9jb2x1bW5zL3V0aWxzLnB5IGIvd2ViL3BnYWRtaW4vYnJv d3Nlci9zZXJ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