forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit7652353
committed
Remove trailing newlines in pg_upgrade's message strings.
pg_upgrade does not use common/logging.c, which is unfortunatebut changing it to do so seems like more work than is justified.However, we really need to make it work more like common/logging.cin one respect: the latter expects supplied message strings to notend with a newline, instead adding one internally. As it stands,pg_upgrade's logging facilities expect a caller-supplied newlinein some cases and not others, which is already an invitation to bugs,but the inconsistency with our other frontend code makes it worse.There are already several places with missing or extra newlines,and it's inevitable that there won't be more if we let this stand.Hence, run around and get rid of all trailing newlines in messagestrings, and add an Assert that there's not one, similar to theexisting Assert in common/logging.c. Adjust the logging functionsto supply a newline at the right places.(Some of these strings also have a *leading* newline, which wouldbe a good thing to get rid of too; but this patch doesn't attemptthat.)There are some consequent minor changes in output. The ones thataren't outright bug fixes are generally removal of extra blanklines that the original coding intentionally inserted. It didn'tseem worth being bug-compatible with that.Patch by me, reviewed by Kyotaro Horiguchi and Peter EisentrautDiscussion:https://postgr.es/m/113191.1655233060@sss.pgh.pa.us1 parenteea9fa9 commit7652353
File tree
15 files changed
+317
-291
lines changed- src/bin/pg_upgrade
15 files changed
+317
-291
lines changedLines changed: 59 additions & 59 deletions
Large diffs are not rendered by default.
Lines changed: 80 additions & 74 deletions
Large diffs are not rendered by default.
Lines changed: 20 additions & 20 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
42 | 42 |
| |
43 | 43 |
| |
44 | 44 |
| |
45 |
| - | |
| 45 | + | |
46 | 46 |
| |
47 | 47 |
| |
48 | 48 |
| |
49 | 49 |
| |
50 | 50 |
| |
51 |
| - | |
| 51 | + | |
52 | 52 |
| |
53 | 53 |
| |
54 | 54 |
| |
| |||
105 | 105 |
| |
106 | 106 |
| |
107 | 107 |
| |
108 |
| - | |
| 108 | + | |
109 | 109 |
| |
110 | 110 |
| |
111 | 111 |
| |
112 |
| - | |
| 112 | + | |
113 | 113 |
| |
114 |
| - | |
| 114 | + | |
115 | 115 |
| |
116 | 116 |
| |
117 | 117 |
| |
| |||
150 | 150 |
| |
151 | 151 |
| |
152 | 152 |
| |
153 |
| - | |
| 153 | + | |
154 | 154 |
| |
155 | 155 |
| |
156 | 156 |
| |
| |||
182 | 182 |
| |
183 | 183 |
| |
184 | 184 |
| |
185 |
| - | |
| 185 | + | |
186 | 186 |
| |
187 | 187 |
| |
188 | 188 |
| |
189 |
| - | |
| 189 | + | |
190 | 190 |
| |
191 | 191 |
| |
192 | 192 |
| |
193 | 193 |
| |
194 |
| - | |
| 194 | + | |
195 | 195 |
| |
196 | 196 |
| |
197 | 197 |
| |
| |||
205 | 205 |
| |
206 | 206 |
| |
207 | 207 |
| |
208 |
| - | |
| 208 | + | |
209 | 209 |
| |
210 | 210 |
| |
211 | 211 |
| |
| |||
231 | 231 |
| |
232 | 232 |
| |
233 | 233 |
| |
234 |
| - | |
| 234 | + | |
235 | 235 |
| |
236 | 236 |
| |
237 | 237 |
| |
| |||
258 | 258 |
| |
259 | 259 |
| |
260 | 260 |
| |
261 |
| - | |
| 261 | + | |
262 | 262 |
| |
263 | 263 |
| |
264 | 264 |
| |
| |||
311 | 311 |
| |
312 | 312 |
| |
313 | 313 |
| |
314 |
| - | |
| 314 | + | |
315 | 315 |
| |
316 | 316 |
| |
317 |
| - | |
| 317 | + | |
318 | 318 |
| |
319 | 319 |
| |
320 | 320 |
| |
| |||
377 | 377 |
| |
378 | 378 |
| |
379 | 379 |
| |
380 |
| - | |
| 380 | + | |
381 | 381 |
| |
382 | 382 |
| |
383 |
| - | |
| 383 | + | |
384 | 384 |
| |
385 | 385 |
| |
386 | 386 |
| |
| |||
430 | 430 |
| |
431 | 431 |
| |
432 | 432 |
| |
433 |
| - | |
| 433 | + | |
434 | 434 |
| |
435 | 435 |
| |
436 |
| - | |
| 436 | + | |
437 | 437 |
| |
438 | 438 |
| |
439 | 439 |
| |
440 | 440 |
| |
441 | 441 |
| |
442 |
| - | |
| 442 | + | |
443 | 443 |
| |
444 | 444 |
| |
445 | 445 |
| |
| |||
449 | 449 |
| |
450 | 450 |
| |
451 | 451 |
| |
452 |
| - | |
| 452 | + | |
453 | 453 |
| |
454 | 454 |
| |
455 | 455 |
|
Lines changed: 22 additions & 22 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
40 | 40 |
| |
41 | 41 |
| |
42 | 42 |
| |
43 |
| - | |
| 43 | + | |
44 | 44 |
| |
45 | 45 |
| |
46 | 46 |
| |
47 | 47 |
| |
48 | 48 |
| |
49 | 49 |
| |
50 |
| - | |
| 50 | + | |
51 | 51 |
| |
52 | 52 |
| |
53 | 53 |
| |
54 | 54 |
| |
55 |
| - | |
| 55 | + | |
56 | 56 |
| |
57 | 57 |
| |
58 | 58 |
| |
59 | 59 |
| |
60 | 60 |
| |
61 |
| - | |
| 61 | + | |
62 | 62 |
| |
63 | 63 |
| |
64 | 64 |
| |
| |||
84 | 84 |
| |
85 | 85 |
| |
86 | 86 |
| |
87 |
| - | |
| 87 | + | |
88 | 88 |
| |
89 | 89 |
| |
90 | 90 |
| |
91 | 91 |
| |
92 |
| - | |
| 92 | + | |
93 | 93 |
| |
94 | 94 |
| |
95 | 95 |
| |
| |||
103 | 103 |
| |
104 | 104 |
| |
105 | 105 |
| |
106 |
| - | |
| 106 | + | |
107 | 107 |
| |
108 | 108 |
| |
109 | 109 |
| |
| |||
115 | 115 |
| |
116 | 116 |
| |
117 | 117 |
| |
118 |
| - | |
| 118 | + | |
119 | 119 |
| |
120 | 120 |
| |
121 | 121 |
| |
| |||
129 | 129 |
| |
130 | 130 |
| |
131 | 131 |
| |
132 |
| - | |
| 132 | + | |
133 | 133 |
| |
134 | 134 |
| |
135 | 135 |
| |
| |||
148 | 148 |
| |
149 | 149 |
| |
150 | 150 |
| |
151 |
| - | |
| 151 | + | |
152 | 152 |
| |
153 | 153 |
| |
154 | 154 |
| |
| |||
187 | 187 |
| |
188 | 188 |
| |
189 | 189 |
| |
190 |
| - | |
| 190 | + | |
191 | 191 |
| |
192 | 192 |
| |
193 | 193 |
| |
194 |
| - | |
| 194 | + | |
195 | 195 |
| |
196 | 196 |
| |
197 | 197 |
| |
198 | 198 |
| |
199 |
| - | |
| 199 | + | |
200 | 200 |
| |
201 | 201 |
| |
202 | 202 |
| |
| |||
220 | 220 |
| |
221 | 221 |
| |
222 | 222 |
| |
223 |
| - | |
| 223 | + | |
224 | 224 |
| |
225 | 225 |
| |
226 |
| - | |
| 226 | + | |
227 | 227 |
| |
228 | 228 |
| |
229 | 229 |
| |
| |||
298 | 298 |
| |
299 | 299 |
| |
300 | 300 |
| |
301 |
| - | |
| 301 | + | |
302 | 302 |
| |
303 | 303 |
| |
304 | 304 |
| |
| |||
325 | 325 |
| |
326 | 326 |
| |
327 | 327 |
| |
328 |
| - | |
| 328 | + | |
329 | 329 |
| |
330 | 330 |
| |
331 | 331 |
| |
332 | 332 |
| |
333 | 333 |
| |
334 | 334 |
| |
335 | 335 |
| |
336 |
| - | |
| 336 | + | |
337 | 337 |
| |
338 | 338 |
| |
339 | 339 |
| |
340 | 340 |
| |
341 |
| - | |
| 341 | + | |
342 | 342 |
| |
343 | 343 |
| |
344 | 344 |
| |
345 |
| - | |
| 345 | + | |
346 | 346 |
| |
347 | 347 |
| |
348 | 348 |
| |
349 | 349 |
| |
350 | 350 |
| |
351 | 351 |
| |
352 |
| - | |
| 352 | + | |
353 | 353 |
| |
354 | 354 |
| |
355 | 355 |
| |
| |||
367 | 367 |
| |
368 | 368 |
| |
369 | 369 |
| |
370 |
| - | |
| 370 | + | |
371 | 371 |
| |
372 | 372 |
| |
373 | 373 |
| |
|
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
162 | 162 |
| |
163 | 163 |
| |
164 | 164 |
| |
165 |
| - | |
| 165 | + | |
166 | 166 |
| |
167 | 167 |
| |
168 | 168 |
| |
| |||
184 | 184 |
| |
185 | 185 |
| |
186 | 186 |
| |
187 |
| - | |
| 187 | + | |
188 | 188 |
| |
189 | 189 |
| |
190 | 190 |
| |
191 | 191 |
| |
192 |
| - | |
| 192 | + | |
193 | 193 |
| |
194 | 194 |
| |
195 | 195 |
| |
|
Lines changed: 8 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
123 | 123 |
| |
124 | 124 |
| |
125 | 125 |
| |
126 |
| - | |
| 126 | + | |
127 | 127 |
| |
128 | 128 |
| |
129 | 129 |
| |
| |||
142 | 142 |
| |
143 | 143 |
| |
144 | 144 |
| |
145 |
| - | |
| 145 | + | |
146 | 146 |
| |
147 | 147 |
| |
148 | 148 |
| |
| |||
257 | 257 |
| |
258 | 258 |
| |
259 | 259 |
| |
260 |
| - | |
| 260 | + | |
261 | 261 |
| |
262 | 262 |
| |
263 |
| - | |
| 263 | + | |
264 | 264 |
| |
265 | 265 |
| |
266 | 266 |
| |
| |||
284 | 284 |
| |
285 | 285 |
| |
286 | 286 |
| |
287 |
| - | |
| 287 | + | |
288 | 288 |
| |
289 |
| - | |
| 289 | + | |
290 | 290 |
| |
291 | 291 |
| |
292 | 292 |
| |
| |||
602 | 602 |
| |
603 | 603 |
| |
604 | 604 |
| |
605 |
| - | |
| 605 | + | |
606 | 606 |
| |
607 |
| - | |
608 | 607 |
| |
609 | 608 |
| |
610 | 609 |
| |
| |||
615 | 614 |
| |
616 | 615 |
| |
617 | 616 |
| |
618 |
| - | |
| 617 | + | |
619 | 618 |
| |
620 | 619 |
| |
621 | 620 |
| |
|
0 commit comments
Comments
(0)