forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit784b1ba
committed
Remove arbitrary line length limits in pg_regress (plain and ECPG).
Refactor replace_string() to use a StringInfo for the modifiablestring argument. This allows the string to be of indefinite sizeinitially and/or grow substantially during replacement. The previouslogic in convert_sourcefiles_in() had a hard-wired limit of 1024bytes on any line in input/*.sql or output/*.out files. While we'venot had reports of trouble yet, it'd surely have bit us someday.This also fixes replace_string() so it won't get into an infiniteloop if the string-to-be-replaced is a substring of the replacement.That's unlikely to happen in current usage, but the function surelyshouldn't depend on it.Also fix ecpg_filter() to use a StringInfo and thereby remove itshard limit of 300 bytes on the length of an ecpg source line.Asim Rama Praveen and Georgios Kokolatos,reviewed by Alvaro Herrera and myselfDiscussion:https://postgr.es/m/y9Dlk2QhiZ39DhaB1QE9mgZ95HcOQKZCNtGwN7XCRKMdBRBnX_0woaRUtTjloEp4PKA6ERmcUcfq3lPGfKPOJ5xX2TV-5WoRYyySeNHRzdw=@protonmail.com1 parent8e3c58e commit784b1ba
File tree
3 files changed
+77
-56
lines changed- src
- interfaces/ecpg/test
- test/regress
3 files changed
+77
-56
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
| 22 | + | |
| 23 | + | |
22 | 24 |
| |
23 |
| - | |
24 | 25 |
| |
25 | 26 |
| |
26 | 27 |
| |
| |||
31 | 32 |
| |
32 | 33 |
| |
33 | 34 |
| |
34 |
| - | |
| 35 | + | |
35 | 36 |
| |
36 | 37 |
| |
37 | 38 |
| |
| |||
46 | 47 |
| |
47 | 48 |
| |
48 | 49 |
| |
49 |
| - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
50 | 53 |
| |
51 | 54 |
| |
52 |
| - | |
| 55 | + | |
53 | 56 |
| |
54 |
| - | |
55 |
| - | |
| 57 | + | |
56 | 58 |
| |
57 | 59 |
| |
58 | 60 |
| |
| |||
62 | 64 |
| |
63 | 65 |
| |
64 | 66 |
| |
65 |
| - | |
66 |
| - | |
67 |
| - | |
| 67 | + | |
| 68 | + | |
68 | 69 |
| |
69 | 70 |
| |
70 |
| - | |
| 71 | + | |
| 72 | + | |
71 | 73 |
| |
| 74 | + | |
| 75 | + | |
72 | 76 |
| |
73 | 77 |
| |
74 | 78 |
| |
| |||
87 | 91 |
| |
88 | 92 |
| |
89 | 93 |
| |
90 |
| - | |
| 94 | + | |
| 95 | + | |
91 | 96 |
| |
92 |
| - | |
| 97 | + | |
93 | 98 |
| |
94 |
| - | |
| 99 | + | |
95 | 100 |
| |
96 | 101 |
| |
97 |
| - | |
98 | 102 |
| |
99 | 103 |
| |
100 | 104 |
| |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
101 | 110 |
| |
102 |
| - | |
103 |
| - | |
104 | 111 |
| |
105 | 112 |
| |
106 |
| - | |
| 113 | + | |
107 | 114 |
| |
108 | 115 |
| |
109 |
| - | |
| 116 | + | |
110 | 117 |
| |
111 | 118 |
| |
112 |
| - | |
113 |
| - | |
114 |
| - | |
115 |
| - | |
116 |
| - | |
117 |
| - | |
118 |
| - | |
119 |
| - | |
120 |
| - | |
121 |
| - | |
122 |
| - | |
123 |
| - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
124 | 130 |
| |
125 | 131 |
| |
126 | 132 |
| |
| |||
134 | 140 |
| |
135 | 141 |
| |
136 | 142 |
| |
137 |
| - | |
138 | 143 |
| |
139 | 144 |
| |
140 |
| - | |
141 |
| - | |
142 | 145 |
| |
143 | 146 |
| |
144 | 147 |
| |
145 | 148 |
| |
146 | 149 |
| |
147 | 150 |
| |
148 |
| - | |
| 151 | + | |
149 | 152 |
| |
150 | 153 |
| |
151 | 154 |
| |
| |||
160 | 163 |
| |
161 | 164 |
| |
162 | 165 |
| |
163 |
| - | |
164 |
| - | |
165 |
| - | |
166 |
| - | |
| 166 | + | |
167 | 167 |
| |
168 | 168 |
| |
169 | 169 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
31 | 31 |
| |
32 | 32 |
| |
33 | 33 |
| |
| 34 | + | |
34 | 35 |
| |
35 | 36 |
| |
| 37 | + | |
36 | 38 |
| |
37 | 39 |
| |
38 | 40 |
| |
| |||
435 | 437 |
| |
436 | 438 |
| |
437 | 439 |
| |
438 |
| - | |
439 |
| - | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
440 | 445 |
| |
441 | 446 |
| |
442 |
| - | |
| 447 | + | |
443 | 448 |
| |
| 449 | + | |
444 | 450 |
| |
445 | 451 |
| |
446 |
| - | |
| 452 | + | |
447 | 453 |
| |
448 |
| - | |
| 454 | + | |
| 455 | + | |
449 | 456 |
| |
450 |
| - | |
451 |
| - | |
452 |
| - | |
453 |
| - | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
454 | 466 |
| |
455 | 467 |
| |
456 | 468 |
| |
| |||
521 | 533 |
| |
522 | 534 |
| |
523 | 535 |
| |
524 |
| - | |
| 536 | + | |
525 | 537 |
| |
526 | 538 |
| |
527 | 539 |
| |
| |||
551 | 563 |
| |
552 | 564 |
| |
553 | 565 |
| |
554 |
| - | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
555 | 570 |
| |
556 |
| - | |
557 |
| - | |
558 |
| - | |
559 |
| - | |
560 |
| - | |
561 |
| - | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
562 | 578 |
| |
| 579 | + | |
| 580 | + | |
563 | 581 |
| |
564 | 582 |
| |
565 | 583 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
18 | 18 |
| |
19 | 19 |
| |
20 | 20 |
| |
| 21 | + | |
| 22 | + | |
21 | 23 |
| |
22 | 24 |
| |
23 | 25 |
| |
| |||
49 | 51 |
| |
50 | 52 |
| |
51 | 53 |
| |
52 |
| - | |
| 54 | + | |
| 55 | + | |
53 | 56 |
|
0 commit comments
Comments
(0)