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 1l2W5x-0001KX-NI for pgadmin-hackers@arkaria.postgresql.org; Thu, 21 Jan 2021 09:17:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l2W5w-0002XE-LC for pgadmin-hackers@arkaria.postgresql.org; Thu, 21 Jan 2021 09:17:36 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l2W5w-0002X7-G6 for pgadmin-hackers@lists.postgresql.org; Thu, 21 Jan 2021 09:17:36 +0000 Received: from mail-io1-xd36.google.com ([2607:f8b0:4864:20::d36]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1l2W5o-0002ng-NL for pgadmin-hackers@postgresql.org; Thu, 21 Jan 2021 09:17:35 +0000 Received: by mail-io1-xd36.google.com with SMTP id e22so2647256iom.5 for ; Thu, 21 Jan 2021 01:17:28 -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=U0bDssG9eOBnBW5gz/LXnLnFrPLjxy4PZ2nl3care3o=; b=oevmXqQljBIVolgK6dgSZkRuXQLDT8hTzlbyvpOOz3d8d1uHitf0j3SvtptbzYVUrA t2pEBP7lRAEr6kt2ERhMYociYV1mymO/IzAkVl1EirhGeHeyKN3XMNHd7wAnF+zWOrkG BfPTfgWkixx5B8fkNpOiEYaYx8kGFvLf2Z/rdcJ3da64o8rqiFH0swBdzqMa3tEXchF1 uIa7HxacPuMmKeqbmevov1T9VloAdGtMVuPOKysyiYqkhPh1Cn3XB1CJp4sCvwXiGsTd 1QjuRkiXI72F7P41oSV+e3/g1cjvmMVem1w2sNwkrCeqDTrfNrGM7RwndCuui3ZDqyUY mEaw== 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=U0bDssG9eOBnBW5gz/LXnLnFrPLjxy4PZ2nl3care3o=; b=VlSYdKajAIrBRHqxtcdYcU2OmeNWuyRHM1hOZm+DEd3tGV7ogptJsUewUVicAujNxJ xANt/phE2DdJOK+hp+PrNFcb9mYWsCgStB6VA20FAmw7CGctvN+ZjeMLZUPZSp+lk9lA Rx0VGeHyfFclc7iPyY3yhI8PmAYxNeuR+PK5OMDVciH1ehJk5bjwVXi5D4dlykHa8dII RD+nivk2rky71macVS7pwBmP2yIp1Lg/hISNc0iBFeZ61u/CHaAlsigZm9ZrS94s0zlf qQ60rjX+ig90btyNtPAGkA8VCd3Y0JVAXIAmeIk4875P8HR2oAsqE7O998th4aZUf82+ DtNA== X-Gm-Message-State: AOAM531wPd5rHGJ9oEsygF3OSrel73lsPKGiAnEjp5mk1gtundUOCKCY uYBsf99/vSH2jT7TI0oJunnSPAK/2hTOA32S02ouA3AcoRIek24AOObFjeXtOPr1G9dp5BsJtiS D1x4+/tswLEt0jD2LOCkvRarN80i4SlWxJqVeKsBAkS4wvyOUC6rqroy2OColTNQwVNn64det2E ynZnb2WG0bTqGRpoY23HnV2C4NsZt3PDFvRy4jgrixnTdGIf7wOU6Nfzg3Wg== X-Google-Smtp-Source: ABdhPJwnzC2RXOWIoeU30lp3SMjkLrOJaWoHoYLwPkoUb0OHGvhrXj+/lhu6Hdys31kux34WB+jViYoKkYPB4ZIXl8k= X-Received: by 2002:a02:68a:: with SMTP id 132mr11242850jav.53.1611220646360; Thu, 21 Jan 2021 01:17:26 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Akshay Joshi Date: Thu, 21 Jan 2021 14:47:15 +0530 Message-ID: Subject: Re: SonarQube Fixes #4 Database & Foreign Tables To: Rahul Shirsat Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary="000000000000481b3e05b9658af4" 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: Precedence: bulk --000000000000481b3e05b9658af4 Content-Type: text/plain; charset="UTF-8" Hi Rahul Following are the review comments: - Change the name of the function 'get_pg_db_properties'. The function returns lastsysoid and datistemplate only and I assume it is applicable for PG/EPAS both. - Add comments for all the new functions introduce in the patch. On Thu, Jan 21, 2021 at 2:36 PM Rahul Shirsat < rahul.shirsat@enterprisedb.com> wrote: > Hi Hackers, > > Please find the attached patch which resolves the sonar qube issues > relating: > > > 1. *Foreign Tables* -*Refactor this function to reduce its Cognitive > Complexity from 67 to the 15 allowed.* > 2. *Database* -*Refactor this function to reduce its Cognitive > Complexity from 17 to the 15 allowed.* > > > -- > *Rahul Shirsat* > Senior Software Engineer | EnterpriseDB Corporation. > -- *Thanks & Regards* *Akshay Joshi* *pgAdmin Hacker | Principal Software Architect* *EDB Postgres * *Mobile: +91 976-788-8246* --000000000000481b3e05b9658af4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi=C2=A0Rahul

Following are the review = comments:
  • Change the name of the function 'get_pg_db_= properties'. The function returns lastsysoid=C2=A0and datistemplate onl= y and I assume it is applicable for PG/EPAS both.
  • Add comments for = all the new functions introduce in the patch.

On Thu, Jan 21= , 2021 at 2:36 PM Rahul Shirsat <rahul.shirsat@enterprisedb.com> wrote:
Hi Hackers,
<= br>
Please find the attached patch which resolves the sonar qube = issues relating:

  1. Foreign Tables<= /u> -Refactor this = function to reduce its Cognitive Complexity from 67 to the 15 allowed.<= /span>
  2. Database -Refactor this function to reduce its Cognitive = Complexity from 17 to the 15 allowed.
<= br>
--
Rahul Shirsat
Senior Software Engineer=C2=A0|=C2=A0EnterpriseDB=C2=A0Corpora= tion.


--
Thanks & Regards
Akshay Joshi
pgAdmi= n Hacker | Principal Software Architect
EDB Postgres
Mobile: +91 976-788-8246

--000000000000481b3e05b9658af4--