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 1irFW1-0000kv-Bi for pgadmin-hackers@arkaria.postgresql.org; Tue, 14 Jan 2020 06:17:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1irFVz-0000uo-U6 for pgadmin-hackers@arkaria.postgresql.org; Tue, 14 Jan 2020 06:17:23 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1irFVz-0000uh-Eo for pgadmin-hackers@lists.postgresql.org; Tue, 14 Jan 2020 06:17:23 +0000 Received: from mail-io1-xd30.google.com ([2607:f8b0:4864:20::d30]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1irFVs-0006zO-Dj for pgadmin-hackers@postgresql.org; Tue, 14 Jan 2020 06:17:21 +0000 Received: by mail-io1-xd30.google.com with SMTP id k24so12558558ioc.4 for ; Mon, 13 Jan 2020 22:17:16 -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=E702sHmVVFRv0NksLm4QalyrV5ZA884az+0p4WlERZk=; b=j7zzUmNNwRe15cBr5UHGf6h+8fN8qRPhGfGSc34fqbgzA0ypOo5vm1bvExB0NlvCy0 r1J3+sdtlLrchW/X/sz4osimL2vm4FB+bVvhuVK0Dhz/QmsDlgXRH8Ah4CbHzmJ/mApD aw5R9GUcm2+MeUEHWP8PGZWWwU0wRoK8KqEoGmeIb5c6SN+GG6PAQDZQzM56EFagl8yt uPcgIZSE0xgqSxNWIcv/rMAEqZZrExxQh9b3punQSYe8ovvYt7RvJRZh4LTtD7gOIUOL nlSpvSg2JyxRpvG9BC+caBGALoNmmYY8gwcqr1ifgrbsS0zViyBJlHPaECF3itmMgRU9 uu1Q== 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=E702sHmVVFRv0NksLm4QalyrV5ZA884az+0p4WlERZk=; b=Ehb2brd9jaaPGNsLZbH5Y2mplRLnCBywyw/aEJJIBI/PPanOacSgMhhRcmSf90XCkz y0aivdUsUrj3oGIIJ6km31rUiQ0cdhDSnho/F5h8dhho+yiXBJqfMr2baC0e1Q5/SZ80 UllQC8MxC1CRG33nFfWSjFzQWI/xwRUQIVGnxmCwv50FG8TrnAXJlplwIFpd1GaHvLgl tR+NY6Q0BqLbSziSekJhPtas+zUzpZqNe+L92IFJ/rsP8uIT3W9eeas+r/0KMjqJ7Y7Q jlJ0sdMP1A9P5lC9H5LOQmis0iQl2Z9N4RHxG591vQAUpx2ZBInrRm8Ay6aajduHWyyW hnWA== X-Gm-Message-State: APjAAAV7FvCo7XChh9nKeqStj0XhtfIsUYwFN11xRMeQ5j2K+BXZnNA5 drAYf7SBJ58siWk532xRAPGcscwBmL+cqqKdazgP+hhLWn1KeELMJ2kiCFc3VCxxjPfqEfSp2CV 8RpIturYdsMi3Q5qXOqoapcF7C5uGpF0zjCNm4/ltfSxQy23OGoi8QfJOydo0+oz8rJiGCjIVny k3ImpWjaNOkxwrcYym+RdjeOYS7bC5/M2dbcWK0c+K5OLp7p6E+2D/IOZ2 X-Google-Smtp-Source: APXvYqy3vdsiyUBT4lllLnEzfizgslvgiqAOmpYuop5SPhHze+IZ0MGq01j5ww+FDUarKWbr9yVdlQrO0Gbv21fB8Mc= X-Received: by 2002:a02:13c2:: with SMTP id 185mr17821772jaz.0.1578982635256; Mon, 13 Jan 2020 22:17:15 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Akshay Joshi Date: Tue, 14 Jan 2020 11:47:04 +0530 Message-ID: Subject: Re: [pgAdmin4][Patch]: RM 5053 - Getting an error while changing the columns in the existing view To: Khushboo Vashi Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary="00000000000014dc9e059c138b9b" 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 --00000000000014dc9e059c138b9b Content-Type: text/plain; charset="UTF-8" Hi Khushboo Following are the review comments: - Fix the PEP8 issue. - Drop query should be part of the jinja template for consistency. Currently, it is added through the python file. - Any changes in the view code should not warn the user "Changing the columns in a view requires dropping...." and we should not drop the view. For example, I have only change the WHERE clause or added 'ORDER BY'. On Tue, Jan 14, 2020 at 10:27 AM Khushboo Vashi < khushboo.vashi@enterprisedb.com> wrote: > Hi, > > Please find the attached patch for RM #5053 - Getting an error while > changing the columns in the existing view. > > PostgreSQL doesn't allow to change the view columns. So, while performing > this task the existing view should be dropped first and then recreate it > and also user will get a warning first. > > Thanks, > Khushboo > -- *Thanks & Regards* *Akshay Joshi* *Sr. Software Architect* *EnterpriseDB Software India Private Limited* *Mobile: +91 976-788-8246* --00000000000014dc9e059c138b9b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi=C2=A0Khushboo

Following are the revi= ew comments:
  • Fix the PEP8 issue.
  • Drop query shoul= d be part of the jinja template for consistency. Currently, it is added thr= ough the python file.
  • Any changes in the view code should not warn = the user "Changing the columns in a view requires dropping...." a= nd we should not drop the view. For example, I have only change the WHERE c= lause or added 'ORDER BY'.=C2=A0




--
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=
--00000000000014dc9e059c138b9b--