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

Commit4c0ec9e

Browse files
committed
Use platform independent type for TupleTableSlot->tts_off.
Previously tts_off was, for unknown reasons, of type long. For onethat's unnecessary as tuples are restricted in length, for anotherlong would be a bad choice of type even if that weren't the case, asit's not reliably wider than an int. Also HeapTupleHeader->t_len is auint32.This is split off from a larger patch implementing JITed tupledeforming. Seems like an independent improvement, as tiny as it is.Author: Andres Freund
1 parentc2ff42c commit4c0ec9e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -942,7 +942,7 @@ heap_deform_tuple(HeapTuple tuple, TupleDesc tupleDesc,
942942
intnatts;/* number of atts to extract */
943943
intattnum;
944944
char*tp;/* ptr to tuple data */
945-
longoff;/* offset in tuple data */
945+
uint32off;/* offset in tuple data */
946946
bits8*bp=tup->t_bits;/* ptr to null bitmap in tuple */
947947
boolslow= false;/* can we use/set attcacheoff? */
948948

@@ -1043,7 +1043,7 @@ slot_deform_tuple(TupleTableSlot *slot, int natts)
10431043
boolhasnulls=HeapTupleHasNulls(tuple);
10441044
intattnum;
10451045
char*tp;/* ptr to tuple data */
1046-
longoff;/* offset in tuple data */
1046+
uint32off;/* offset in tuple data */
10471047
bits8*bp=tup->t_bits;/* ptr to null bitmap in tuple */
10481048
boolslow;/* can we use/set attcacheoff? */
10491049

‎src/include/executor/tuptable.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ typedef struct TupleTableSlot
126126
bool*tts_isnull;/* current per-attribute isnull flags */
127127
MinimalTupletts_mintuple;/* minimal tuple, or NULL if none */
128128
HeapTupleDatatts_minhdr;/* workspace for minimal-tuple-only case */
129-
longtts_off;/* saved state for slot_deform_tuple */
129+
uint32tts_off;/* saved state for slot_deform_tuple */
130130
booltts_fixedTupleDescriptor;/* descriptor can't be changed */
131131
}TupleTableSlot;
132132

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp