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.92) (envelope-from ) id 1jGel2-0006TX-Jg for pgadmin-hackers@arkaria.postgresql.org; Tue, 24 Mar 2020 08:17:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jGel0-0003jh-Vh for pgadmin-hackers@arkaria.postgresql.org; Tue, 24 Mar 2020 08:17:54 +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 1jGel0-0003ja-Kr for pgadmin-hackers@lists.postgresql.org; Tue, 24 Mar 2020 08:17:54 +0000 Received: from mail-lj1-x232.google.com ([2a00:1450:4864:20::232]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jGekt-0001U6-II for pgadmin-hackers@postgresql.org; Tue, 24 Mar 2020 08:17:53 +0000 Received: by mail-lj1-x232.google.com with SMTP id f20so1725120ljm.0 for ; Tue, 24 Mar 2020 01:17:47 -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=QeI23cSr4j6SbpOLenxaekves4oj9zEuPUFIhUmfGWE=; b=goVzfAZGHiB5U7fyrcJEYylUX6pjNi2i0dB1VTxo2wuQRwcI2AfpEzMunx6w3HKYT9 v0gqJWb7YA6OAfh9BjqrrHLp3JN6N6xc2RvL53W6skVK7Nxz2qgtNfvaV3TMhP/7FEiP ACtrr+wELP/C6/aI/valkuhAILaTUqOM3QT5+XWh9V84SsynXz1CKmhbdvJln2quAZvr Qzi2LGbu64TNmbfMtjop8w5gCTLwSmxiEPlg9GmoFP0ih2rFkKcLZVv/f6P1qTYxP4P5 jLhLgKApMZzG/L2NLHpMpgT0kgG+O0OXaJAYxj1LcUPzJcj42t6Huybr2QXhcLEXGBkB voPw== 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=QeI23cSr4j6SbpOLenxaekves4oj9zEuPUFIhUmfGWE=; b=OxsdcK8YgZMFsZR83Ixgye2dX1c4+eb0Zp7QvxSKaDnGeavO1aFR09y5ib8kFHMtQw WH5aV6yww+1CE+ic9r3XEpJaYfMrgJ9lO8RVsXlOi7t0CM1KRArg4KP19Pg11d5mqCSW uMej5N7JwUbWgk68T2NWqUFgOCqnq1EGKl7nVAVxaYJnEGdYe8C8YMbr8ozt30dqZaUy kZ1Nif4xWVlXBUJ0P0DepgeVpT+Qsh/qoJ36xyG2Bjq6FiPVBDAOmXaFFkPTBW66uLTE d2+xmHAQfCbtDkGIQa1HTHgeTwFizcr9ksbLT0UY/feQukxY8smPqvyS/XVN0gFHjeWV HGEw== X-Gm-Message-State: ANhLgQ33KhoralegS2mDdl4dkgPrDGEmrsCR0x8f/R+Dz3l8ROkruOVq P35zlXYpEU8eLzZwQP/2zw/Z0xtYr1zVOyKJMprAojF+S/bCmmkajOZ8STXNVr2/o0ZqQ9vY5ok HwrE2cAeSetcy+ldSpSUIENQdre25JiV0pONttSSB59X+G+BuJe6EGjQYCpuFA5vFbcR8z4LqIm SOznw2NozCPJS0+gDuFdNYp3aCw3Ah4/Vhlw+jjNMgTp7NU8p0C4c= X-Google-Smtp-Source: ADFU+vtAliQ+di9f0PARR5pUmd3j6XqUujae7mPol0Kug27ETsmzMw/nHJvSZ1BXWW8e94vixtNBuGjre+UMd0HSmyE= X-Received: by 2002:a2e:9194:: with SMTP id f20mr5695179ljg.33.1585037865232; Tue, 24 Mar 2020 01:17:45 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Khushboo Vashi Date: Tue, 24 Mar 2020 13:47:37 +0530 Message-ID: Subject: Re: [pgAdmin4][Patch]: RM 5053 - Getting an error while changing the columns in the existing view To: Akshay Joshi Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary="000000000000e9bfc805a19562b6" 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 --000000000000e9bfc805a19562b6 Content-Type: text/plain; charset="UTF-8" Hi Akshay, On Tue, Jan 14, 2020 at 11:47 AM Akshay Joshi wrote: > 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. > > The Delete query is already in the template file, I have just reused the delete call and merged the SQL queries in 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'. > > I have tested but couldn't reproduce this issue. Can you please let me know the proper use case? Thanks, Khushboo > > > 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* > --000000000000e9bfc805a19562b6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Akshay,

On Tue, Jan 14, 2020 at 11:47 A= M Akshay Joshi <akshay.= joshi@enterprisedb.com> wrote:
Hi=C2=A0Khushboo

= Following are the review comments:
  • Fix the PEP8 issue.
  • Drop query should be part of the jinja template for consistency. Curr= ently, it is added through the python file.
The Delete query is already in the template file, I have just reuse= d the delete call and merged the SQL queries in the python file.=C2=A0
  • Any changes in the view code should not warn the user "Changing = the columns in a view requires dropping...." and we should not drop th= e view. For example, I have only change the WHERE clause or added 'ORDE= R BY'.=C2=A0
  • I have tested but= =C2=A0 couldn't reproduce this issue.=C2=A0 Can you please let me know = the proper use case?

    Thanks,
    Khushboo
    = =C2=A0

    On Tue, Jan 14, 2020 at 10:27 AM Khu= shboo Vashi <khushboo.vashi@enterprisedb.com> wrote:
    Hi,

    Please find the attached patch for RM #5053 -=C2=A0Getting an error= while changing the columns in the existing view.

    = PostgreSQL doesn't allow to change the view columns. So, while performi= ng 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
    <= 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=
    --000000000000e9bfc805a19562b6--