Re: BUG #17897: Crash on assignment to array of constraint-less domain over composite type
От | Dmitry Dolgov |
---|---|
Тема | Re: BUG #17897: Crash on assignment to array of constraint-less domain over composite type |
Дата | |
Msg-id | 20230415151709.jh7ygoak2fc2msdb@erthalion.local обсуждение исходный текст |
Ответ на | BUG #17897: Crash on assignment to array of constraint-less domain over composite type (PG Bug reporting form <noreply@postgresql.org>) |
Ответы |
Re: BUG #17897: Crash on assignment to array of constraint-less domain over composite type
|
Список | pgsql-bugs |
> On Fri, Apr 14, 2023 at 07:00:01PM +0000, PG Bug reporting form wrote: > > The following modified excerpt from regress/sql/domain.sql: > create type comptype as (cf1 int, cf2 int); > create domain dcomptype as comptype; > > create table dcomptable (f1 dcomptype[]); > insert into dcomptable values (null); > update dcomptable set f1[1].cf2 = 5; > > causes a server crash with the following stack trace: > [...] > Not reproduced on REL_11_STABLE, but reproduced on REL_12_STABLE .. master > since 04fe805a1 made a constraint-less domain represented as a RelabelType > (not CoerceToDomain) and thus the fix for [1] (ae7b1dd59) doesn't cover > this > case. Looks like it could be fixed in the same way as in ae7b1dd59 ? diff --git a/src/backend/executor/execExpr.c b/src/backend/executor/execExpr.c index 4c6700de04..06fbf19423 100644 --- a/src/backend/executor/execExpr.c +++ b/src/backend/executor/execExpr.c @@ -3253,6 +3253,12 @@ isAssignmentIndirectionExpr(Expr *expr) return isAssignmentIndirectionExpr(cd->arg); } + else if (IsA(expr, RelabelType)) + { + RelabelType *rt = (RelabelType *) expr; + + return isAssignmentIndirectionExpr(rt->arg); + } return false; }
В списке pgsql-bugs по дате отправления: