forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitde6c439
committed
Limit overall indentation in rule/view dumps.
Continuing to indent no matter how deeply nested we get doesn't reallydo anything for readability; what's worse, it results in O(N^2) totalwhitespace, which can become a performance and memory-consumption issue.To address this, once we get past 40 characters of indentation, reducethe indentation step distance 4x, and also limit the maximum indentationby reducing it modulo 40. This latter choice is a bit weird at firstglance, but it seems to preserve readability better than a simple capwould do.Back-patch to 9.3, because since commit62e6664 the performance issueis a hazard for pg_dump.Greg Stark and Tom Lane1 parent164acbe commitde6c439
File tree
2 files changed
+140
-116
lines changed- src
- backend/utils/adt
- test/regress/expected
2 files changed
+140
-116
lines changedLines changed: 26 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
69 | 69 |
| |
70 | 70 |
| |
71 | 71 |
| |
| 72 | + | |
| 73 | + | |
72 | 74 |
| |
73 | 75 |
| |
74 | 76 |
| |
| |||
6258 | 6260 |
| |
6259 | 6261 |
| |
6260 | 6262 |
| |
| 6263 | + | |
| 6264 | + | |
6261 | 6265 |
| |
6262 | 6266 |
| |
6263 | 6267 |
| |
6264 | 6268 |
| |
6265 | 6269 |
| |
6266 | 6270 |
| |
6267 |
| - | |
6268 |
| - | |
| 6271 | + | |
| 6272 | + | |
| 6273 | + | |
| 6274 | + | |
| 6275 | + | |
| 6276 | + | |
| 6277 | + | |
| 6278 | + | |
| 6279 | + | |
| 6280 | + | |
| 6281 | + | |
| 6282 | + | |
| 6283 | + | |
| 6284 | + | |
| 6285 | + | |
| 6286 | + | |
| 6287 | + | |
| 6288 | + | |
| 6289 | + | |
| 6290 | + | |
| 6291 | + | |
| 6292 | + | |
6269 | 6293 |
| |
6270 | 6294 |
| |
6271 | 6295 |
| |
|
0 commit comments
Comments
(0)