Thread: [pgadmin-hackers] [pgAdmin4][PATCH] To handle "char" type in column node

[pgadmin-hackers] [pgAdmin4][PATCH] To handle "char" type in column node

From
Murtuza Zabuawala
Date:
Hi,

PFA minor patch to handle "char" type while creating columns in Column node.

Issue: simplejson parse '"char"' as valid json, hence when we perform simplejson.loads(request.args) operation '"char"' gets converted to 'char'
I had to handle it manually as of now, I did not find any other workaround to handle this issue, I went over several SO question most of them suggested manual handling.
This behavior is only in Column node, table & type nodes are not affectted by .loads() method as we send data as column collection.
RM#2152

Snippet of issue:
import simplejson as json
print(json.loads('"char"')) 

--
Regards,
Murtuza Zabuawala
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Attachment

Re: [pgadmin-hackers] [pgAdmin4][PATCH] To handle "char" type incolumn node

From
Dave Page
Date:
Thanks - applied.

On Mon, Feb 6, 2017 at 10:20 AM, Murtuza Zabuawala
<murtuza.zabuawala@enterprisedb.com> wrote:
> Hi,
>
> PFA minor patch to handle "char" type while creating columns in Column node.
>
> Issue: simplejson parse '"char"' as valid json, hence when we perform
> simplejson.loads(request.args) operation '"char"' gets converted to 'char'
> I had to handle it manually as of now, I did not find any other workaround
> to handle this issue, I went over several SO question most of them suggested
> manual handling.
> This behavior is only in Column node, table & type nodes are not affectted
> by .loads() method as we send data as column collection.
> RM#2152
>
> Snippet of issue:
> import simplejson as json
> print(json.loads('"char"'))
>
> --
> Regards,
> Murtuza Zabuawala
> EnterpriseDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>



--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

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