src/backend/nodes/copyfuncs.c - Coverage Report

← Back to Overview

# src/backend/nodes/copyfuncs.c

Coverage: 15/15 lines (100.0%)
Total Lines
15
modified
Covered
15
100.0%
Uncovered
0
0.0%
Keyboard navigation
_copyRPRPattern() lines 171-194
Modified Lines Coverage: 15/15 lines (100.0%)

Line | Hits | Source | Commit
--- | --- | --- | ---
171 | 3076 | _copyRPRPattern(const RPRPattern *from) | c54ba27Row pattern recognition patch (parse/analysis).
172 | - | { | c54ba27Row pattern recognition patch (parse/analysis).
173 | 3076 | RPRPattern *newnode = makeNode(RPRPattern); | c54ba27Row pattern recognition patch (parse/analysis).
174 | - |  | c54ba27Row pattern recognition patch (parse/analysis).
175 | 3076 | COPY_SCALAR_FIELD(numVars); | c54ba27Row pattern recognition patch (parse/analysis).
176 | 3076 | COPY_SCALAR_FIELD(maxDepth); | c54ba27Row pattern recognition patch (parse/analysis).
177 | 3076 | COPY_SCALAR_FIELD(numElements); | c54ba27Row pattern recognition patch (parse/analysis).
178 | - |  | c54ba27Row pattern recognition patch (parse/analysis).
179 | - | /* Deep copy the varNames array (DEFINE clause is required) */ | c54ba27Row pattern recognition patch (parse/analysis).
180 | 3076 | Assert(from->numVars > 0); | c54ba27Row pattern recognition patch (parse/analysis).
181 | 3076 | newnode->varNames = palloc0_array(char *, from->numVars); | c54ba27Row pattern recognition patch (parse/analysis).
182 | 10344 | for (int i = 0; i < from->numVars; i++) | c54ba27Row pattern recognition patch (parse/analysis).
183 | 7268 | newnode->varNames[i] = pstrdup(from->varNames[i]); | c54ba27Row pattern recognition patch (parse/analysis).
184 | - |  | c54ba27Row pattern recognition patch (parse/analysis).
185 | - | /* Deep copy the elements array (always has at least one element + FIN) */ | c54ba27Row pattern recognition patch (parse/analysis).
186 | 3076 | Assert(from->numElements >= 2); | c54ba27Row pattern recognition patch (parse/analysis).
187 | 3076 | newnode->elements = palloc_array(RPRPatternElement, from->numElements); | c54ba27Row pattern recognition patch (parse/analysis).
188 | 3076 | memcpy(newnode->elements, from->elements, | c54ba27Row pattern recognition patch (parse/analysis).
189 | 3076 | from->numElements * sizeof(RPRPatternElement)); | c54ba27Row pattern recognition patch (parse/analysis).
190 | - |  | c54ba27Row pattern recognition patch (parse/analysis).
191 | 3076 | COPY_SCALAR_FIELD(isAbsorbable); | c54ba27Row pattern recognition patch (parse/analysis).
192 | - |  | c54ba27Row pattern recognition patch (parse/analysis).
193 | 3076 | return newnode; | c54ba27Row pattern recognition patch (parse/analysis).
194 | - | } | c54ba27Row pattern recognition patch (parse/analysis).