Thread: [pgAdmin4][Patch]: RM #3180 Index node is missing from the tree viewof the table node
[pgAdmin4][Patch]: RM #3180 Index node is missing from the tree viewof the table node
From
Akshay Joshi
Date:
Hi Hackers,
--

Please find the attached patch to fix RM #3180 Index node is missing from the tree view of the table node. This is a regression of one of the older commit.
Akshay Joshi
Sr. Software Architect

Phone: +91 20-3058-9517
Mobile: +91 976-788-8246
Mobile: +91 976-788-8246
Attachment
Re: [pgAdmin4][Patch]: RM #3180 Index node is missing from the treeview of the table node
From
Murtuza Zabuawala
Date:
Hi Akshay,
I have concerns regarding the fix, As you negate the condition, Before the fix it was not displaying Index node for Tables but after the fix it will not display it for Partition tables.
But when I read the Postgres docs it say,
Partitions may themselves be defined as partitioned tables, using what is called sub-partitioning. Partitions may have their own indexes, constraints and default values, distinct from those of other partitions. Indexes must be created separately for each partition. See CREATE TABLE for more details on creating partitioned tables and partitions.
Ref: https://www.postgresql.org/docs/10/static/ddl-partitioning.html (Sec: 5.10.2)
--
Regards,
On Thu, Mar 29, 2018 at 6:05 PM, Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:
Hi Hackers,Please find the attached patch to fix RM #3180 Index node is missing from the tree view of the table node. This is a regression of one of the older commit.--Akshay JoshiSr. Software ArchitectPhone: +91 20-3058-9517
Mobile: +91 976-788-8246
Re: [pgAdmin4][Patch]: RM #3180 Index node is missing from the treeview of the table node
From
Dave Page
Date:
Thanks, applied.
On Thu, Mar 29, 2018 at 1:35 PM, Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:
Hi Hackers,Please find the attached patch to fix RM #3180 Index node is missing from the tree view of the table node. This is a regression of one of the older commit.--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Re: [pgAdmin4][Patch]: RM #3180 Index node is missing from the tree view of the table node
From
Akshay Joshi
Date:
Hi Murtuza
--

On Thu, Mar 29, 2018 at 6:36 PM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:
Hi Akshay,I have concerns regarding the fix, As you negate the condition, Before the fix it was not displaying Index node for Tables but after the fix it will not display it for Partition tables.But when I read the Postgres docs it say,Partitions may themselves be defined as partitioned tables, using what is called sub-partitioning. Partitions may have their own indexes, constraints and default values, distinct from those of other partitions. Indexes must be created separately for each partition. See CREATE TABLE for more details on creating partitioned tables and partitions.Ref: https://www.postgresql.org/docs/10/static/ddl- partitioning.html (Sec: 5.10.2)
Yes that is correct, but it's about Partitions(child tables), not the *Partitioned* table. We are showing indexes on Partitions. Please refer "Index_on_Partitioned_table.png"
--Regards,On Thu, Mar 29, 2018 at 6:05 PM, Akshay Joshi <akshay.joshi@enterprisedb.com> wrote: Hi Hackers,Please find the attached patch to fix RM #3180 Index node is missing from the tree view of the table node. This is a regression of one of the older commit.--Akshay 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
Attachment
Re: [pgAdmin4][Patch]: RM #3180 Index node is missing from the treeview of the table node
From
Joao De Almeida Pereira
Date:
Hi Murtuza,
Lets imagine you have
CREATE TABLE cities ( city_id bigserial not null, name text not null, population int
) PARTITION BY LIST (initcap(name));
CREATE TABLE cities_west PARTITION OF cities ( CONSTRAINT city_id_nonzero CHECK (city_id != 0)
) FOR VALUES IN ('Los Angeles', 'San Francisco') PARTITION BY RANGE (population);
CREATE TABLE cities_west_10000_to_100000 PARTITION OF cities_west FOR VALUES FROM (10000) TO (100000);
You can only create an index in cities_west_10000_to_100000 because postgresql assumes that cities_west is also a partitioned table. So the implementation looks correct, despite the fact that there are no tests around it.
Thanks
Joao
On Thu, Mar 29, 2018 at 9:26 AM Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:
Hi MurtuzaOn Thu, Mar 29, 2018 at 6:36 PM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:Hi Akshay,I have concerns regarding the fix, As you negate the condition, Before the fix it was not displaying Index node for Tables but after the fix it will not display it for Partition tables.But when I read the Postgres docs it say,Partitions may themselves be defined as partitioned tables, using what is called sub-partitioning. Partitions may have their own indexes, constraints and default values, distinct from those of other partitions. Indexes must be created separately for each partition. See CREATE TABLE for more details on creating partitioned tables and partitions.Ref: https://www.postgresql.org/docs/10/static/ddl-partitioning.html (Sec: 5.10.2)Yes that is correct, but it's about Partitions(child tables), not the *Partitioned* table. We are showing indexes on Partitions. Please refer "Index_on_Partitioned_table.png"--Regards,On Thu, Mar 29, 2018 at 6:05 PM, Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:Hi Hackers,Please find the attached patch to fix RM #3180 Index node is missing from the tree view of the table node. This is a regression of one of the older commit.--
Re: [pgAdmin4][Patch]: RM #3180 Index node is missing from the treeview of the table node
From
Murtuza Zabuawala
Date:
Thanks Akshay & Joao, got it.
My bad sorry for the noise.
--
Regards,
On Thu, Mar 29, 2018 at 9:06 PM, Joao De Almeida Pereira <jdealmeidapereira@pivotal.io> wrote:
Hi Murtuza,Lets imagine you haveCREATE TABLE cities ( city_id bigserial not null, name text not null, population int ) PARTITION BY LIST (initcap(name)); CREATE TABLE cities_west PARTITION OF cities ( CONSTRAINT city_id_nonzero CHECK (city_id != 0) ) FOR VALUES IN ('Los Angeles', 'San Francisco') PARTITION BY RANGE (population); CREATE TABLE cities_west_10000_to_100000 PARTITION OF cities_west FOR VALUES FROM (10000) TO (100000);
You can only create an index in cities_west_10000_to_100000 because postgresql assumes that cities_west is also a partitioned table. So the implementation looks correct, despite the fact that there are no tests around it.ThanksJoaoHi MurtuzaOn Thu, Mar 29, 2018 at 6:36 PM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote: Hi Akshay,I have concerns regarding the fix, As you negate the condition, Before the fix it was not displaying Index node for Tables but after the fix it will not display it for Partition tables.But when I read the Postgres docs it say,Partitions may themselves be defined as partitioned tables, using what is called sub-partitioning. Partitions may have their own indexes, constraints and default values, distinct from those of other partitions. Indexes must be created separately for each partition. See CREATE TABLE for more details on creating partitioned tables and partitions.Ref: https://www.postgresql.org/docs/10/static/ddl- partitioning.html (Sec: 5.10.2) Yes that is correct, but it's about Partitions(child tables), not the *Partitioned* table. We are showing indexes on Partitions. Please refer "Index_on_Partitioned_table.png" --Regards,On Thu, Mar 29, 2018 at 6:05 PM, Akshay Joshi <akshay.joshi@enterprisedb.com> wrote: Hi Hackers,Please find the attached patch to fix RM #3180 Index node is missing from the tree view of the table node. This is a regression of one of the older commit.--
Re: [pgAdmin4][Patch]: RM #3180 Index node is missing from the treeview of the table node
From
Robert Eckhardt
Date:
On Thu, Mar 29, 2018 at 12:45 PM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:
Thanks Akshay & Joao, got it.My bad sorry for the noise.
The question helped me, nothing wrong with questions.
-- Rob
--Regards,On Thu, Mar 29, 2018 at 9:06 PM, Joao De Almeida Pereira <jdealmeidapereira@pivotal.io> wrote:Hi Murtuza,Lets imagine you haveCREATE TABLE cities ( city_id bigserial not null, name text not null, population int ) PARTITION BY LIST (initcap(name)); CREATE TABLE cities_west PARTITION OF cities ( CONSTRAINT city_id_nonzero CHECK (city_id != 0) ) FOR VALUES IN ('Los Angeles', 'San Francisco') PARTITION BY RANGE (population); CREATE TABLE cities_west_10000_to_100000 PARTITION OF cities_west FOR VALUES FROM (10000) TO (100000);
You can only create an index in cities_west_10000_to_100000 because postgresql assumes that cities_west is also a partitioned table. So the implementation looks correct, despite the fact that there are no tests around it.ThanksJoaoHi MurtuzaOn Thu, Mar 29, 2018 at 6:36 PM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote: Hi Akshay,I have concerns regarding the fix, As you negate the condition, Before the fix it was not displaying Index node for Tables but after the fix it will not display it for Partition tables.But when I read the Postgres docs it say,Partitions may themselves be defined as partitioned tables, using what is called sub-partitioning. Partitions may have their own indexes, constraints and default values, distinct from those of other partitions. Indexes must be created separately for each partition. See CREATE TABLE for more details on creating partitioned tables and partitions.Ref: https://www.postgresql.org/docs/10/static/ddl-partition ing.html (Sec: 5.10.2) Yes that is correct, but it's about Partitions(child tables), not the *Partitioned* table. We are showing indexes on Partitions. Please refer "Index_on_Partitioned_table.png" --Regards,On Thu, Mar 29, 2018 at 6:05 PM, Akshay Joshi <akshay.joshi@enterprisedb.com> wrote: Hi Hackers,Please find the attached patch to fix RM #3180 Index node is missing from the tree view of the table node. This is a regression of one of the older commit.--