Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lqDdo-0003A7-RM for pgadmin-hackers@arkaria.postgresql.org; Mon, 07 Jun 2021 11:42:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lqDdn-0002nH-SR for pgadmin-hackers@arkaria.postgresql.org; Mon, 07 Jun 2021 11:41:59 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lqDar-0000cL-Tq for pgadmin-hackers@lists.postgresql.org; Mon, 07 Jun 2021 11:38:58 +0000 Received: from mail-io1-xd31.google.com ([2607:f8b0:4864:20::d31]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lqDal-0005Rn-1I for pgadmin-hackers@postgresql.org; Mon, 07 Jun 2021 11:38:56 +0000 Received: by mail-io1-xd31.google.com with SMTP id b14so2848617iow.13 for ; Mon, 07 Jun 2021 04:38:50 -0700 (PDT) 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=CnBolqDDG8u4mDS6VVppJqgfsVPfo0ZiU+1yEgoEe8E=; b=lj51LSOOjoHqgEV6X7dLWvKz4gx6PcWf+Ja3Ho6P5tytFuDvqTrsDcM9YBcRmUFjXB XY92atZaMBrD09Y9JUNIbNFwexBMQPenrcmUoPG2Z97VezACspw+G534Kvy7IdGzcOkP LSVD22bAXqChmKLPdB2fTl1FySieZGVOU23IlXTcojH+Vba/lG8a5IP0h+idD7zcundF joaG2coAfIFvJ8mm1sE/J/8XIDHH1VV75ungwWiRt1jqaF6uwOEkRwSUrvcNfuix/GhM wdC+/e/tw1Ow4N5S7dbdc0nVclonzUIe70KH9TrIjl/BcVy88JcNyjuaDGYIOdvUycMj t96w== 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=CnBolqDDG8u4mDS6VVppJqgfsVPfo0ZiU+1yEgoEe8E=; b=qmBK8sXAAWUfoRztwfzH0fBx8p5PcSPL/dquFuVNqPTuLm+O/KMKfDa+5EnKnIC9Eu DR/XAzw811J8Jnl6hWCmYrREVbGl5DFcTiy2eVX4D3xA3ArVeHJWi88Gg3OWbvLUJbvK 7toR4j8W1yrWFqWAyCFVT4dkM/Dt2DDPNhQVdUXtQGrDtjbxxN1CYTwGUoYwpQhLT5yA b9msCJGHKx4Cp2Z7ztr4rZqGIIvcSaQ8m6D1GOHfp8goHzRhYExULoQ5Q/swh4v6uQbc PlNFVXUNrpKrD00ZbgVjIS1Wg6Qt0QYJIsWGnr20N1WCzBD7q03rK2jt2Xlf2n5ne4pM Lrnw== X-Gm-Message-State: AOAM533AtMG0nQJVA+panElUq1BwJjfUbjm+MHuwc7+v3MyAxKUU3kH4 +10BQS6sNjpwdIFSIs8G8YNRFoCF3NyF9UkxEtr4Ggo9KBz5vEhs6GV/M6LEMDyB4s3cMvnID8h TIOyBeuOYLxYjN984/yUcbT9d3pQxNYl+hrY99R/YarmCywX6ahRN2fZnqueEPn+4VYvTQVVBI2 WqJtxqpWg5rVAUsZ7mzPQr6E/Sr7ZFr1zOOJs/bpiuI5KuLixzhaVGsJuUEA== X-Google-Smtp-Source: ABdhPJzv+l8mPCIiLlBczyyIMkEM/uQkvFeqTauxlUJfcp+HxbJqKVpU4m9qfKUt+nNK/HXwkFbjHnFz5ztn3zNwJzg= X-Received: by 2002:a05:6602:34d:: with SMTP id w13mr3812484iou.33.1623065930193; Mon, 07 Jun 2021 04:38:50 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Rahul Shirsat Date: Mon, 7 Jun 2021 17:08:14 +0530 Message-ID: Subject: Re: [Patch][pgAdmin] RM4203 Rename Database by another user To: Akshay Joshi Cc: pgadmin-hackers Content-Type: multipart/mixed; boundary="00000000000037ced405c42b7cc2" X-CLOUD-SEC-AV-Info: enterprisedb,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: Archived-At: Precedence: bulk --00000000000037ced405c42b7cc2 Content-Type: multipart/alternative; boundary="00000000000037ced305c42b7cc0" --00000000000037ced305c42b7cc0 Content-Type: text/plain; charset="UTF-8" Hi Akshay, Please find the updated patch below for your reference. I have added an extra check for verifying the database rename. Sorry for the inconvenience caused. On Tue, Jun 1, 2021 at 8:50 PM Akshay Joshi wrote: > Thanks, the patch applied. > > On Sun, May 30, 2021 at 12:03 AM Rahul Shirsat < > rahul.shirsat@enterprisedb.com> wrote: > >> Hi Akshay, >> >> On Thu, May 27, 2021 at 12:19 PM Akshay Joshi < >> akshay.joshi@enterprisedb.com> wrote: >> >>> Hi Rahul >>> >>> Following are the review comments: >>> >>> - Why you have changed the order of the toolbar button on the >>> browser tree? It should not. >>> >>> Changes were related to the wcDocker issue showing >> reverse order buttons, so had to change in the pgAdmin app to reflect it >> correctly. >> >>> >>> - *sqleditor.js (check_db_name_change function)* >>> - var declaration should be comma-separated instead of writing var, >>> again and again. >>> >>> Done. >> >>> >>> - Add proper comments. >>> >>> This too is taken care of. >> >>> >>> - Remove dots from the string "Database moved/renamed.." >>> >>> Done. >> >>> >>> - "Please note that the database you are working on has been moved >>> or renamed to ${data.actual_db_name}. Refresh databases in browser panel or >>> click OK to continue.." should be changed to "Current database has been >>> moved or renamed to ${data.actual_db_name}. Click on the OK button to >>> refresh the database name." >>> >>> Done. >> Also have done some code refactoring. >> >>> >>> >>> On Wed, May 26, 2021 at 2:07 PM Rahul Shirsat < >>> rahul.shirsat@enterprisedb.com> wrote: >>> >>>> Hi Hackers, >>>> >>>> Please find the attached patch which resolves the issue of renaming the >>>> database by another user. >>>> >>>> A minor issue of navigation button alignment is also fixed in this >>>> patch. >>>> >>>> -- >>>> *Rahul Shirsat* >>>> Senior Software Engineer | EnterpriseDB Corporation. >>>> >>> >>> >>> -- >>> *Thanks & Regards* >>> *Akshay Joshi* >>> *pgAdmin Hacker | Principal Software Architect* >>> *EDB Postgres * >>> >>> *Mobile: +91 976-788-8246* >>> >> >> >> -- >> *Rahul Shirsat* >> Senior Software Engineer | EnterpriseDB Corporation. >> > > > -- > *Thanks & Regards* > *Akshay Joshi* > *pgAdmin Hacker | Principal Software Architect* > *EDB Postgres * > > *Mobile: +91 976-788-8246* > -- *Rahul Shirsat* Senior Software Engineer | EnterpriseDB Corporation. --00000000000037ced305c42b7cc0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Akshay,

Please find the updated = patch below for your=C2=A0reference. I have added an extra check for verify= ing the database rename.
Sorry for the inconvenience caused.

On Tue, Jun 1, 2021 at 8:50 PM Akshay Joshi <akshay.joshi@enterprisedb.com&= gt; wrote:
Thanks, the patch applied.

On Sun, May 30, 2021 at 12:03 AM = Rahul Shirsat <rahul.shirsat@enterprisedb.com> wrote:
Hi Akshay,

On Thu, May 27, 2021 at 12:19 PM Akshay Joshi <akshay.joshi@en= terprisedb.com> wrote:
Hi=C2=A0Rahul

Following a= re the review comments:
  • Why you have changed the order of= the toolbar button on the browser tree? It should not.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= Changes were related to the wcDocker issue showing reverse order buttons, s= o had to change in the pgAdmin app to=C2=A0reflect it correctly.
  • = sqleditor.js (check_db_name_change function)
    • var dec= laration=C2=A0should be comma-separated instead of writing var, again and a= gain.
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Done.=C2= =A0
    • Add proper comments.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 This too is taken care of.=C2=A0
    • Rem= ove dots from the string "Database moved/renamed.."
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Done.=C2=A0
    • = "Please note that the database you are working on has been moved or re= named to ${data.actual_db_name}. Refresh databases in browser panel or clic= k OK to continue.." should be changed to "Current database has be= en moved or renamed to=C2=A0${data.actual_db_name}. Click on the OK button = to refresh the database name."=C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Done.=C2=A0
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0Also have done some code refactoring.


On Wed, May 26, 2021= at 2:07 PM Rahul Shirsat <rahul.shirsat@enterprisedb.com> wrote:
Hi Ha= ckers,

Please find the attached patch which resolves the= issue of renaming the database by another user.

A= minor issue of navigation button alignment is also fixed in this patch.

--
Rahul Shirsat=
Senior Software Engineer=C2=A0|=C2=A0Enterp= riseDB=C2=A0Corporation.


--
Thank= s & Regards
Akshay Joshi
pgAdmin Hacker | Principal Softw= are Architect
EDB Po= stgres
Mobile: +91 976-788-8246



--
Rahul Shirsat
Senior Software Engin= eer=C2=A0|=C2=A0EnterpriseDB=C2=A0Corporation.


--
Thank= s & Regards
Akshay Joshi
pgAdmin Hacker | Principal Softw= are Architect
EDB Po= stgres
Mobile: +91 976-788-8246



--
Rahul Shirsat
Senior Software Engin= eer=C2=A0|=C2=A0EnterpriseDB=C2=A0Corporation.
--00000000000037ced305c42b7cc0-- --00000000000037ced405c42b7cc2 Content-Type: application/x-patch; name="RM4203_v3.patch" Content-Disposition: attachment; filename="RM4203_v3.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kpmimtxe0 ZGlmZiAtLWdpdCBhL3dlYi9wZ2FkbWluL3Rvb2xzL3NxbGVkaXRvci9fX2luaXRfXy5weSBiL3dl Yi9wZ2FkbWluL3Rvb2xzL3NxbGVkaXRvci9fX2luaXRfXy5weQppbmRleCA4ODRjYzhiZTAuLjc4 MGMwMjQzZiAxMDA2NDQKLS0tIGEvd2ViL3BnYWRtaW4vdG9vbHMvc3FsZWRpdG9yL19faW5pdF9f LnB5CisrKyBiL3dlYi9wZ2FkbWluL3Rvb2xzL3NxbGVkaXRvci9fX2luaXRfXy5weQpAQCAtNTA1 LDYgKzUwNSw4IEBAIGRlZiBwb2xsKHRyYW5zX2lkKToKIAogICAgIHRyYW5zYWN0aW9uX3N0YXR1 cyA9IGNvbm4udHJhbnNhY3Rpb25fc3RhdHVzKCkKICAgICBkYXRhX29ialsnZGJfbmFtZSddID0g Y29ubi5kYgorICAgIGRhdGFfb2JqWydkYl9pZCddID0gdHJhbnNfb2JqLmRpZCBcCisgICAgICAg IGlmIHRyYW5zX29iaiBpcyBub3QgTm9uZSBhbmQgaGFzYXR0cih0cmFuc19vYmosICdkaWQnKSBl bHNlIDAKIAogICAgIHJldHVybiBtYWtlX2pzb25fcmVzcG9uc2UoCiAgICAgICAgIGRhdGE9ewpk aWZmIC0tZ2l0IGEvd2ViL3BnYWRtaW4vdG9vbHMvc3FsZWRpdG9yL3N0YXRpYy9qcy9zcWxlZGl0 b3IuanMgYi93ZWIvcGdhZG1pbi90b29scy9zcWxlZGl0b3Ivc3RhdGljL2pzL3NxbGVkaXRvci5q cwppbmRleCAzMzU0NzIyM2UuLjNlOTFmNDI0YSAxMDA2NDQKLS0tIGEvd2ViL3BnYWRtaW4vd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