[pgAdmin][Patch] RM 5463 - CSV download quotes numeric columns

From: Yogesh Mahajan <yogesh(dot)mahajan(at)enterprisedb(dot)com>
To: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: [pgAdmin][Patch] RM 5463 - CSV download quotes numeric columns
Date: 2020-07-08 10:47:00
Message-ID: CAMa=N=OHt_vZOqDSF+ckFa=Nq18Cuem3tT0HSyhdZe9swNp13Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi,

Please find a patch which fixes the issue of quoting values of numeric data
types like 'bigint, numeric, double precision & real'.

The issue was caused because global type caster are registered for
connection in order to avoid javascript compatibility issue for large size
data types like real, numeric, double precision, bigint.
Typcaster used to cast these data type values into String, causing quotes
to numeric data in downloaded CSV files in case of "CSV quoting = Strings".

As part of fix, type caster is temporarily unregistered for these numeric
data types while creating CSV file & registered back after csv file
creation.

Thanks,
Yogesh Mahajan
QA - Team
EnterpriseDB Corporation

Phone: +91-9741705709

Attachment Content-Type Size
RM5463_v1.patch application/octet-stream 3.3 KB
rm_5463_after.csv text/csv 678 bytes
rm_5463_before.csv text/csv 712 bytes
rm_5463_table_data.png image/png 508.7 KB

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Rahul Shirsat 2020-07-08 12:41:39 Re: [pgAdmin][RM5569] [SQL] Bad display of tables storage parameters in the "SQL" tab (correction of bug #5398 not complete)
Previous Message Rahul Shirsat 2020-07-08 09:29:32 [pgAdmin4][Patch] - SonarQube Fixes