RE: Implementing Incremental View Maintenance

Поиск
Список
Период
Сортировка
От r.takahashi_2@fujitsu.com
Тема RE: Implementing Incremental View Maintenance
Дата
Msg-id OS0PR01MB5682B499319EBEB59F416AD582619@OS0PR01MB5682.jpnprd01.prod.outlook.com
обсуждение исходный текст
Ответ на Re: Implementing Incremental View Maintenance  (Yugo NAGATA <nagata@sraoss.co.jp>)
Ответы Re: Implementing Incremental View Maintenance  (Yugo NAGATA <nagata@sraoss.co.jp>)
Список pgsql-hackers
Hi Nagata-san,


> Ok. I'll fix _copyIntoClause() and _equalIntoClause() as well as _readIntoClause()
> and _outIntoClause().

OK.

> > ivm=# create table t (c1 int, c2 int);
> > CREATE TABLE
> > ivm=# create incremental materialized view ivm_t as select distinct c1 from t;
> > NOTICE:  created index "ivm_t_index" on materialized view "ivm_t"
> > SELECT 0
> >
> > Then I executed pg_dump.
> >
> > In the dump, the following SQLs appear.
> >
> > CREATE INCREMENTAL MATERIALIZED VIEW public.ivm_t AS
> >  SELECT DISTINCT t.c1
> >    FROM public.t
> >   WITH NO DATA;
> >
> > ALTER TABLE ONLY public.ivm_t
> >     ADD CONSTRAINT ivm_t_index UNIQUE (c1);
> >
> > If I execute psql with the result of pg_dump, following error occurs.
> >
> > ERROR:  ALTER action ADD CONSTRAINT cannot be performed on relation
> "ivm_t"
> > DETAIL:  This operation is not supported for materialized views.
>
> Good catch! It was my mistake creating unique constraints on IMMV in spite of
> we cannot defined them via SQL. I'll fix it to use unique indexes instead of
> constraints.

I checked the same procedure on v24 patch.
But following error occurs instead of the original error.

ERROR:  relation "ivm_t_index" already exists

Regards,
Ryohei Takahashi



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: parallel vacuum comments
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: parallel vacuum comments