|
7 | 7 | *
|
8 | 8 | *
|
9 | 9 | * IDENTIFICATION
|
10 |
| - * $Header: /cvsroot/pgsql/src/backend/access/hash/hashsearch.c,v 1.7 1996/11/05 09:40:23 scrappy Exp $ |
| 10 | + * $Header: /cvsroot/pgsql/src/backend/access/hash/hashsearch.c,v 1.8 1996/11/21 06:06:52 vadim Exp $ |
11 | 11 | *
|
12 | 12 | *-------------------------------------------------------------------------
|
13 | 13 | */
|
@@ -74,7 +74,6 @@ _hash_next(IndexScanDesc scan, ScanDirection dir)
|
74 | 74 | OffsetNumber offnum;
|
75 | 75 | RetrieveIndexResult res;
|
76 | 76 | ItemPointer current;
|
77 |
| - ItemPointer iptr; |
78 | 77 | HashItem hitem;
|
79 | 78 | IndexTuple itup;
|
80 | 79 | HashScanOpaque so;
|
@@ -116,9 +115,7 @@ _hash_next(IndexScanDesc scan, ScanDirection dir)
|
116 | 115 | _hash_checkpage(page, LH_BUCKET_PAGE|LH_OVERFLOW_PAGE);
|
117 | 116 | hitem = (HashItem) PageGetItem(page, PageGetItemId(page, offnum));
|
118 | 117 | itup = &hitem->hash_itup;
|
119 |
| - iptr = (ItemPointer) palloc(sizeof(ItemPointerData)); |
120 |
| - memmove((char *) iptr, (char *) &(itup->t_tid), sizeof(ItemPointerData)); |
121 |
| - res = FormRetrieveIndexResult(current, iptr); |
| 118 | + res = FormRetrieveIndexResult(current, &(itup->t_tid)); |
122 | 119 |
|
123 | 120 | return (res);
|
124 | 121 | }
|
@@ -184,7 +181,6 @@ _hash_first(IndexScanDesc scan, ScanDirection dir)
|
184 | 181 | HashItem hitem;
|
185 | 182 | IndexTuple itup;
|
186 | 183 | ItemPointer current;
|
187 |
| - ItemPointer iptr; |
188 | 184 | OffsetNumber offnum;
|
189 | 185 | RetrieveIndexResult res;
|
190 | 186 | HashScanOpaque so;
|
@@ -245,9 +241,7 @@ _hash_first(IndexScanDesc scan, ScanDirection dir)
|
245 | 241 | _hash_checkpage(page, LH_BUCKET_PAGE|LH_OVERFLOW_PAGE);
|
246 | 242 | hitem = (HashItem) PageGetItem(page, PageGetItemId(page, offnum));
|
247 | 243 | itup = &hitem->hash_itup;
|
248 |
| - iptr = (ItemPointer) palloc(sizeof(ItemPointerData)); |
249 |
| - memmove((char *) iptr, (char *) &(itup->t_tid), sizeof(ItemPointerData)); |
250 |
| - res = FormRetrieveIndexResult(current, iptr); |
| 244 | + res = FormRetrieveIndexResult(current, &(itup->t_tid)); |
251 | 245 |
|
252 | 246 | return (res);
|
253 | 247 | }
|
|
0 commit comments