Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f1ag5-00039v-3X for pgadmin-hackers@arkaria.postgresql.org; Thu, 29 Mar 2018 16:45:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f1ag3-0000yV-Sh for pgadmin-hackers@arkaria.postgresql.org; Thu, 29 Mar 2018 16:45:27 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f1ag3-0000xZ-9p for pgadmin-hackers@lists.postgresql.org; Thu, 29 Mar 2018 16:45:27 +0000 Received: from mail-oi0-x241.google.com ([2607:f8b0:4003:c06::241]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1f1afz-0002Ie-Kq for pgadmin-hackers@postgresql.org; Thu, 29 Mar 2018 16:45:26 +0000 Received: by mail-oi0-x241.google.com with SMTP id z8-v6so5721651oix.2 for ; Thu, 29 Mar 2018 09:45:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=grlSVvFw/Z2CgNsZpI9BXTGw4qz6OWChVMX8QJeSmkM=; b=PHPAAPxd9c7f8qWiQuy7ZNAjfFuSm+xVlM9y/nkp0m48TLWXw2IUL+QgPQAfsjLkM2 edGMYTEiqH4jomsLmI3AhvYzZCWEyW+XHB/SfvHE23fCns6YAxLRkB3o4joIyPuDCg3Z 34BZrGLpoYDUoLwixkEihV3I5NZjC9SqtoGvhAGpOKOxWsNxNGWNEYvGIb+0WaKUVMir WyH7QdjTJ3jzrKTe9x7zoHexeuwW4aoq+Kb1GLqdeFYnyDXg5ZwjLiBFr9C+s5I+S5lD eRp0dlxiFjb5T4lt3tuiinBnsUmzP7RwEEY2IdcISQDW6ntsxkHwQ9L7CuajlOovefHh ldbQ== 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=grlSVvFw/Z2CgNsZpI9BXTGw4qz6OWChVMX8QJeSmkM=; b=Exb2YsYw/c7/JGU6q3kjjWwX0jdOcK22+lcwnmVV973n+h2EA9f2Lox5/t20/SXDii xV56kLJEt4vTyBX3ydZpi4uEZqz2GwFZahDQqJ6kk2AXaoJR/1FLDkO9skZ/v9s/gkPB gXQr9YLsNHwuk+71m0MNXQIQyCA89/yuVZUjWxMRFTr0SvwjDlVlExmX+cbA1CikLfWG 0QWD0LyQ1MIKQ3Zd1Y9JBu+rDJ8kk/ygSotbcEB91J+PKHSl3sgojiQLQZqjQ8PQREZR zbfWb9S/fMlf4GHMv7D5Y39Q9qY7B79R2RbDqXA5fa6V09uAQOy7ZYcN5Uu5fCHcO3D/ /8sA== X-Gm-Message-State: AElRT7G6c500iE8h+nYRndJpIs1JkH+D7u3U8WvRq7amLFqrQxIi3YjL Fs3VvWUYqx7yrzTf71fkYa1TabAkgVm2etOiDwMpYg== X-Google-Smtp-Source: AIpwx4/9fQg2zjW9atjfvddeldmaikWqZQMB+QMUvHKpEHgLtiXatiK3EyCKlcaGNM7xHCYHhEOh5ZXxNiQWSDG09gI= X-Received: by 10.202.206.67 with SMTP id e64mr5050356oig.342.1522341922222; Thu, 29 Mar 2018 09:45:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.138.6.138 with HTTP; Thu, 29 Mar 2018 09:45:01 -0700 (PDT) In-Reply-To: References: From: Murtuza Zabuawala Date: Thu, 29 Mar 2018 22:15:01 +0530 Message-ID: Subject: Re: [pgAdmin4][Patch]: RM #3180 Index node is missing from the tree view of the table node To: Joao De Almeida Pereira Cc: Akshay Joshi , pgadmin-hackers Content-Type: multipart/alternative; boundary="001a113d23de8055ec05688fd980" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --001a113d23de8055ec05688fd980 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks Akshay & Joao, got it. My bad sorry for the noise. -- Regards, Murtuza Zabuawala EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company On Thu, Mar 29, 2018 at 9:06 PM, Joao De Almeida Pereira < jdealmeidapereira@pivotal.io> wrote: > 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 !=3D 0) > ) FOR VALUES IN ('Los Angeles', 'San Francisco') PARTITION BY RANGE (popu= lation); > > CREATE TABLE cities_west_10000_to_100000 > PARTITION OF cities_west FOR VALUES FROM (10000) TO (100000); > > =E2=80=8B > > 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 Murtuza >> >> On Thu, Mar 29, 2018 at 6:36 PM, 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 i= t >>> 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 mo= re >>> 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 th= e >> *Partitioned* table. We are showing indexes on Partitions. Please refer >> "Index_on_Partitioned_table.png" >> >>> >>> >>> >>> -- >>> Regards, >>> Murtuza Zabuawala >>> EnterpriseDB: http://www.enterprisedb.com >>> The Enterprise PostgreSQL Company >>> >>> >>> 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 t= he >>>> older commit. >>>> >>>> -- >>>> *Akshay Joshi* >>>> >>>> *Sr. Software Architect * >>>> >>>> >>>> >>>> *Phone: +91 20-3058-9517 <+91%2020%203058%209517>Mobile: +91 >>>> 976-788-8246 <+91%2097678%2088246>* >>>> >>> >>> >> >> >> -- >> *Akshay Joshi* >> >> *Sr. Software Architect * >> >> >> >> *Phone: +91 20-3058-9517 <+91%2020%203058%209517>Mobile: +91 976-788-824= 6 >> <+91%2097678%2088246>* >> > --001a113d23de8055ec05688fd980 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks Akshay & Joao, got it.
<= br>
My bad sorry for the noise.

= --Regards,=
Murtuza Zabuawala
EnterpriseDB:=C2=A0http://www.enterprisedb.c= om
The Enterprise PostgreSQL Company
<= font size=3D"2">
<= /font>

On Thu, Mar 29, 2018 at 9:06 PM, Joao De Alm= eida Pereira <jdealmeidapereira@pivotal.io> wrote= :
Hi Murtuza,
Lets i= magine 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 !=3D 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);
=E2=80=8B

You can only create an index in cities_west_10000_to_10= 0000 because postgresql assumes that cities_west is also a parti= tioned table. So the implementation looks correct, despite the fact that th= ere are no tests around it.

Thanks
Joao<= /div>
On Thu, Mar 29, 2018 a= t 9:26 AM Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:
Hi Murtuza

On Thu, Mar 29, 2= 018 at 6:36 PM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:
<= div dir=3D"ltr">
Hi Akshay,

I have concerns regarding the fix, As you negate the conditi= on, Before the fix it was not displaying Index node for Tables but after th= e fix it will not display it for Partition tables.
But when I read the Postgres= docs it say,
Partitions may themselves be defined as part= itioned tables, using what is called=C2=A0sub-partitioning. Partitions may have their own indexes, constraints and default values, distinct fr= om those of other partitions. In= dexes must be created separately for each partition. See=C2=A0CREATE TABLE=C2=A0for more details on creating partitio= ned tables and partitions.

=C2=A0 = =C2=A0 Yes that is correct, but it's about Partitions(child tables), no= t the *Partitioned* table. We are showing indexes on Partitions. Please ref= er "Index_on_Partitioned_table.png"=C2=A0 =C2=A0
=



= --Regards,=
Murtuza Zabuawala
EnterpriseDB:=C2=A0http://www.enterpris= edb.com
The Enterprise PostgreSQL Company
<= div><= img src=3D"https://drive.google.com/a/enterprisedb.com/uc?id=3D0B6jGeB3BfKR= MV0t4MEp0YnZCTTA&export=3Ddownload" width=3D"420" height=3D"31">

On Thu, Mar 29, 2018 at 6:05 PM, Akshay Josh= i <akshay.joshi@enterprisedb.com> wrote:
Hi Hackers,

Please find the attac= hed patch to fix RM=C2=A0#3180=C2=A0<= span style=3D"font-size:12.8px">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

<= font color=3D"#3333FF">
=




--
Akshay Joshi
Sr. Software Architect


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

--001a113d23de8055ec05688fd980--