static int32
tidcmp(const void *a, const void *b)
{
- ItemPointer iptr1 = ((const ItemPointer) a);
- ItemPointer iptr2 = ((const ItemPointer) b);
+ const ItemPointerData *iptr1 = a;
+ const ItemPointerData *iptr2 = b;
return ItemPointerCompare(iptr1, iptr2);
}
static int
entryIndexByFrequencyCmp(const void *a1, const void *a2, void *arg)
{
- const GinScanKey key = (const GinScanKey) arg;
+ const GinScanKeyData *key = arg;
int i1 = *(const int *) a1;
int i2 = *(const int *) a2;
uint32 n1 = key->scanEntry[i1]->predictNumberResult;
#define MaxBytesPerInteger 7
static inline uint64
-itemptr_to_uint64(const ItemPointer iptr)
+itemptr_to_uint64(const ItemPointerData *iptr)
{
uint64 val;
* byte at the end, if any, is zero.
*/
GinPostingList *
-ginCompressPostingList(const ItemPointer ipd, int nipd, int maxsize,
+ginCompressPostingList(const ItemPointerData *ipd, int nipd, int maxsize,
int *nwritten)
{
uint64 prev;
#include "miscadmin.h"
#include "utils/lsyscache.h"
-static int TupleHashTableMatch(struct tuplehash_hash *tb, const MinimalTuple tuple1, const MinimalTuple tuple2);
+static int TupleHashTableMatch(struct tuplehash_hash *tb, MinimalTuple tuple1, MinimalTuple tuple2);
static inline uint32 TupleHashTableHash_internal(struct tuplehash_hash *tb,
- const MinimalTuple tuple);
+ MinimalTuple tuple);
static inline TupleHashEntry LookupTupleHashEntry_internal(TupleHashTable hashtable,
TupleTableSlot *slot,
bool *isnew, uint32 hash);
*/
static uint32
TupleHashTableHash_internal(struct tuplehash_hash *tb,
- const MinimalTuple tuple)
+ MinimalTuple tuple)
{
TupleHashTable hashtable = (TupleHashTable) tb->private_data;
uint32 hashkey;
* See whether two tuples (presumably of the same hash value) match
*/
static int
-TupleHashTableMatch(struct tuplehash_hash *tb, const MinimalTuple tuple1, const MinimalTuple tuple2)
+TupleHashTableMatch(struct tuplehash_hash *tb, MinimalTuple tuple1, MinimalTuple tuple2)
{
TupleTableSlot *slot1;
TupleTableSlot *slot2;
* TBMIterateResult when any of these tuples are reported out.
*/
void
-tbm_add_tuples(TIDBitmap *tbm, const ItemPointer tids, int ntids,
+tbm_add_tuples(TIDBitmap *tbm, const ItemPointerData *tids, int ntids,
bool recheck)
{
BlockNumber currblk = InvalidBlockNumber;
void *arg,
TSExecuteCallback chkcond,
List **locations);
-static int tsvector_bsearch(const TSVector tsv, char *lexeme, int lexeme_len);
+static int tsvector_bsearch(const TSVectorData *tsv, char *lexeme, int lexeme_len);
static Datum tsvector_update_trigger(PG_FUNCTION_ARGS, bool config_column);
* Order: haspos, len, word, for all positions (pos, weight)
*/
static int
-silly_cmp_tsvector(const TSVector a, const TSVector b)
+silly_cmp_tsvector(const TSVectorData *a, const TSVectorData *b)
{
if (VARSIZE(a) < VARSIZE(b))
return -1;
return 1;
else
{
- WordEntry *aptr = ARRPTR(a);
- WordEntry *bptr = ARRPTR(b);
+ const WordEntry *aptr = ARRPTR(a);
+ const WordEntry *bptr = ARRPTR(b);
int i = 0;
int res;
* found.
*/
static int
-tsvector_bsearch(const TSVector tsv, char *lexeme, int lexeme_len)
+tsvector_bsearch(const TSVectorData *tsv, char *lexeme, int lexeme_len)
{
- WordEntry *arrin = ARRPTR(tsv);
+ const WordEntry *arrin = ARRPTR(tsv);
int StopLow = 0,
StopHigh = tsv->size,
StopMiddle,
bool curItemMatches;
bool recheckCurItem;
bool isFinished;
-} GinScanKeyData;
+} GinScanKeyData;
typedef struct GinScanEntryData
{
/* ginpostinglist.c */
-extern GinPostingList *ginCompressPostingList(const ItemPointer ipd, int nipd,
+extern GinPostingList *ginCompressPostingList(const ItemPointerData *ipd, int nipd,
int maxsize, int *nwritten);
extern int ginPostingListDecodeAllSegmentsToTbm(GinPostingList *ptr, int len, TIDBitmap *tbm);
extern void tbm_free_shared_area(dsa_area *dsa, dsa_pointer dp);
extern void tbm_add_tuples(TIDBitmap *tbm,
- const ItemPointer tids, int ntids,
+ const ItemPointerData *tids, int ntids,
bool recheck);
extern void tbm_add_page(TIDBitmap *tbm, BlockNumber pageno);
GinScanEntry
GinScanItem
GinScanKey
+GinScanKeyData
GinScanOpaque
GinScanOpaqueData
GinSegmentInfo