PostgreSQL Source Code: src/backend/executor/execJunk.c Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

14

16

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

61{

66

67

68

69

71

72

73

74

75 if (slot)

77 else

79

80

81

82

83

84

85

86

87

88

89

92 {

95

98 foreach(t, targetList)

99 {

101

102 if (tle->resjunk)

103 {

106 }

107 }

109 }

110 else

112

113

114

115

117

118 junkfilter->jf_targetList = targetList;

122

124}

125

126

127

128

129

130

131

132

133

134

135

140{

145 int i;

146

147

148

149

150 if (slot)

152 else

154

155

156

157

158

159

160

161

162

163

164

167 {

171 {

173 continue;

174 for (;;)

175 {

177

178 t = lnext(targetList, t);

179 if (tle->resjunk)

180 {

182 break;

183 }

184 }

185 }

186 }

187 else

189

190

191

192

194

195 junkfilter->jf_targetList = targetList;

199

201}

202

203

204

205

206

207

208

214

215

216

217

218

219

220

223{

225

226 foreach(t, targetlist)

227 {

229

230 if (tle->resjunk && tle->resname &&

232 {

233

234 return tle->resno;

235 }

236 }

237

239}

240

241

242

243

244

245

248{

253 int i;

255 bool *isnull;

258

259

260

261

265

266

267

268

273

274

275

276

280

281

282

283

285 {

287

288 if (j == 0)

289 {

291 isnull[i] = true;

292 }

293 else

294 {

297 }

298 }

299

300

301

302

304}

#define InvalidAttrNumber

static Datum values[MAXATTR]

#define Assert(condition)

JunkFilter * ExecInitJunkFilterConversion(List *targetList, TupleDesc cleanTupType, TupleTableSlot *slot)

TupleTableSlot * ExecFilterJunk(JunkFilter *junkfilter, TupleTableSlot *slot)

AttrNumber ExecFindJunkAttributeInTlist(List *targetlist, const char *attrName)

JunkFilter * ExecInitJunkFilter(List *targetList, TupleTableSlot *slot)

AttrNumber ExecFindJunkAttribute(JunkFilter *junkfilter, const char *attrName)

TupleTableSlot * MakeSingleTupleTableSlot(TupleDesc tupdesc, const TupleTableSlotOps *tts_ops)

const TupleTableSlotOps TTSOpsVirtual

TupleTableSlot * ExecStoreVirtualTuple(TupleTableSlot *slot)

TupleDesc ExecCleanTypeFromTL(List *targetList)

void ExecSetSlotDescriptor(TupleTableSlot *slot, TupleDesc tupdesc)

void * palloc0(Size size)

static ListCell * list_head(const List *l)

static ListCell * lnext(const List *l, const ListCell *c)

static CompactAttribute * TupleDescCompactAttr(TupleDesc tupdesc, int i)

static TupleTableSlot * ExecClearTuple(TupleTableSlot *slot)

static void slot_getallattrs(TupleTableSlot *slot)