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 1lsjVF-0008KU-5l for pgadmin-hackers@arkaria.postgresql.org; Mon, 14 Jun 2021 10:07:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lsjVD-0003bT-6L for pgadmin-hackers@arkaria.postgresql.org; Mon, 14 Jun 2021 10:07:31 +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 1lsjVC-0003bL-Vv for pgadmin-hackers@lists.postgresql.org; Mon, 14 Jun 2021 10:07:31 +0000 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lsjV8-0006NE-Md for pgadmin-hackers@postgresql.org; Mon, 14 Jun 2021 10:07:29 +0000 Received: by mail-pl1-x631.google.com with SMTP id e1so6271163plh.8 for ; Mon, 14 Jun 2021 03:07:26 -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=5kHBOyni3KU+6bzz7ID5hib3BvzFaCv8hf7PyG1Kz8A=; b=N8vRHFdIo/+MsI3l/SkkZmc4nPa+1rOyJy4jGSdRnvRUosVL0oBFrVb/Ot1e06Ywc4 Uh0Q1aMBkdFqciKx2fit/GicUsr1H5C55DuhbvvJJkwnPAwhP9KPHLZDK7wKwtQBeUcb 0ZHDsVPG9L2vAhqjHblJfODonAY75psbH00+PlN5iZRaxADshnqIuTywKmyMX7c12Vr7 Fs0cE3j/HPJnY0SAaJvm1xXJIHnmwWNTf4iIjxPyl9CtQpP8aDx13shXTw40wRoZwvY2 pnSORHQ2hX2lwoY/1E+OAFUXWBvpYNMthFATEPGXqbCvTYtMqIL59HbJbpMJKFbmqA0B x4GQ== 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=5kHBOyni3KU+6bzz7ID5hib3BvzFaCv8hf7PyG1Kz8A=; b=rWecMVk2qYeOiv4QIFDPazHu0jGARSZDtiRMuADoWbB2/hyBE6zW0+AFTYEVDBusTw CGYRxJIqYY8ODYDJOIpKj1qzxeZ0akZd7g64a9mnG43xA2lir68ZKE25q4x/PfF08ruL hVIDvKgnCx4rrtqjwGpBbMk722w7aUGpRSBGOrahEhSBh0QLodozM9Zw0gB6S8ErU1Qg nCTk4lkXMKUr2YQhNLQL1hgRokxX71p6KFAhd8EYvdpvIou14R13ewJDh8TZKD9oPscT JyxpoiJDrODSMp8GvWRCWT2H788qZCQ3odgavki2aWmnrTrOW1xG79gPtWYyXZMBJEQp KgLg== X-Gm-Message-State: AOAM533NTOimfOIG5+Uqii6DhKugzRf5UUGbNLGOjg6SqJyi+sFjarXy p5FvYeWAmP5af30Z3PRCsJ0skC1KuH6MiNxKqs0nCkSipw7OOA8Api8MjSBOyshl+tFsuKIzSwZ U25L1t5bjZHMAlBrJdocBh36yrT8iklw78O3pga/KXDR9XN6B/W5BbBGSdDRQFKGuyCSK4Bexn7 fFicF9Y9fRXoSyrH7EgyDGX8p38MVeRpuB4ltQ8k5aNmPGWJD1bJrili97OQ== X-Google-Smtp-Source: ABdhPJzRAV2KPujClL/Ssb0mKiDf7lokmJ81haz7NaruwsVq1COSOcDUcXk31/JC8bNzf5dRAtm4BK+jaSnHrvHS0DY= X-Received: by 2002:a17:902:a5c9:b029:f7:9f7e:aa2f with SMTP id t9-20020a170902a5c9b02900f79f7eaa2fmr16221285plq.54.1623665243963; Mon, 14 Jun 2021 03:07:23 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Pradip Parkale Date: Mon, 14 Jun 2021 15:37:12 +0530 Message-ID: Subject: Re: [pgAdmin][RM6520]: pgAdmin4 v 5.3 text export error To: Aditya Toshniwal , Akshay Joshi Cc: pgadmin-hackers Content-Type: multipart/mixed; boundary="0000000000001a07f905c4b706f6" 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 --0000000000001a07f905c4b706f6 Content-Type: multipart/alternative; boundary="0000000000001a07f705c4b706f4" --0000000000001a07f705c4b706f4 Content-Type: text/plain; charset="UTF-8" Hi Aditya and Akshay, Please find the updated patch. I have changed the variable name "data" to 'numeric_cols'. On Fri, Jun 11, 2021 at 7:38 PM Aditya Toshniwal < aditya.toshniwal@enterprisedb.com> wrote: > Hi Pradip, > > Just did a go through to your patch. > The variable "data" which you've formed, will be computed for every row > even though columns won't change. You should move it up and pass it to gen > directly. This will save repeated computations. > Secondly, it should not be named as data. It can be like - numeric_cols or > numeric_keys. > > On Fri, Jun 11, 2021 at 7:17 PM Pradip Parkale < > pradip.parkale@enterprisedb.com> wrote: > >> Hi Hackers, >> >> Please find the attached patch for #6520.Added check to typecast the >> numeric data while downloading the data in CSV format. >> >> -- >> Thanks & Regards, >> Pradip Parkale >> Software Engineer | EnterpriseDB Corporation >> > > > -- > Thanks, > Aditya Toshniwal > pgAdmin hacker | Sr. Software Engineer | *edbpostgres.com* > > "Don't Complain about Heat, Plant a TREE" > -- Thanks & Regards, Pradip Parkale Software Engineer | EnterpriseDB Corporation --0000000000001a07f705c4b706f4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Aditya and Akshay,

Please find the u= pdated patch. I have changed the variable name "data" to 'num= eric_cols'.

On Fri, Jun 11, 2021 at 7:38 PM Aditya Toshniwal <<= a href=3D"mailto:aditya.toshniwal@enterprisedb.com">aditya.toshniwal@enterp= risedb.com> wrote:
Hi Pradip,=

Just did a go through to your patch.=C2=A0
The variable "data&qu= ot; which you've formed, will be computed for every row even though col= umns won't change. You should move it up and pass it to gen directly. T= his will save repeated computations.
Secondly, it should=C2=A0not be named = as data. It can be like - numeric_cols or numeric_keys.

On Fri, Jun 11= , 2021 at 7:17 PM Pradip Parkale <pradip.parkale@enterprisedb.com> wrot= e:
Hi Hackers,

Please find the attached patch for #6520.Added check to typecast the nume= ric data while downloading=C2=A0the data in CSV format.

--
Thanks & Regards,
P= radip Parkale
Software Engineer | EnterpriseDB Corporation


--
Thanks,
Aditya Toshniwal=
pgAdmin hacker=C2=A0| Sr. Software Engineer | edbpostgres.com
&quo= t;Don't Complain about Heat, Plant a TREE"


--
Thanks & Regards,
Pradip Park= ale
Software Engineer | EnterpriseDB Corporation
--0000000000001a07f705c4b706f4-- --0000000000001a07f905c4b706f6 Content-Type: application/octet-stream; name="RM6520_v2.patch" Content-Disposition: attachment; filename="RM6520_v2.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kpwg9f2w0 ZGlmZiAtLWdpdCBhL3dlYi9wZ2FkbWluL3V0aWxzL2RyaXZlci9wc3ljb3BnMi90eXBlY2FzdC5w eSBiL3dlYi9wZ2FkbWluL3V0aWxzL2RyaXZlci9wc3ljb3BnMi90eXBlY2FzdC5weQppbmRleCAw MjUwZTkzMTYuLjM0YjI3NzllMyAxMDA2NDQKLS0tIGEvd2ViL3BnYWRtaW4vdXRpbHMvZHJpdmVy L3BzeWNvcGcyL3R5cGVjYXN0LnB5CisrKyBiL3dlYi9wZ2FkbWluL3V0aWxzL2RyaXZlci9wc3lj b3BnMi90eXBlY2FzdC5weQpAQCAtMjAxLDE3ICsyMDEsMTcgQEAgZGVmIHJlZ2lzdGVyX3N0cmlu Z190eXBlY2FzdGVycyhjb25uZWN0aW9uKToKIGRlZiBudW1lcmljX3R5cGVjYXN0ZXJzKHJlc3Vs dHMsIGNvbm5fb2JqKToKICAgICAjIFRoaXMgZnVuY3Rpb24gaXMgdG8gY29udmVydCBwZyB0eXBl cyB0byBudW1laWMgdHlwZSBjYXN0ZXIKIAotICAgIGRhdGEgPSBbXQorICAgIG51bWVyaWNfY29s cyA9IFtdCiAgICAgZm9yIG9ial90eXBlIGluIGNvbm5fb2JqLmNvbHVtbl9pbmZvOgogICAgICAg ICBpZiBvYmpfdHlwZVsndHlwZV9jb2RlJ10gaW4gVE9fU1RSSU5HX05VTUVSSUNfREFUQVRZUEVT OgotICAgICAgICAgICAgZGF0YS5hcHBlbmQob2JqX3R5cGVbJ25hbWUnXSkKKyAgICAgICAgICAg IG51bWVyaWNfY29scy5hcHBlbmQob2JqX3R5cGVbJ25hbWUnXSkKIAogICAgIGZvciByZXN1bHQg aW4gcmVzdWx0czoKICAgICAgICAgZm9yIGtleSwgdmFsdWUgaW4gcmVzdWx0Lml0ZW1zKCk6CiAg ICAgICAgICAgICBpZiBpc2luc3RhbmNlKHJlc3VsdFtrZXldLAotICAgICAgICAgICAgICAgICAg ICAgICAgICBzdHIpIGFuZCBrZXkgaW4gZGF0YSBhbmQgbm90IHZhbHVlLmlzZGlnaXQoKToKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgc3RyKSBhbmQga2V5IGluIG51bWVyaWNfY29scyBhbmQg bm90IHZhbHVlLmlzZGlnaXQoKToKICAgICAgICAgICAgICAgICByZXN1bHRba2V5XSA9IGZsb2F0 KHJlc3VsdFtrZXldKQotICAgICAgICAgICAgZWxpZiBpc2luc3RhbmNlKHJlc3VsdFtrZXldLCBz dHIpIGFuZCBrZXkgaW4gZGF0YToKKyAgICAgICAgICAgIGVsaWYgaXNpbnN0YW5jZShyZXN1bHRb a2V5XSwgc3RyKSBhbmQga2V5IGluIG51bWVyaWNfY29sczoKICAgICAgICAgICAgICAgICByZXN1 bHRba2V5XSA9IGludChyZXN1bHRba2V5XSkKICAgICByZXR1cm4gcmVzdWx0cwogCg== --0000000000001a07f905c4b706f6--