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

Commitd8ddb10

Browse files
committed
Reduce size of inlining.
1 parent1af818b commitd8ddb10

File tree

3 files changed

+48
-40
lines changed

3 files changed

+48
-40
lines changed

‎src/include/access/heapam.h

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: heapam.h,v 1.27 1998/01/31 04:39:21 momjian Exp $
9+
* $Id: heapam.h,v 1.28 1998/02/01 05:38:38 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -95,22 +95,21 @@ typedef HeapAccessStatisticsData *HeapAccessStatistics;
9595
((isnull) ? (*(isnull) = false) : (dummyret)NULL), \
9696
HeapTupleNoNulls(tup) ? \
9797
( \
98-
((tupleDesc)->attrs[(attnum)-1]->attcacheoff > 0) ? \
98+
((tupleDesc)->attrs[(attnum)-1]->attcacheoff > 0 || \
99+
(attnum) == 1) ? \
99100
( \
100101
(Datum)fetchatt(&((tupleDesc)->attrs[(attnum)-1]), \
101-
(char *) (tup) + (tup)->t_hoff + (tupleDesc)->attrs[(attnum)-1]->attcacheoff) \
102-
) \
103-
: \
104-
( \
105-
((attnum)-1 == 0) ? \
106-
( \
107-
(Datum)fetchatt(&((tupleDesc)->attrs[0]), (char *) (tup) + (tup)->t_hoff) \
108-
) \
109-
: \
110-
( \
111-
nocachegetattr((tup), (attnum), (tupleDesc), (isnull)) \
102+
(char *) (tup) + (tup)->t_hoff + \
103+
( \
104+
((attnum) != 1) ? \
105+
(tupleDesc)->attrs[(attnum)-1]->attcacheoff \
106+
: \
107+
0 \
108+
) \
112109
) \
113110
) \
111+
: \
112+
nocachegetattr((tup), (attnum), (tupleDesc), (isnull)) \
114113
) \
115114
: \
116115
( \

‎src/include/access/itup.h

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: itup.h,v 1.10 1998/01/31 04:39:23 momjian Exp $
9+
* $Id: itup.h,v 1.11 1998/02/01 05:38:39 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -123,28 +123,27 @@ typedef struct PredInfo
123123
*(isnull) = false, \
124124
IndexTupleNoNulls(tup) ? \
125125
( \
126-
((tupleDesc)->attrs[(attnum)-1]->attcacheoff > 0) ? \
126+
((tupleDesc)->attrs[(attnum)-1]->attcacheoff > 0 || \
127+
(attnum) == 1) ? \
127128
( \
128129
(Datum)fetchatt(&((tupleDesc)->attrs[(attnum)-1]), \
129-
(char *) (tup) + \
130-
(IndexTupleHasMinHeader(tup) ? sizeof (*(tup)) : \
131-
IndexInfoFindDataOffset((tup)->t_info)) + \
132-
(tupleDesc)->attrs[(attnum)-1]->attcacheoff) \
133-
) \
134-
: \
135-
( \
136-
((attnum)-1 == 0) ? \
137-
( \
138-
(Datum)fetchatt(&((tupleDesc)->attrs[0]), \
139-
(char *) (tup) + \
140-
(IndexTupleHasMinHeader(tup) ? sizeof (*(tup)) : \
141-
IndexInfoFindDataOffset((tup)->t_info))) \
142-
) \
143-
: \
144-
( \
145-
nocache_index_getattr((tup), (attnum), (tupleDesc), (isnull)) \
130+
(char *) (tup) + \
131+
( \
132+
IndexTupleHasMinHeader(tup) ? \
133+
sizeof (*(tup)) \
134+
: \
135+
IndexInfoFindDataOffset((tup)->t_info) \
136+
) + \
137+
( \
138+
((attnum) != 1) ? \
139+
(tupleDesc)->attrs[(attnum)-1]->attcacheoff \
140+
: \
141+
0 \
142+
) \
146143
) \
147144
) \
145+
: \
146+
nocache_index_getattr((tup), (attnum), (tupleDesc), (isnull)) \
148147
) \
149148
: \
150149
( \

‎src/include/access/tupmacs.h

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: tupmacs.h,v 1.2 1997/09/07 04:56:17 momjian Exp $
9+
* $Id: tupmacs.h,v 1.3 1998/02/01 05:38:40 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -44,12 +44,22 @@
4444
* I would eliminate attbyval altogether, but I don't know how. -BRYANH.
4545
*/
4646
#definefetchatt(A,T) \
47-
((*(A))->attbyval && (*(A))->attlen != -1 \
48-
? ((*(A))->attlen > sizeof(int16) \
49-
? (char *) (long) *((int32 *)(T)) \
50-
: ((*(A))->attlen < sizeof(int16) \
51-
? (char *) (long) *((char *)(T)) \
52-
: (char *) (long) *((int16 *)(T)))) \
53-
: (char *) (T))
47+
( \
48+
(*(A))->attbyval && (*(A))->attlen != -1 ? \
49+
( \
50+
(*(A))->attlen > sizeof(int16) ? \
51+
( \
52+
(char *) (long) *((int32 *)(T)) \
53+
) \
54+
: \
55+
( \
56+
(*(A))->attlen < sizeof(int16) ? \
57+
(char *) (long) *((char *)(T)) \
58+
: \
59+
(char *) (long) *((int16 *)(T))) \
60+
) \
61+
: \
62+
(char *) (T) \
63+
)
5464

5565
#endif

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp