Thread: [pgAdmin4][Patch]: #3412 - Add support for PRIMARY KEY, FOREIGN KEY,indexes, and triggers on partitioned tables for PG 11
[pgAdmin4][Patch]: #3412 - Add support for PRIMARY KEY, FOREIGN KEY,indexes, and triggers on partitioned tables for PG 11
From
Khushboo Vashi
Date:
Hi,
Please find the attached patch for RM #3412.
- Add support for PRIMARY KEY, FOREIGN KEY, indexes, and triggers on partitioned tables for PG 11
- Add support for partitioning by HASH key.
Thanks,
Khushboo
Attachment
Re: [pgAdmin4][Patch]: #3412 - Add support for PRIMARY KEY, FOREIGNKEY, indexes, and triggers on partitioned tables for PG 11
From
Akshay Joshi
Date:
Hi Khushboo
Following are my initial review comments:
- Fix PEP-8 warnings.
- We should hide "Modulus" and "Remainder" columns for PG/EPAS 10 as Hash partition is not supported in that.
- Primary key switch control on "columns" tab should be enabled for partitioned table created on PG/EPAS 11.
- Please verify that Unique constraint are supported for PG/EPAS 11 or not.
On Wed, Jul 25, 2018 at 4:29 PM, Khushboo Vashi <khushboo.vashi@enterprisedb.com> wrote:
Hi,Please find the attached patch for RM #3412.- Add support for PRIMARY KEY, FOREIGN KEY, indexes, and triggers on partitioned tables for PG 11- Add support for partitioning by HASH key.Thanks,Khushboo
Akshay Joshi
Sr. Software Architect

Phone: +91 20-3058-9517
Mobile: +91 976-788-8246
Mobile: +91 976-788-8246
Re: [pgAdmin4][Patch]: #3412 - Add support for PRIMARY KEY, FOREIGNKEY, indexes, and triggers on partitioned tables for PG 11
From
Khushboo Vashi
Date:
Hi,
Please find the attached updated patch with the fixes. I have also considered the suggestions given by Aditya on different email thread.
Thanks,
Khushboo
On Wed, Jul 25, 2018 at 6:01 PM, Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:
Hi KhushbooFollowing are my initial review comments:Will do code review tomorrow.
- Fix PEP-8 warnings.
- We should hide "Modulus" and "Remainder" columns for PG/EPAS 10 as Hash partition is not supported in that.
- Primary key switch control on "columns" tab should be enabled for partitioned table created on PG/EPAS 11.
- Please verify that Unique constraint are supported for PG/EPAS 11 or not.
--On Wed, Jul 25, 2018 at 4:29 PM, Khushboo Vashi <khushboo.vashi@enterprisedb.com> wrote: Hi,Please find the attached patch for RM #3412.- Add support for PRIMARY KEY, FOREIGN KEY, indexes, and triggers on partitioned tables for PG 11- Add support for partitioning by HASH key.Thanks,KhushbooAkshay JoshiSr. Software ArchitectPhone: +91 20-3058-9517
Mobile: +91 976-788-8246
Attachment
Re: [pgAdmin4][Patch]: #3412 - Add support for PRIMARY KEY, FOREIGNKEY, indexes, and triggers on partitioned tables for PG 11
From
Khushboo Vashi
Date:
For more clarification, The comments given by Aditya are:
1. I did not understand the below highlighted code. As per my understanding, index on partitioned table will not be supported with this code. But, Postgres 11 supports indexes on partitioned table. Could you please add some comments in the code above the highlighted code.
- if 'tid' in kwargs and manager.version >= 100000:
+ if 'tid' in kwargs and 100000 <= manager.version < 110000:
return not backend_supported(self, manager, **kwargs)
2. And for precautionary purpose, I would suggest replacing double equals(==) with triple equals(===) wherever you've used. Example below.
+ editable: function(m) {
+ if(m.handler && m.handler.top &&
+ m.handler.top.attributes &&
+ m.handler.top.attributes.par
On Fri, Jul 27, 2018 at 2:27 PM, Khushboo Vashi <khushboo.vashi@enterprisedb.com> wrote:
Hi,Please find the attached updated patch with the fixes. I have also considered the suggestions given by Aditya on different email thread.Thanks,KhushbooOn Wed, Jul 25, 2018 at 6:01 PM, Akshay Joshi <akshay.joshi@enterprisedb.com> wrote: Hi KhushbooFollowing are my initial review comments:Will do code review tomorrow.
- Fix PEP-8 warnings.
- We should hide "Modulus" and "Remainder" columns for PG/EPAS 10 as Hash partition is not supported in that.
- Primary key switch control on "columns" tab should be enabled for partitioned table created on PG/EPAS 11.
- Please verify that Unique constraint are supported for PG/EPAS 11 or not.
--On Wed, Jul 25, 2018 at 4:29 PM, Khushboo Vashi <khushboo.vashi@enterprisedb.com> wrote: Hi,Please find the attached patch for RM #3412.- Add support for PRIMARY KEY, FOREIGN KEY, indexes, and triggers on partitioned tables for PG 11- Add support for partitioning by HASH key.Thanks,KhushbooAkshay JoshiSr. Software ArchitectPhone: +91 20-3058-9517
Mobile: +91 976-788-8246
Re: [pgAdmin4][Patch]: #3412 - Add support for PRIMARY KEY, FOREIGNKEY, indexes, and triggers on partitioned tables for PG 11
From
Khushboo Vashi
Date:
Please find the attached updated patch with --binary option which I forgot in my previous email.
On Fri, Jul 27, 2018 at 2:36 PM, Khushboo Vashi <khushboo.vashi@enterprisedb.com> wrote:
For more clarification, The comments given by Aditya are:1. I did not understand the below highlighted code. As per my understanding, index on partitioned table will not be supported with this code. But, Postgres 11 supports indexes on partitioned table. Could you please add some comments in the code above the highlighted code.- if 'tid' in kwargs and manager.version >= 100000:+ if 'tid' in kwargs and 100000 <= manager.version < 110000:return not backend_supported(self, manager, **kwargs)2. And for precautionary purpose, I would suggest replacing double equals(==) with triple equals(===) wherever you've used. Example below.+ editable: function(m) {
+ if(m.handler && m.handler.top &&
+ m.handler.top.attributes &&
+ m.handler.top.attributes.par
tition_type == 'hash' && On Fri, Jul 27, 2018 at 2:27 PM, Khushboo Vashi <khushboo.vashi@enterprisedb.com> wrote: Hi,Please find the attached updated patch with the fixes. I have also considered the suggestions given by Aditya on different email thread.Thanks,KhushbooOn Wed, Jul 25, 2018 at 6:01 PM, Akshay Joshi <akshay.joshi@enterprisedb.com> wrote: Hi KhushbooFollowing are my initial review comments:Will do code review tomorrow.
- Fix PEP-8 warnings.
- We should hide "Modulus" and "Remainder" columns for PG/EPAS 10 as Hash partition is not supported in that.
- Primary key switch control on "columns" tab should be enabled for partitioned table created on PG/EPAS 11.
- Please verify that Unique constraint are supported for PG/EPAS 11 or not.
--On Wed, Jul 25, 2018 at 4:29 PM, Khushboo Vashi <khushboo.vashi@enterprisedb.com> wrote: Hi,Please find the attached patch for RM #3412.- Add support for PRIMARY KEY, FOREIGN KEY, indexes, and triggers on partitioned tables for PG 11- Add support for partitioning by HASH key.Thanks,KhushbooAkshay JoshiSr. Software ArchitectPhone: +91 20-3058-9517
Mobile: +91 976-788-8246
Attachment
Re: [pgAdmin4][Patch]: #3412 - Add support for PRIMARY KEY, FOREIGNKEY, indexes, and triggers on partitioned tables for PG 11
From
Akshay Joshi
Date:
Thanks, Patch applied.
On Fri, Jul 27, 2018 at 2:46 PM, Khushboo Vashi <khushboo.vashi@enterprisedb.com> wrote:
Please find the attached updated patch with --binary option which I forgot in my previous email.On Fri, Jul 27, 2018 at 2:36 PM, Khushboo Vashi <khushboo.vashi@enterprisedb.com> wrote: For more clarification, The comments given by Aditya are:1. I did not understand the below highlighted code. As per my understanding, index on partitioned table will not be supported with this code. But, Postgres 11 supports indexes on partitioned table. Could you please add some comments in the code above the highlighted code.- if 'tid' in kwargs and manager.version >= 100000:+ if 'tid' in kwargs and 100000 <= manager.version < 110000:return not backend_supported(self, manager, **kwargs)2. And for precautionary purpose, I would suggest replacing double equals(==) with triple equals(===) wherever you've used. Example below.+ editable: function(m) {
+ if(m.handler && m.handler.top &&
+ m.handler.top.attributes &&
+ m.handler.top.attributes.par
tition_type == 'hash' && On Fri, Jul 27, 2018 at 2:27 PM, Khushboo Vashi <khushboo.vashi@enterprisedb.com> wrote: Hi,Please find the attached updated patch with the fixes. I have also considered the suggestions given by Aditya on different email thread.Thanks,KhushbooOn Wed, Jul 25, 2018 at 6:01 PM, Akshay Joshi <akshay.joshi@enterprisedb.com> wrote: Hi KhushbooFollowing are my initial review comments:Will do code review tomorrow.
- Fix PEP-8 warnings.
- We should hide "Modulus" and "Remainder" columns for PG/EPAS 10 as Hash partition is not supported in that.
- Primary key switch control on "columns" tab should be enabled for partitioned table created on PG/EPAS 11.
- Please verify that Unique constraint are supported for PG/EPAS 11 or not.
--On Wed, Jul 25, 2018 at 4:29 PM, Khushboo Vashi <khushboo.vashi@enterprisedb.com> wrote: Hi,Please find the attached patch for RM #3412.- Add support for PRIMARY KEY, FOREIGN KEY, indexes, and triggers on partitioned tables for PG 11- Add support for partitioning by HASH key.Thanks,KhushbooAkshay JoshiSr. Software ArchitectPhone: +91 20-3058-9517
Mobile: +91 976-788-8246
Akshay Joshi
Sr. Software Architect

Phone: +91 20-3058-9517
Mobile: +91 976-788-8246
Mobile: +91 976-788-8246