public inbox for [email protected]  
help / color / mirror / Atom feed
From: Aditya Toshniwal <[email protected]>
To: pgadmin-hackers <[email protected]>
Cc: Akshay Joshi <[email protected]>
Subject: Re: [pgAdmin][RM4988] Refactoring of all the SQL files used by pgAdmin4
Date: Wed, 18 Dec 2019 13:12:04 +0530
Message-ID: <CAM9w-_nwTMzSpDzp4Xb=8unmrzDD3-anma88AtcAiNNtCuk6XA@mail.gmail.com> (raw)
In-Reply-To: <CANxoLDdJXME7ZdSoD5ewZWpG8csOfPjuc3mh_W8UqY=-_V2z_Q@mail.gmail.com>
References: <CAM9w-_mgjt9ju6057rQi87XpaA5CXSnwkYa=pgLf7wvW4nCs-g@mail.gmail.com>
	<CANxoLDdJXME7ZdSoD5ewZWpG8csOfPjuc3mh_W8UqY=-_V2z_Q@mail.gmail.com>

Hi Hackers,

Had couple of typos in the previous patch. Although the edit types were
passed to the front end, they were not filtered and all the types were
displayed in edit table dialog.
Kindly find the patch to fix it.

On Mon, Dec 16, 2019 at 6:54 PM Akshay Joshi <[email protected]>
wrote:

> Thanks, patch applied.
>
> On Mon, Dec 16, 2019 at 5:40 PM Aditya Toshniwal <
> [email protected]> wrote:
>
>> Hi Hackers,
>>
>> Attached patch which is related to RM4988, reduces the number of hits to edit_mode_types.sql
>> (an expensive one).
>> Currently, this is query is executed for every column one by one when
>> table properties dialog is opened. I've added edit_mode_types_bulk.sql,
>> which will fetch the edit types for all the distinct column types used in
>> the table in a single DB trip and use that data for each column.
>> Also, while generating RE-SQL for columns, edit_mode_types.sql will not
>> be executed.
>> This will definitely reduce time.
>>
>> Kindly review.
>>
>> --
>> Thanks and Regards,
>> Aditya Toshniwal
>> Sr. Software Engineer | EnterpriseDB India | Pune
>> "Don't Complain about Heat, Plant a TREE"
>>
>
>
> --
> *Thanks & Regards*
> *Akshay Joshi*
>
> *Sr. Software Architect*
> *EnterpriseDB Software India Private Limited*
> *Mobile: +91 976-788-8246*
>


-- 
Thanks and Regards,
Aditya Toshniwal
pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"


Attachments:

  [application/octet-stream] RM4988.edit_types.typos.patch (1.0K, 3-RM4988.edit_types.typos.patch)
  download | inline diff:
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/utils.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/utils.py
index 7524f482c..eede2d30e 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/utils.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/columns/utils.py
@@ -155,7 +155,7 @@ def column_formatter(conn, tid, clid, data, edit_types_list=None,
 
     # We will need present type in edit mode
     edit_types_list.append(data['cltype'])
-    data['edit_types_list'] = edit_types_list
+    data['edit_types'] = edit_types_list
 
     data['cltype'] = DataTypeReader.parse_type_name(data['cltype'])
 
@@ -206,7 +206,7 @@ def get_formatted_columns(conn, tid, data, other_columns,
 
         for column in data['columns']:
             column_formatter(conn, tid, column['attnum'], column,
-                             edit_types[col['atttypid']])
+                             edit_types[column['atttypid']])
 
     return data
 


view thread (4+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: [pgAdmin][RM4988] Refactoring of all the SQL files used by pgAdmin4
  In-Reply-To: <CAM9w-_nwTMzSpDzp4Xb=8unmrzDD3-anma88AtcAiNNtCuk6XA@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox