PostgreSQL Source Code: src/backend/access/gin/ginlogic.c Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

36

38

39

40

41

42

43

44#define MAX_MAYBE_ENTRIES 4

45

46

47

48

49static bool

51{

52 key->recheckCurItem = false;

53 return true;

54}

57{

59}

60

61

62

63

64static bool

66{

67

68

69

70

71 key->recheckCurItem = true;

72

74 key->collation,

77 key->query,

83}

84

85

86

87

90{

92 key->collation,

95 key->query,

100}

101

102

103

104

105

106

107static bool

109{

111

113 key->collation,

116 key->query,

122 {

123 key->recheckCurItem = true;

124 return true;

125 }

126 else

127 {

128 key->recheckCurItem = false;

129 return result;

130 }

131}

132

133

134

135

136

137

138

139

140

141

142

143

144

145

146

149{

150 int nmaybe;

152 int i;

153 bool boolResult;

154 bool recheck;

156

157

158

159

160

161

162 nmaybe = 0;

163 for (i = 0; i < key->nentries; i++)

164 {

166 {

169 maybeEntries[nmaybe++] = i;

170 }

171 }

172

173

174

175

176

177 if (nmaybe == 0)

179

180

181 for (i = 0; i < nmaybe; i++)

184 recheck = key->recheckCurItem;

185

186 for (;;)

187 {

188

189 for (i = 0; i < nmaybe; i++)

190 {

192 {

194 break;

195 }

196 else

198 }

199 if (i == nmaybe)

200 break;

201

203 recheck |= key->recheckCurItem;

204

205 if (curResult != boolResult)

206 {

208 break;

209 }

210 }

211

212

213 if (curResult == GIN_TRUE && recheck)

215

216

217 for (i = 0; i < nmaybe; i++)

219

220 return curResult;

221}

222

223

224

225

226void

228{

230 {

233 }

234 else

235 {

239

242 else

244

247 else

249 }

250}

#define OidIsValid(objectId)

Datum FunctionCall8Coll(FmgrInfo *flinfo, Oid collation, Datum arg1, Datum arg2, Datum arg3, Datum arg4, Datum arg5, Datum arg6, Datum arg7, Datum arg8)

Datum FunctionCall7Coll(FmgrInfo *flinfo, Oid collation, Datum arg1, Datum arg2, Datum arg3, Datum arg4, Datum arg5, Datum arg6, Datum arg7)

#define GIN_SEARCH_MODE_EVERYTHING

static GinTernaryValue DatumGetGinTernaryValue(Datum X)

static GinTernaryValue trueTriConsistentFn(GinScanKey key)

static GinTernaryValue shimTriConsistentFn(GinScanKey key)

static GinTernaryValue directTriConsistentFn(GinScanKey key)

static bool trueConsistentFn(GinScanKey key)

static bool directBoolConsistentFn(GinScanKey key)

void ginInitConsistentFunction(GinState *ginstate, GinScanKey key)

#define MAX_MAYBE_ENTRIES

static bool shimBoolConsistentFn(GinScanKey key)

static bool DatumGetBool(Datum X)

static Datum PointerGetDatum(const void *X)

static Datum UInt16GetDatum(uint16 X)

static Datum UInt32GetDatum(uint32 X)

FmgrInfo triConsistentFn[INDEX_MAX_KEYS]

FmgrInfo consistentFn[INDEX_MAX_KEYS]

Oid supportCollation[INDEX_MAX_KEYS]