Re: [pgAdmin][RM5210] pgAdmin4 silently truncates text larger than underlying field size

From: Khushboo Vashi <khushboo(dot)vashi(at)enterprisedb(dot)com>
To: navnath gadakh <navnath(dot)gadakh(at)enterprisedb(dot)com>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: [pgAdmin][RM5210] pgAdmin4 silently truncates text larger than underlying field size
Date: 2020-04-14 11:44:23
Message-ID: CAFOhELdUp98fKpMDr2NF4US_j0nNTN5=Rnz4LY0rcUmFVzkZpw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi Navnath,

You have compared the column's internal size with the length of the value
given by the user.
For example, column having integer would have internal size 4 and if I give
the value 12121 which is the correct input for the field will fail here
because as per your logic column internal size (4) < len(value) (5).

I think this implementation is not correct here.

Thanks,
Khushboo

On Tue, Apr 14, 2020 at 4:33 PM navnath gadakh <
navnath(dot)gadakh(at)enterprisedb(dot)com> wrote:

> Hello Hackers,
> Please find the attached patch for below fixes:
>
> - Added validation for table row data that should not be larger than the
> field size.
> - Rearrange the existing functions to add validation.
> - Added test cases.
>
> Regards,
> Navnath Gadakh
>
>

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Ganesh Jaybhay 2020-04-14 12:06:48 [pgAdmin][4709] Invalid FTS configuration token dictionaries
Previous Message Neel Patel 2020-04-14 11:34:44 Re: RM4292 - Dark mode support for Windows/macOS