PostgreSQL Source Code: src/fe_utils/conditional.c Source File (original) (raw)

1

2

3

4

5

6

7

8

9

11

13

14

15

16

19{

21

22 cstack->head = NULL;

23 return cstack;

24}

25

26

27

28

29void

31{

32 if (!cstack)

33 return;

34

36 continue;

37}

38

39

40

41

42void

44{

47}

48

49

50

51

52void

54{

56

61 cstack->head = p;

62}

63

64

65

66

67

68bool

70{

72

73 if (!p)

74 return false;

77 return true;

78}

79

80

81

82

83int

85{

86 if (cstack == NULL)

87 return -1;

88 else

89 {

91 int depth = 0;

92

93 while (p != NULL)

94 {

95 depth++;

97 }

98 return depth;

99 }

100}

101

102

103

104

107{

111}

112

113

114

115

116

117bool

119{

121 return false;

123 return true;

124}

125

126

127

128

129bool

131{

132 return cstack->head == NULL;

133}

134

135

136

137

138

139bool

141{

143

145}

146

147

148

149

150void

152{

155}

156

157

158

159

160

161int

163{

165 return -1;

167}

168

169

170

171

172void

174{

177}

178

179

180

181

182

183int

185{

187 return -1;

189}

void conditional_stack_set_paren_depth(ConditionalStack cstack, int depth)

ifState conditional_stack_peek(ConditionalStack cstack)

void conditional_stack_push(ConditionalStack cstack, ifState new_state)

ConditionalStack conditional_stack_create(void)

int conditional_stack_depth(ConditionalStack cstack)

bool conditional_stack_pop(ConditionalStack cstack)

void conditional_stack_destroy(ConditionalStack cstack)

void conditional_stack_set_query_len(ConditionalStack cstack, int len)

int conditional_stack_get_query_len(ConditionalStack cstack)

bool conditional_active(ConditionalStack cstack)

void conditional_stack_reset(ConditionalStack cstack)

int conditional_stack_get_paren_depth(ConditionalStack cstack)

bool conditional_stack_poke(ConditionalStack cstack, ifState new_state)

bool conditional_stack_empty(ConditionalStack cstack)

void * pg_malloc(size_t size)

Assert(PointerIsAligned(start, uint64))

struct IfStackElem * next