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

Commitc670d0f

Browse files
committed
Remove ineffective check against dropped columns from slot_getattr().
Before this commit slot_getattr() checked for droppedcolumns (returning NULL in that case), but only after checking forpreviously deformed columns. As slot_deform_tuple() does not containsuch a check, the check in slot_getattr() would often not have beenreached, depending on previous use of the slot.These days locking and plan invalidation ought to ensure that droppedcolumns are not accessed in query plans. Therefore this commit justdrops the insufficient check in slot_getattr(). It's possible thatwe'll find some holes againt use of dropped columns, but if so, thoseneed to be addressed independent of slot_getattr(), as most accessesdon't go through that function anyway.Author: Andres FreundDiscussion:https://postgr.es/m/20181107174403.zai7fedgcjoqx44p@alap3.anarazel.de
1 parent1ef6bd2 commitc670d0f

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

‎src/backend/executor/execTuples.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,17 +1132,6 @@ slot_getattr(TupleTableSlot *slot, int attnum, bool *isnull)
11321132
return (Datum)0;
11331133
}
11341134

1135-
/*
1136-
* If the attribute's column has been dropped, we force a NULL result.
1137-
* This case should not happen in normal use, but it could happen if we
1138-
* are executing a plan cached before the column was dropped.
1139-
*/
1140-
if (TupleDescAttr(tupleDesc,attnum-1)->attisdropped)
1141-
{
1142-
*isnull= true;
1143-
return (Datum)0;
1144-
}
1145-
11461135
/*
11471136
* Extract the attribute, along with any preceding attributes.
11481137
*/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp