Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d3IGj-0005Dp-V7 for pgadmin-hackers@arkaria.postgresql.org; Wed, 26 Apr 2017 08:25:50 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1d3IGj-0002SN-8b for pgadmin-hackers@arkaria.postgresql.org; Wed, 26 Apr 2017 08:25:49 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1d3IGi-0002SE-So for pgadmin-hackers@postgresql.org; Wed, 26 Apr 2017 08:25:48 +0000 Received: from mail-io0-x233.google.com ([2607:f8b0:4001:c06::233]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1d3IGe-0003cU-G0 for pgadmin-hackers@postgresql.org; Wed, 26 Apr 2017 08:25:48 +0000 Received: by mail-io0-x233.google.com with SMTP id k87so233001921ioi.0 for ; Wed, 26 Apr 2017 01:25:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=h+mUsfXaNyYvN0C05Zhc2OebJpIN17yLqQvcjK/tg8E=; b=i0OJYl532GnrNYdJGC/0mMPbhqeAh4VPRweKaikclBye8Gbi/6dZFZO0jxwmEVpe+0 Q/uOVUlaLt3z+TaE9VvkGgCgGqRfamu/9rXUZw+gdjVopPygTR+LqZh+nqtBONSGcBAC qgia5IfDz6nEWm0g2ycnrQi0fKfLYp7ZsQ3RjIN7VQc6XUNLGXyR4xZYw5Mft+e0MwbR ZeDr8GwKVMx3ITRnJnTXkmCFP17BZCXUOyVo1NJSMcO9ek/WbX7hfU2kkSR9/OObqKLv WVsohoRGLsRpRDWwE6OvrOpXbETiQ5tQ2CGa6qASXKGQZO1x69EvUtv3qIdvuvpUq8kx U2QQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=h+mUsfXaNyYvN0C05Zhc2OebJpIN17yLqQvcjK/tg8E=; b=HHXguF7InsaJ4EA5FigcwzIh+VeXrpfKhchXyhQbyJMGHhMWJ96wfk6aY1wuyCoQFF rUn3TS5ZD/xMuhPqptDmB0YIV2S6butiFrGLN44dNYwN+Sk0cxPLd+xckK2g23YDiego 72zfXofNEnMPN/ZgDWG+sOpRgwQa+AViOa9QJEwU6LaWtPa+XgnmotbpuhS3Nk9SypqX yxn1kOsUCDaaM0qB/S7wD7UJWM7dy/VUkZdFA6bx5Nycs4kKlE1eetNTriEnb4DejhsY yPl0nDvpAidooRTijPFqZ6qmhBaG8kDruJ+X8uXWnsobLUOfAK/n07rpeD4iJP77z6UM 1sTA== X-Gm-Message-State: AN3rC/6dyFkTguVM8D/NjZxdnBPxMKsXPbNl3UkeT0pHgMIV8/fvQsAm LNPDjTIkbZ5Gur38yzyYevd9WXLvA5Vh X-Received: by 10.107.46.86 with SMTP id i83mr21365793ioo.84.1493195142738; Wed, 26 Apr 2017 01:25:42 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.174.167 with HTTP; Wed, 26 Apr 2017 01:25:41 -0700 (PDT) In-Reply-To: References: From: Dave Page Date: Wed, 26 Apr 2017 09:25:41 +0100 Message-ID: Subject: Re: Declarative partitioning in pgAdmin4 To: Akshay Joshi Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary=001a1137949e10405c054e0d96e3 X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org --001a1137949e10405c054e0d96e3 Content-Type: text/plain; charset=UTF-8 Hi [moving to the pgadmin-hackers mailing list as this a pgAdmin feature] On Wed, Apr 26, 2017 at 8:20 AM, Akshay Joshi wrote: > Hi Dave > > Murtuza and I started thinking about "How to add Declarative > Partitioning" support in pgAdmin4. We thought instead of showing Partition > Table under existing Tables collection, we should add new collection node > "Partition Tables". Showing table under the table node recursively will > require lots of code changes in table and it's child nodes (column, index, > trigger, etc..) which is more complex and error prone. > Perhaps, but from the user's perspective, there's no reason to list them separately - they are just tables with a different structure from others. We shouldn't confuse the user just because it's more convenient for us. I really think it should look like this: - Tables - t1 - Columns - Constraints - Partitions - p1 - Sub Objects (whatever they may be) ... - p2 ... - t2 ... > > Below is the design that we can implement: > > - Create new "Partition Tables" collection node. User will be able to > create partition table by clicking "Create -> Partition Table" menu that we > will add on collection node. We will share the dialog prototype later > once we will have complete understanding of it. > > Can you share a mock-up of the dialog? The Figma tool that Shirley shared looks like it'll be good for doing that - I can invite you to the team. > > - Once table is created user will be able to create partitions by > clicking "Create -> Partitions" menu will be added on each partitioned > table node. We will share the dialog prototype later once we will have > complete understanding of it. > > I would expect the user to be able to define the partitioning scheme when they create the table; e.g. on a new tab. It shouldn't be a two step process. > > - We will have to show sub nodes like (column, index, trigger, > constraints, etc..) on main table while some of the sub nodes won't require > for partitions like (column and many more again require some more knowledge > on partitioning). > > OK. > Apart from above we will have to figure out following: > > - How to remove partitions(table) from existing tables node as value > of relkind column is 'r' for partitions. > - Partitioning scheme to show in SQL pane for partitions. > - Some unknown issue/features of Declarative partitioning. > > OK. > The above implementation may take more time, so it might possible that we > may not be able to finish it by 14th May (deadline). > It would be nice to have it by then, but the true deadline will be a later beta (TBD, but probably beta 2 which is sufficiently far off). -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company --001a1137949e10405c054e0d96e3 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi

[moving to the pgadmin-hackers maili= ng list as this a pgAdmin feature]

On Wed, Apr 26, 2017 at 8:20 AM, Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:
Hi Dave

Murtuza and I started thinking about &qu= ot;How to add Declarative Partitioning" support in pgAdmin4. We though= t instead of showing Partition Table under existing Tables collection, we s= hould add new collection node "Partition Tables". Showing table u= nder the table node recursively will require lots of code changes in table = and it's child nodes (column, index, trigger, etc..) which is more comp= lex and error prone.=C2=A0

Perh= aps, but from the user's perspective, there's no reason to list the= m separately - they are just tables with a different structure from others.= We shouldn't confuse the user just because it's more convenient fo= r us.

I really think it should look like this:

- Tables
=C2=A0 - t1
=C2=A0 =C2= =A0 - Columns
=C2=A0 =C2=A0 - Constraints
=C2=A0 =C2=A0= - Partitions
=C2=A0 =C2=A0 =C2=A0 - p1
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 - Sub Objects (whatever they may be)
=C2=A0 =C2=A0 = =C2=A0 =C2=A0 ...
=C2=A0 =C2=A0 =C2=A0 - p2
=C2=A0 =C2= =A0 =C2=A0 ...
=C2=A0 - t2
=C2=A0 ...
=C2=A0= =C2=A0=C2=A0
=C2=A0

Below is the design that we can implement:=C2= =A0
  • Create new "Partition Tables" collection no= de. User will be able to create partition table by clicking "Create -&= gt; Partition Table" menu that we will add on collection node.=C2=A0We= will share the dialog pro= totype later once we will have complete understanding of it.
Can you share a mock-up of the dialog? The Figma t= ool that Shirley shared looks like it'll be good for doing that - I can= invite you to the team.=C2=A0
  • Once table is created user will be able to create= partitions by clicking "Create -> Partitions" menu will be ad= ded on each partitioned table node. We will share the dialog prototype later once we will have comple= te understanding of it.
I would expe= ct the user to be able to define the partitioning scheme when they create t= he table; e.g. on a new tab. It shouldn't be a two step process.=C2=A0<= /div>
  • We will h= ave to show sub nodes like (column, index, trigger, constraints, etc..) on = main table while some of the sub nodes won't require for partitions lik= e (column and many more again require some more knowledge on partitioning).=
OK.
=C2=A0
Apart from above we will ha= ve to figure out following:
  • How to remove partitions(tabl= e) from existing tables node as value of relkind column is 'r' for partitions.
  • Partit= ioning scheme to show in SQL pane for partitions.
  • Some unknown issue/features of Declarat= ive partitioning.=C2=A0
OK.
=C2=A0
The= above implementation may take more time, so it might possible that we may = not be able to finish it by 14th May (deadline).

It would be nice to have it by then, but the true d= eadline will be a later beta (TBD, but probably beta 2 which is sufficientl= y far off).

--
Dave Page
Blog: http://pgsnake.blogspot.com
Tw= itter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise Po= stgreSQL Company
--001a1137949e10405c054e0d96e3--