@@ -224,26 +224,26 @@ Partition of: idxpart2 FOR VALUES FROM (100) TO (200)
224224select indexrelid::regclass, indrelid::regclass, inhparent::regclass
225225 from pg_index idx left join pg_inherits inh on (idx.indexrelid = inh.inhrelid)
226226where indexrelid::regclass::text like 'idxpart%'
227- order by indrelid ::regclass::text collate "C";
227+ order by indexrelid ::regclass::text collate "C";
228228 indexrelid | indrelid | inhparent
229229-----------------+-----------+---------------
230- idxpart_a_idx | idxpart |
231230 idxpart1_a_idx | idxpart1 | idxpart_a_idx
232- idxpart2_a_idx | idxpart2 | idxpart_a_idx
233231 idxpart22_a_idx | idxpart22 |
232+ idxpart2_a_idx | idxpart2 | idxpart_a_idx
233+ idxpart_a_idx | idxpart |
234234(4 rows)
235235
236236alter index idxpart2_a_idx attach partition idxpart22_a_idx;
237237select indexrelid::regclass, indrelid::regclass, inhparent::regclass
238238 from pg_index idx left join pg_inherits inh on (idx.indexrelid = inh.inhrelid)
239239where indexrelid::regclass::text like 'idxpart%'
240- order by indrelid ::regclass::text collate "C";
240+ order by indexrelid ::regclass::text collate "C";
241241 indexrelid | indrelid | inhparent
242242-----------------+-----------+----------------
243- idxpart_a_idx | idxpart |
244243 idxpart1_a_idx | idxpart1 | idxpart_a_idx
245- idxpart2_a_idx | idxpart2 | idxpart_a_idx
246244 idxpart22_a_idx | idxpart22 | idxpart2_a_idx
245+ idxpart2_a_idx | idxpart2 | idxpart_a_idx
246+ idxpart_a_idx | idxpart |
247247(4 rows)
248248
249249-- attaching idxpart22 is not enough to set idxpart22_a_idx valid ...
@@ -600,15 +600,15 @@ alter table idxpart attach partition idxpart2 for values from (10) to (20);
600600select c.relname, pg_get_indexdef(indexrelid)
601601 from pg_class c join pg_index i on c.oid = i.indexrelid
602602 where indrelid::regclass::text like 'idxpart%'
603- order by indrelid ::regclass::text collate "C";
603+ order by indexrelid ::regclass::text collate "C";
604604 relname | pg_get_indexdef
605605------------------+--------------------------------------------------------------
606- idxparti | CREATE INDEX idxparti ON ONLY idxpart USING btree (a)
607- idxparti2 | CREATE INDEX idxparti2 ON ONLY idxpart USING btree (c, b)
608606 idxpart1_a_idx | CREATE INDEX idxpart1_a_idx ON idxpart1 USING btree (a)
609607 idxpart1_c_b_idx | CREATE INDEX idxpart1_c_b_idx ON idxpart1 USING btree (c, b)
610608 idxpart2_a_idx | CREATE INDEX idxpart2_a_idx ON idxpart2 USING btree (a)
611609 idxpart2_c_b_idx | CREATE INDEX idxpart2_c_b_idx ON idxpart2 USING btree (c, b)
610+ idxparti | CREATE INDEX idxparti ON ONLY idxpart USING btree (a)
611+ idxparti2 | CREATE INDEX idxparti2 ON ONLY idxpart USING btree (c, b)
612612(6 rows)
613613
614614drop table idxpart;
@@ -626,12 +626,12 @@ alter table idxpart attach partition idxpart1 for values from (1) to (2);
626626select c.relname, pg_get_indexdef(indexrelid)
627627 from pg_class c join pg_index i on c.oid = i.indexrelid
628628 where indrelid::regclass::text like 'idxpart%'
629- order by indrelid ::regclass::text collate "C";
629+ order by indexrelid ::regclass::text collate "C";
630630 relname | pg_get_indexdef
631631------------------+-------------------------------------------------------------------
632- idxpart_abs_idx | CREATE INDEX idxpart_abs_idx ON ONLY idxpart USING btree (abs(b))
633632 idxpart1_abs_idx | CREATE INDEX idxpart1_abs_idx ON idxpart1 USING btree (abs(b))
634633 idxpart2_abs_idx | CREATE INDEX idxpart2_abs_idx ON idxpart2 USING btree (abs(b))
634+ idxpart_abs_idx | CREATE INDEX idxpart_abs_idx ON ONLY idxpart USING btree (abs(b))
635635(3 rows)
636636
637637drop table idxpart;
@@ -649,12 +649,12 @@ create index on idxpart (a) where b > 1000;
649649select c.relname, pg_get_indexdef(indexrelid)
650650 from pg_class c join pg_index i on c.oid = i.indexrelid
651651 where indrelid::regclass::text like 'idxpart%'
652- order by indrelid ::regclass::text collate "C";
652+ order by indexrelid ::regclass::text collate "C";
653653 relname | pg_get_indexdef
654654----------------+-----------------------------------------------------------------------------
655- idxpart_a_idx | CREATE INDEX idxpart_a_idx ON ONLY idxpart USING btree (a) WHERE (b > 1000)
656655 idxpart1_a_idx | CREATE INDEX idxpart1_a_idx ON idxpart1 USING btree (a) WHERE (b > 1000)
657656 idxpart2_a_idx | CREATE INDEX idxpart2_a_idx ON idxpart2 USING btree (a) WHERE (b > 1000)
657+ idxpart_a_idx | CREATE INDEX idxpart_a_idx ON ONLY idxpart USING btree (a) WHERE (b > 1000)
658658(3 rows)
659659
660660drop table idxpart;
0 commit comments