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

Commite4a7c03

Browse files
committed
Address ccvalid/ccnoinherit in TupleDesc support functions.
equalTupleDescs() neglected both of these ConstrCheck fields, andCreateTupleDescCopyConstr() neglected ccnoinherit. At this time, theonly known behavior defect resulting from these omissions is constraintexclusion disregarding a CHECK constraint validated by an ALTER TABLEVALIDATE CONSTRAINT statement issued earlier in the same transaction.Back-patch to 9.2, where these fields were introduced.
1 parentfb91874 commite4a7c03

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎src/backend/access/common/tupdesc.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ CreateTupleDescCopyConstr(TupleDesc tupdesc)
204204
if (constr->check[i].ccbin)
205205
cpy->check[i].ccbin=pstrdup(constr->check[i].ccbin);
206206
cpy->check[i].ccvalid=constr->check[i].ccvalid;
207+
cpy->check[i].ccnoinherit=constr->check[i].ccnoinherit;
207208
}
208209
}
209210

@@ -417,7 +418,9 @@ equalTupleDescs(TupleDesc tupdesc1, TupleDesc tupdesc2)
417418
for (j=0;j<n;check2++,j++)
418419
{
419420
if (strcmp(check1->ccname,check2->ccname)==0&&
420-
strcmp(check1->ccbin,check2->ccbin)==0)
421+
strcmp(check1->ccbin,check2->ccbin)==0&&
422+
check1->ccvalid==check2->ccvalid&&
423+
check1->ccnoinherit==check2->ccnoinherit)
421424
break;
422425
}
423426
if (j >=n)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp