Re: Array representation and save array data from datagrid [RM2671][pgAdmin4]

From: Harshal Dhumal <harshal(dot)dhumal(at)enterprisedb(dot)com>
To: Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: Array representation and save array data from datagrid [RM2671][pgAdmin4]
Date: 2017-09-15 12:46:59
Message-ID: CAFiP3vyLU7DFG=Czbx6jqB-RKm_UNyFxgSFASyyDTxc7tbce=Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi Akshay,

It's not issue; Try without quotes. As char data type stores only one
character so it's storing only leading quote (') and
truncating remaining characters (a').
Only exception is when you want to store empty string (char) use two quotes
(either single or double)
they will translated before sending to server.

Apart from this I found that data types "char" and "char"[] (alias to
character and character[] respectively)
were not taken into consideration in sqleditor.js. I have attached updated
patch which fixes this issue.

--
*Harshal Dhumal*
*Sr. Software Engineer*

EnterpriseDB India: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

On Thu, Sep 14, 2017 at 5:31 PM, Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com
> wrote:

> Hi Harshal
>
> I have reviewed your patch it looks good to me. Only one issue I have
> found with char[], when I store {'a','b','c'} it gets stored and when I
> refreshed it shows {',','}. Please look into this issue.
>
> On Thu, Sep 14, 2017 at 3:54 PM, Akshay Joshi <
> akshay(dot)joshi(at)enterprisedb(dot)com> wrote:
>
>> It works, sorry for the noise.
>>
>> On Thu, Sep 14, 2017 at 3:48 PM, Akshay Joshi <
>> akshay(dot)joshi(at)enterprisedb(dot)com> wrote:
>>
>>> Harshal,
>>>
>>> Can you please rebase the patch, it's not applied with the latest code.
>>>
>>> On Tue, Sep 12, 2017 at 2:37 PM, Akshay Joshi <
>>> akshay(dot)joshi(at)enterprisedb(dot)com> wrote:
>>>
>>>>
>>>>
>>>> On Tue, Sep 12, 2017 at 2:34 PM, Dave Page <dpage(at)pgadmin(dot)org> wrote:
>>>>
>>>>> Adding Akshay...
>>>>>
>>>>
>>>> Sure.
>>>>
>>>>>
>>>>> On Tue, Sep 12, 2017 at 10:04 AM, Dave Page <dpage(at)pgadmin(dot)org> wrote:
>>>>>
>>>>>> Akshay, can you review/commit this please?
>>>>>>
>>>>>> On Mon, Sep 11, 2017 at 3:40 PM, Harshal Dhumal <
>>>>>> harshal(dot)dhumal(at)enterprisedb(dot)com> wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> Please find attached patch to represent array data in datagrid with
>>>>>>> curly braces and
>>>>>>> also allow user to save array with values like <null>, <empty
>>>>>>> string>, '*""*' and "*''*"
>>>>>>>
>>>>>>> --
>>>>>>> *Harshal Dhumal*
>>>>>>> *Sr. Software Engineer*
>>>>>>>
>>>>>>> EnterpriseDB India: http://www.enterprisedb.com
>>>>>>> The Enterprise PostgreSQL Company
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Dave Page
>>>>>> Blog: http://pgsnake.blogspot.com
>>>>>> Twitter: @pgsnake
>>>>>>
>>>>>> EnterpriseDB UK: http://www.enterprisedb.com
>>>>>> The Enterprise PostgreSQL Company
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Dave Page
>>>>> Blog: http://pgsnake.blogspot.com
>>>>> Twitter: @pgsnake
>>>>>
>>>>> EnterpriseDB UK: http://www.enterprisedb.com
>>>>> The Enterprise PostgreSQL Company
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> *Akshay Joshi*
>>>> *Principal Software Engineer *
>>>>
>>>>
>>>>
>>>> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
>>>>
>>>
>>>
>>>
>>> --
>>> *Akshay Joshi*
>>> *Principal Software Engineer *
>>>
>>>
>>>
>>> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
>>>
>>
>>
>>
>> --
>> *Akshay Joshi*
>> *Principal Software Engineer *
>>
>>
>>
>> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
>>
>
>
>
> --
> *Akshay Joshi*
> *Principal Software Engineer *
>
>
>
> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
>

Attachment Content-Type Size
RM2671_v2.patch text/x-patch 35.1 KB

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2017-09-15 12:50:09 pgAdmin 4 commit: Fix filtering of system schemas so pg_* is hidden but
Previous Message Atul Sharma 2017-09-15 07:59:21 Re: pgAdmin 4 commit: Bundle fonts with pgAdmin so we have a standard set f