Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitada667b

Browse files
committed
Fix variable lifespan in ExecInitCoerceToDomain().
This undoes a mistake in1ec7679: domainval and domainnull weremeant to live across loop iterations, but they were incorrectlymoved inside the loop. The effect was only to emit useless extraEEOP_MAKE_READONLY steps, so it's not a big deal; nonetheless,back-patch to v13 where the mistake was introduced.Ranier VilelaDiscussion:https://postgr.es/m/CAEudQAqXuhbkaAp-sGH6dR6Nsq7v28_0TPexHOm6FiDYqwQD-w@mail.gmail.com
1 parent0151af4 commitada667b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/backend/executor/execExpr.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2828,6 +2828,8 @@ ExecInitCoerceToDomain(ExprEvalStep *scratch, CoerceToDomain *ctest,
28282828
ExprState*state,Datum*resv,bool*resnull)
28292829
{
28302830
DomainConstraintRef*constraint_ref;
2831+
Datum*domainval=NULL;
2832+
bool*domainnull=NULL;
28312833
ListCell*l;
28322834

28332835
scratch->d.domaincheck.resulttype=ctest->resulttype;
@@ -2874,8 +2876,6 @@ ExecInitCoerceToDomain(ExprEvalStep *scratch, CoerceToDomain *ctest,
28742876
foreach(l,constraint_ref->constraints)
28752877
{
28762878
DomainConstraintState*con= (DomainConstraintState*)lfirst(l);
2877-
Datum*domainval=NULL;
2878-
bool*domainnull=NULL;
28792879
Datum*save_innermost_domainval;
28802880
bool*save_innermost_domainnull;
28812881

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp