public inbox for [email protected]  
help / color / mirror / Atom feed
From: Ashesh Vashi <[email protected]>
To: Akshay Joshi <[email protected]>
Cc: Harshal Dhumal <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Cc: Dave Page <[email protected]>
Cc: Robert Eckhardt <[email protected]>
Cc: Shirley Wang <[email protected]>
Subject: Re: [pgadmin-hackers] Declarative partitioning in pgAdmin4
Date: Tue, 4 Jul 2017 15:59:02 +0530
Message-ID: <CAG7mmozGNYZ+PZMPgnfuTa4pwbNCZnzaxXxGqNOnChiC97rk8A@mail.gmail.com> (raw)
In-Reply-To: <CANxoLDeZ6YO5_yXX9A12uafA9BS32nMKY-LwUSqxWKhSr21gig@mail.gmail.com>
References: <CANxoLDcZND0pjXtrDKRip2xjddzjWiMgY2AMmrqqFE_Yu4+tHw@mail.gmail.com>
	<CA+OCxowUuaNRX9jHmEVFpqT7JCbjn6vaxw+JJ6yrvVp69FZscg@mail.gmail.com>
	<CAPG3WN5NY-Xsa_+6HUQ3NMU_n7jRgJ8L6rjHfyzSLSHS=zZC0Q@mail.gmail.com>
	<CA+OCxoy1v+mq2P4ZL2v7mmyHmjwQmL=v8RR8CSRra_SV96nJDQ@mail.gmail.com>
	<CANxoLDeBGRmq_kUUNNySXimzJO2Ebj0aQBdjNM+0JvP3_Yr9Dw@mail.gmail.com>
	<CAAtBm9Ve2FX4_jY9tv11UqK2BhNoLn118aeT4y=TieSAovL+AA@mail.gmail.com>
	<CA+OCxozkEdTmVUtJEBdHT97EbiUK_+cwW+rv21tuHyxSnN3HOg@mail.gmail.com>
	<CAAtBm9UHyp+bkxcyYL+1qb9knps_cdh6N0tvwMy5uY-eVjWcPg@mail.gmail.com>
	<CANxoLDdgp46uAZzda+cHBn16YibodXgtyH7O1hp39TKT=cv_ig@mail.gmail.com>
	<CA+OCxowpGBLT1q2DzL9VpRG5So8zYssP9SAdd=3Mc6dk8_-p7A@mail.gmail.com>
	<CANxoLDdP945GEfzeYaPjO41D4VoRN2kDMVhHZCOqCXWKegSEHw@mail.gmail.com>
	<CA+OCxowCzLAFybtfnsay9NB0BFORP5yXiitruxh9tvMoADNKRQ@mail.gmail.com>
	<CANxoLDcqudMZ5j-30EcFEL9KpQxyvrMWo0mVrWdg0p6_8e7peQ@mail.gmail.com>
	<CA+OCxow5pXNkDxrL1dbWbheJjpSseefSdvUs5tiwx7k5o3vB7Q@mail.gmail.com>
	<CANxoLDeNovspn8mm0XuYh+F2ShGotwRCAikU5JY9qF1GgFQ9rg@mail.gmail.com>
	<CA+OCxowtH1WJpXA1MKSLrzx_qbKAA36GTEk1t5=3VAS8fegBiA@mail.gmail.com>
	<CANxoLDeLHGvz0NxH_MM7dCe0muA8Sxe54V65b18iHTAESzt97g@mail.gmail.com>
	<CANxoLDeuXKCqrdNwiBut5m7FKQwzRjbPrqR6wHf8qKqgLDnwgQ@mail.gmail.com>
	<CAPG3WN4tiMGoFadBZ9KjB8NfNDVfvDnfUHhS=aya5A0o-jZ3Xw@mail.gmail.com>
	<CANxoLDfN_RvNc0AsVCtrDC-03L53crHzE8JZjmxna3f08KWVqw@mail.gmail.com>
	<CAPG3WN5QA88fNmY4jZZhBY+HUn2FAKecHuvyFjnq2x_vGu4_0w@mail.gmail.com>
	<CANxoLDfjy6sWQVHy5m5Rj1R5_=x_XwPzz6Mndj3xXfnEYpU_zg@mail.gmail.com>
	<CAPG3WN7haKwrQzrgVh7JSunGcP9_6wj=_q_C9J-yYgsZbhWmEw@mail.gmail.com>
	<CANxoLDeZ-izo=RSaHRnFNaAAQjxhd9-x6stx5FyLYU2ZA3A3vA@mail.gmail.com>
	<CAPG3WN6sKefWWYfg9A5=f-QOO9HAsg7krsuQ6FZwvojEuvSjCA@mail.gmail.com>
	<CAAtBm9Xw0qpvqRUb87AoSDdu56iaS8TaoVym3KkBJGjOgLU8cA@mail.gmail.com>
	<CANxoLDegWFzkbUi=8KSL-3cPb0masCjD1HwxaMDhV6fs2uOObw@mail.gmail.com>
	<CAAtBm9VpHahO2pbPM_ATowUU-YLT--RwWHmvW1Q+BtUGiCetyA@mail.gmail.com>
	<CANxoLDc53XkKDO=8FHG1i7KnvPCCiR2-1DjCTQoV9_K4Z11pRQ@mail.gmail.com>
	<CA+OCxoyEAPAra-nkS4qPVYEk3hHyVfRN-FQFPRfjSPrshwhsUg@mail.gmail.com>
	<CAPG3WN72DS8gQmrFR_nBObYaeMaxiqVuyjsVqHaZR1BT4LDqHg@mail.gmail.com>
	<CA+OCxozRODSQ9mdLnJWq4cbgHthQ9EqE7AE80kLbi6YPHBQMYg@mail.gmail.com>
	<CAAtBm9Ua5WMPnXRb87Dr3+FMeuaSWsHSgpYX8AB=TS+PF63pPw@mail.gmail.com>
	<CA+OCxozEKKgCNL9ng7KegYYeFdTU6hy+TdQFBp80W=Ew4XDesg@mail.gmail.com>
	<CAAtBm9V89ndB8ZqU0MPsAsUQ-RMEzbjaG2nFfMmFr1vtaY=v=g@mail.gmail.com>
	<CANxoLDeC9e+=ESBzoCSQeg4zgxwTz5zGG8HwYs9JNr90x4a-tA@mail.gmail.com>
	<CA+OCxoy3PV8iH8OrpH=yXWCR3GgHQ1v4tqiXpVMhD5Dg_fQhBQ@mail.gmail.com>
	<CAG7mmow7a1fhhL1WoWZFUDCe4mro+C_Gt=VCrA4db80e2xf1Aw@mail.gmail.com>
	<CA+OCxoxONjMu5BPgnFJsZApjPHC1owrNxkZOvUxLwp3nmN15=A@mail.gmail.com>
	<CANxoLDcP71Fy-wG4ahw_ru-tKd0bigg-c+vqKxSHjnPeHKH4YQ@mail.gmail.com>
	<CAPG3WN5vDsNnkQud-o08ebkUoXcKU1PPgEjNC-Xe7UrZgxGeQw@mail.gmail.com>
	<CANxoLDck4-6uT8QsZWwc+VtWBbuG2HgUPsgSh6WhvV=r5zJBeQ@mail.gmail.com>
	<CAPG3WN4imcBJ+OPpJtarhB_AqnDiHL-+upMSZaY=vafax+cc=Q@mail.gmail.com>
	<CAFiP3vzws9ZjotnQVM+VX72+h38SgfhSGiEANURLeJw5gAfKhA@mail.gmail.com>
	<CAG7mmozigGHVUK7Mi0CpLbnZRwJnghauMM_EyP4S06ka1FSnCw@mail.gmail.com>
	<CAG7mmowUTNuwLexb+kFPPix0XHEaBAgMthtzN8H6OBAat0Zuyg@mail.gmail.com>
	<CANxoLDeZ6YO5_yXX9A12uafA9BS32nMKY-LwUSqxWKhSr21gig@mail.gmail.com>
List-Unsubscribe: <https://lists.postgresql.org/manage/>, <mailto:[email protected]>

On Mon, Jul 3, 2017 at 3:14 PM, Akshay Joshi <[email protected]>
wrote:

> Hi Ashesh
>
> On Fri, Jun 30, 2017 at 12:46 PM, Ashesh Vashi <
> [email protected]> wrote:
>
>> On Thu, Jun 29, 2017 at 5:02 PM, Ashesh Vashi <
>> [email protected]> wrote:
>>
>>> Hi Harshal,
>>>
>>> These are initial review comments.
>>> 1.
>>> Please share a separate patch for generic code changes from this patch
>>> for the following files:
>>> - web/pgadmin/tools/user_management/templates/user_management/
>>> js/user_management.js
>>> - web/pgadmin/static/js/backform.pgadmin.js
>>> - web/pgadmin/static/js/backgrid.pgadmin.js
>>>
>>> This should be committed as separate functionality, and should not be
>>> part of this commit.
>>>
>>
>       Committed.
>
>>
>>> 2.
>>> Please put a space after a colon (:) in javascript object definition.
>>> i.e.
>>> {cell: Backgrid.Extension.StringDepCell, cellHeaderClasses:
>>> 'width_percent_30'}
>>>
>>> 3.
>>> Conversion of ptid (partition table OID) to tid (table OID) for its
>>> children must not be in 'web/pgadmin/browser/utils.py'  file.
>>> Please create a inherited class of PGChildNodeView, and extend the
>>> functionality in it, and use it as the base class for all children of table.
>>>
>>> I will keep you posted for further review comments.
>>>
>> 4.
>> URL definition of the javascript for tables & partition tables utility
>> must be exposed from the table/partition table module, and not from the
>> database module.
>> i.e.
>> No changes should be done in the database module for this feature. Hence
>> - I don't expect any change in the file:
>> web/pgadmin/browser/server_groups/servers/databases/__init__.py
>>
>
>     Fixed.
>
>    Apart from above this patch contains test cases as well.
>
One bug:
If I rename the partitioned table from the properties dialog, and attach a
partition at the same time, then - it generates wrong modified queries.

-- Thanks, Ashesh

>
>> -- Thanks, Ashesh
>>
>>>
>>>
>>> --
>>>
>>> Thanks & Regards,
>>>
>>> Ashesh Vashi
>>> EnterpriseDB INDIA: Enterprise PostgreSQL Company
>>> <http://www.enterprisedb.com;
>>>
>>>
>>> *http://www.linkedin.com/in/asheshvashi*
>>> <http://www.linkedin.com/in/asheshvashi;
>>>
>>> On Fri, Jun 23, 2017 at 6:55 PM, Harshal Dhumal <
>>> [email protected]> wrote:
>>>
>>>> Hi,
>>>>
>>>> Please find attached patch for partition support.
>>>>
>>>> This patch includes all the work done by Akashy and support for child
>>>> nodes (constraints, rules, index, triggers and partition itself ) under
>>>> partition node.
>>>>
>>>>
>>>> Thanks,
>>>>
>>>> --
>>>> *Harshal Dhumal*
>>>> *Sr. Software Engineer*
>>>>
>>>> EnterpriseDB India: http://www.enterprisedb.com
>>>> The Enterprise PostgreSQL Company
>>>>
>>>> On Tue, Jun 20, 2017 at 12:16 AM, Shirley Wang <[email protected]>
>>>> wrote:
>>>>
>>>>>
>>>>>
>>>>> On Mon, Jun 19, 2017 at 1:59 AM Akshay Joshi <
>>>>> [email protected]> wrote:
>>>>>
>>>>>> On Fri, Jun 16, 2017 at 11:16 PM, Shirley Wang <[email protected]>
>>>>>> wrote:
>>>>>>
>>>>>>> Looks good. I noticed people clicking back and forth to the columns
>>>>>>> tab to remember which columns they've created while filling out the
>>>>>>> Expressions column. It might be better to have a list of the columns and
>>>>>>> the datatype above the 'Partition Keys' subnode and have columns as a type
>>>>>>> field rather than a drop down.
>>>>>>>
>>>>>>
>>>>>>    I think we should not duplicate that data as we already have all
>>>>>> the information on "Columns" tab and by providing drop down user can select
>>>>>> columns from there only.
>>>>>>
>>>>>>>
>>>>>>> Also, I think the fields someone sees after selecting the Key type
>>>>>>> needs to depend on what they select. Seeing both Column and Expressions
>>>>>>> type field might lead someone to think they need to fill out both fields.
>>>>>>>
>>>>>>
>>>>>>    We can't, because user can select one column and provide an
>>>>>> expression as partition key in this case we will have to show both the
>>>>>> columns in subnode control. Anyways when user select columns I have
>>>>>> disabled the expression cell and if user selects expression column cell is
>>>>>> disabled.
>>>>>>
>>>>>
>>>>> Ah I see what you mean. What I meant was that the column would change
>>>>> depending on if someone selects Column or Expressions from the dropdown
>>>>> [image: expression.png]
>>>>> Can a user select more than one key type? The use case I can see where
>>>>> hiding 'Columns' or 'Expressions' would fail is if someone can create an
>>>>> expression key type and a column key type.
>>>>>
>>>>> Disabling a feature is one way to guide user behavior, but it doesn't
>>>>> provide enough context for someone to understand why it's disabled. It's
>>>>> better to only display what is absolutely necessary and hide fields that
>>>>> are unrelated to the workflow.
>>>>>
>>>>> Typically, disabling a UI element is useful when that disabled UI
>>>>> element also provides some context or value while disabled. In this case,
>>>>> I'm not sure it is.
>>>>>
>>>>> If hiding options isn't possible, providing some text in the fields
>>>>> (like N/A or --) would be helpful.
>>>>>
>>>>>
>>>>>
>>>>>>
>>>>>>> [image: coluns_partitioning.png]
>>>>>>> When is the 'In' column in the Partitions subnode enabled?
>>>>>>>
>>>>>>
>>>>>>     In case of 'List' Partition.
>>>>>>
>>>>>
>>>>> It would improve the experience if the 'In' column was removed when a
>>>>> user selects 'Range' partitions then. And then if a user is creating a
>>>>> 'List' partition, 'From/To' should be hidden. In this case, 'From/To' and
>>>>> 'In' are dependent on that first drop down step, so seeing 'In' while on
>>>>> 'Range partitions' (and 'From/To' on 'List partitions') is not providing
>>>>> any value.
>>>>>
>>>>>
>>>>>>
>>>>>>> For the NoteControl on the bottom, what do 'Mode Control' or 'Attach
>>>>>>> Mode' refer to? And how can I tell the difference between 'Create Mode' and
>>>>>>> 'Edit Mode'?
>>>>>>>
>>>>>>
>>>>>>    'Mode control' is a switch control in subnode control that should
>>>>>> be "Mode switch control". 'Create Mode' is when user creates the new table
>>>>>> by clicking create-> table and 'Edit Mode' is when user open the properties
>>>>>> dialog for the existing table. In case of 'Edit Mode' there are two ways
>>>>>> user can create/attach partitions. In Attach mode we will identify and list
>>>>>> down the suitable tables to be attached.
>>>>>>
>>>>>
>>>>> I see. Describing these various states is great in case a user needs
>>>>> it. What are your thoughts on having it live in the documentation of
>>>>> pgAdmin4 rather than in the dialog? This seems to be the established
>>>>> pattern for all other explanations.
>>>>>
>>>>>>
>>>>
>>>
>>
>
>
> --
> *Akshay Joshi*
> *Principal Software Engineer *
>
>
>
> *Phone: +91 20-3058-9517Mobile: +91 976-788-8246*
>


Attachments:

  [image/png] coluns_partitioning.png (78.6K, 3-coluns_partitioning.png)
  download | view image

  [image/png] expression.png (69.8K, 4-expression.png)
  download | view image

view thread (77+ 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], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: [pgadmin-hackers] Declarative partitioning in pgAdmin4
  In-Reply-To: <CAG7mmozGNYZ+PZMPgnfuTa4pwbNCZnzaxXxGqNOnChiC97rk8A@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