Re: Indexes mysteriously change to ON ONLY
От | Christophe Pettus |
---|---|
Тема | Re: Indexes mysteriously change to ON ONLY |
Дата | |
Msg-id | 9251FE93-3C6E-4821-A007-0EDFAC8E7E72@thebuild.com обсуждение исходный текст |
Ответ на | Re: Indexes mysteriously change to ON ONLY (Rumpi Gravenstein <rgravens@gmail.com>) |
Список | pgsql-general |
> On Jan 27, 2023, at 13:01, Rumpi Gravenstein <rgravens@gmail.com> wrote: > > We are using the pg_indexes view (indexdef) to retrieve the index definition. This is as expected. Once the index is created on the partitioned set of tables, the index on the *root* table will be ONONLY that table; the child tables appear separately: xof=# create table t (i bigint) partition by range(i); CREATE TABLE xof=# create table t001 partition of t for values from (1) to (2); CREATE TABLE xof=# create index on t(i); CREATE INDEX xof=# select * from pg_indexes where tablename = 't'; schemaname | tablename | indexname | tablespace | indexdef ------------+-----------+-----------+------------+------------------------------------------------------- public | t | t_i_idx | | CREATE INDEX t_i_idx ON ONLY public.t USING btree (i) (1 row) xof=# select * from pg_indexes where tablename = 't001'; schemaname | tablename | indexname | tablespace | indexdef ------------+-----------+------------+------------+-------------------------------------------------------- public | t001 | t001_i_idx | | CREATE INDEX t001_i_idx ON public.t001 USING btree (i) (1 row)
В списке pgsql-general по дате отправления: