Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1etF71-0000x7-T0 for pgadmin-hackers@arkaria.postgresql.org; Tue, 06 Mar 2018 16:06:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1etF6z-0006lN-1l for pgadmin-hackers@arkaria.postgresql.org; Tue, 06 Mar 2018 16:06:45 +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_SHA384:256) (Exim 4.89) (envelope-from ) id 1etF6y-0006lC-PC for pgadmin-hackers@lists.postgresql.org; Tue, 06 Mar 2018 16:06:44 +0000 Received: from mail-it0-x22b.google.com ([2607:f8b0:4001:c0b::22b]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1etF6t-0003xe-7x for pgadmin-hackers@postgresql.org; Tue, 06 Mar 2018 16:06:43 +0000 Received: by mail-it0-x22b.google.com with SMTP id u5so15384951itc.1 for ; Tue, 06 Mar 2018 08:06:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pivotal-io.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=b09ANhIdbg28a2oJVJX9mYMfo3qwhikFUVgOKy4PI8A=; b=0oCvdRmAwtZgLBsTysoYdhQVH1OZEk1haog/2eJMeT03E0GekDTca5Ub5/9WpaReSr qifBIhbnreejB5sNFNlnR1X275FVThgau/WJmH3qRGccAPh0+iLo/9T1jLVE673NKBG2 r/CeG/9LGgURx3TrOiC0GOOAqKo/lr5ibuRc3pu/G2K0dJjDJU6P0KfTcb31l9udUbt7 qyHkteijGkKWUIPte/FvGK7KTjpqL8KISgm5jK6HrkIyDGxQ/SkMkjDuS284ppaUC9Ir DU0GZ3oB34lHje0K+sPAsA/uolf+gY+6GceVU32H0Xx34Y2j0q4GEOaIP0wDUdwBAgnP Gq1Q== 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=b09ANhIdbg28a2oJVJX9mYMfo3qwhikFUVgOKy4PI8A=; b=auvOmoIJIWn+dBW/kFv97Mp4xb27Gk5mjClWBEen98R4mUFQHIDP005cpENgNBl2wD 8LH+IlCQUPp8ZUelhjGIfLRiwUNPoE3Z/PhxFBDU6kQJ2EOPqndd97n7ZcKoiRTkLfap VjaQLnX7GxNvVbg1K3L6NWz2pU1LyjscfADxoz79Uf4qk7vKE3hvy+IljucqZQMPRary XQ3YbdDdyqpSXoGF9VMFj85OXtGw1vDusSPlWEjlOGxJmLVKtxCX5N9tOqqgHbuWyx3F J1vygG/P2oLg6X93WOYXeNpo2JDUYHJYKDBnkDmOCkKVZrK45H6ykoolbExJPFbLxY9v huOQ== X-Gm-Message-State: AElRT7HSwMzCQTGyFdXh+DepQuXeZTQJLsYHn6juiaK/c3Um+A5Gjofb A6peqsx3a4hTtrBhJaPG4Tpk/7TyqymnEuEQk6Lvtg== X-Google-Smtp-Source: AG47ELuy725WRiEiM46OhqaCh78Pmbz+wkI3kf32Yn4awUJi+ql/aylHbDbIXyI8pKBonfH7qun51p5nJtxkyhhyMSY= X-Received: by 10.36.203.67 with SMTP id u64mr17713355itg.133.1520352396196; Tue, 06 Mar 2018 08:06:36 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Joao De Almeida Pereira Date: Tue, 06 Mar 2018 16:06:25 +0000 Message-ID: Subject: Re: [pgAdmin4][RM#2989] To fix the issue in Table node To: Murtuza Zabuawala Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary="94eb2c0af8488259700566c0a0cd" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --94eb2c0af8488259700566c0a0cd Content-Type: text/plain; charset="UTF-8" Hi Murtuza, The code change works, and I passed the patches through our pipeline and everything is green. Personally I would love this bug fixes to have refactored the function into smaller chunk and made it more readable so that the next time someone need to check out a problem in the same area it is easier. I understand that without a good test coverage it is hard to have confidence while refactoring, but we need to start somewhere. @Hackers Here is a video that I saw some time ago about refactoring existing code and code complexity that is very interesting https://www.youtube.com/watch?v=8bZh5LMaSmE In this video Sandi Metz does the Gilded Rose Kata in a talk in RailsConf 2014, and with it tries to demonstrate that code can be refactored and with that it make the code much more simpler. But the journey is not always simple and the complexity will increase before it get simpler. It is a good example of something that we can try with our code. Thanks Joao On Tue, Mar 6, 2018 at 4:23 AM Murtuza Zabuawala < murtuza.zabuawala@enterprisedb.com> wrote: > Hi, > > PFA patch to fix the issue in Table node where wrong sql was generated > while altering column. > > -- > Regards, > Murtuza Zabuawala > EnterpriseDB: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > > --94eb2c0af8488259700566c0a0cd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Murtuza,

The code change works, and = I passed the patches through our pipeline and everything is green.
Personally I would love this bug fixes to have refactored the function in= to smaller chunk and made it more readable so that the next time someone ne= ed to check out a problem in the same area it is easier. I understand that = without a good test coverage it is hard to have confidence while refactorin= g, but we need to start somewhere.

@Hackers
<= div>Here is a video that I saw some time ago about refactoring existing cod= e and code complexity that is very interesting
In this video Sandi Metz does the Gilded Rose = Kata in a talk in RailsConf 2014, and with it tries to demonstrate that cod= e can be refactored and with that it make the code much more simpler. But t= he journey is not always simple and the complexity will increase before it = get simpler. It is a good example of something that we can try with our cod= e.


Thanks
Joao

On Tue, Mar 6, 2018 at 4:2= 3 AM Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:
Hi,

=
PFA patch to fix the issue in Table node where wrong sql was gener= ated while altering column.

--
Regards,
Murtuza Zabuawala
= EnterpriseDB:=C2=A0http://www.enterprisedb.com
The Enterprise Pos= tgreSQL Company

--94eb2c0af8488259700566c0a0cd--