Re: Incremental View Maintenance, take 2

From: Kirill Reshke <reshkekirill(at)gmail(dot)com>
To: Yugo NAGATA <nagata(at)sraoss(dot)co(dot)jp>
Cc: Peter Smith <smithpb2250(at)gmail(dot)com>, jian he <jian(dot)universality(at)gmail(dot)com>, Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Incremental View Maintenance, take 2
Date: 2024-08-06 14:29:09
Message-ID: CALdSSPiQbTmLRjj3TbzEaioqJ2ubkAtRbGn=OtXhT-EAHJvXXw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 11 Jul 2024 at 09:24, Yugo NAGATA <nagata(at)sraoss(dot)co(dot)jp> wrote:
>
> On Tue, 2 Jul 2024 17:03:11 +0900
> Yugo NAGATA <nagata(at)sraoss(dot)co(dot)jp> wrote:
>
> > On Sun, 31 Mar 2024 22:59:31 +0900
> > Yugo NAGATA <nagata(at)sraoss(dot)co(dot)jp> wrote:
> > > >
> > > > Also, I added a comment on RelationIsIVM() macro persuggestion from jian he.
> > > > In addition, I fixed a failure reported from cfbot on FreeBSD build caused by;
> > > >
> > > > WARNING: outfuncs/readfuncs failed to produce an equal rewritten parse tree
> > > >
> > > > This warning was raised since I missed to modify outfuncs.c for a new field.
> > >
> > > I found cfbot on FreeBSD still reported a failure due to
> > > ENFORCE_REGRESSION_TEST_NAME_RESTRICTIONS because the regression test used
> > > wrong role names. Attached is a fixed version, v32.
> >
> > Attached is a rebased version, v33.
>
> I updated the patch to bump up the version numbers in psql and pg_dump codes
> from 17 to 18.
>
> Regards,
> Yugo Nagata
>
> >
> > Regards,
> > Yugo Nagata
> >
> >
> > --
> > Yugo NAGATA <nagata(at)sraoss(dot)co(dot)jp>
>
>
> --
> Yugo NAGATA <nagata(at)sraoss(dot)co(dot)jp>

Small updates with something o found recent days:

```
db2=# create incremental materialized view v2 as select * from v1;
ERROR: VIEW or MATERIALIZED VIEW is not supported on incrementally
maintainable materialized view
```
Error messaging is not true, create view v2 as select * from v1; works fine.

```
db2=# create incremental materialized view vv2 as select i,j2, i / j2
from t1 join t2 on true;
db2=# insert into t2 values(1,0);
ERROR: division by zero
```
It is very strange to receive `division by zero` while inserting into
relation, isn't it? Can we add some hints/CONTEXT here?
Regular triggers do it:
```
db2=# insert into ttt values(100000,0);
ERROR: division by zero
CONTEXT: PL/pgSQL function f1() line 3 at IF
```

--
Best regards,
Kirill Reshke

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2024-08-06 14:45:48 Re: Support multi-column renaming?
Previous Message Tom Lane 2024-08-06 14:20:36 Re: Fix comments in instr_time.h and remove an unneeded cast to int64