forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit0b7e660
committed
Fix ruleutils pretty-printing to not generate trailing whitespace.
The pretty-printing logic in ruleutils.c operates by inserting a newlineand some indentation whitespace into strings that are already valid SQL.This naturally results in leaving some trailing whitespace before thenewline in many cases; which can be annoying when processing the outputwith other tools, as complained of by Joe Abbate. We can fix that ina pretty localized fashion by deleting any trailing whitespace beforewe append a pretty-printing newline. In addition, we have to modify thecode inserted by commit2f582f7 so thatwe also delete trailing whitespace when transposing items from temporarybuffers into the main result string, when a temporary item starts with anewline.This results in rather voluminous changes to the regression test results,but it's easily verified that they are only removal of trailing whitespace.Back-patch to 9.3, because the aforementioned commit resulted in manymore cases of trailing whitespace than had occurred in earlier branches.1 parent648bd05 commit0b7e660
File tree
9 files changed
+723
-692
lines changed- src
- backend/utils/adt
- test/regress/expected
9 files changed
+723
-692
lines changedLines changed: 80 additions & 49 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
365 | 365 |
| |
366 | 366 |
| |
367 | 367 |
| |
| 368 | + | |
368 | 369 |
| |
369 | 370 |
| |
370 | 371 |
| |
| |||
4479 | 4480 |
| |
4480 | 4481 |
| |
4481 | 4482 |
| |
4482 |
| - | |
4483 |
| - | |
4484 |
| - | |
| 4483 | + | |
4485 | 4484 |
| |
4486 |
| - | |
4487 |
| - | |
| 4485 | + | |
| 4486 | + | |
| 4487 | + | |
| 4488 | + | |
| 4489 | + | |
| 4490 | + | |
| 4491 | + | |
| 4492 | + | |
4488 | 4493 |
| |
4489 |
| - | |
4490 |
| - | |
4491 |
| - | |
4492 |
| - | |
4493 |
| - | |
4494 |
| - | |
4495 |
| - | |
| 4494 | + | |
| 4495 | + | |
4496 | 4496 |
| |
4497 |
| - | |
4498 |
| - | |
4499 |
| - | |
4500 |
| - | |
4501 |
| - | |
4502 | 4497 |
| |
4503 |
| - | |
| 4498 | + | |
| 4499 | + | |
4504 | 4500 |
| |
4505 |
| - | |
4506 |
| - | |
4507 |
| - | |
4508 |
| - | |
4509 |
| - | |
4510 |
| - | |
4511 |
| - | |
4512 |
| - | |
4513 |
| - | |
4514 |
| - | |
4515 |
| - | |
4516 |
| - | |
4517 |
| - | |
| 4501 | + | |
| 4502 | + | |
| 4503 | + | |
| 4504 | + | |
| 4505 | + | |
| 4506 | + | |
| 4507 | + | |
| 4508 | + | |
| 4509 | + | |
| 4510 | + | |
| 4511 | + | |
| 4512 | + | |
| 4513 | + | |
| 4514 | + | |
| 4515 | + | |
| 4516 | + | |
| 4517 | + | |
| 4518 | + | |
4518 | 4519 |
| |
4519 | 4520 |
| |
4520 | 4521 |
| |
| |||
6236 | 6237 |
| |
6237 | 6238 |
| |
6238 | 6239 |
| |
| 6240 | + | |
| 6241 | + | |
6239 | 6242 |
| |
6240 | 6243 |
| |
6241 | 6244 |
| |
6242 | 6245 |
| |
6243 |
| - | |
6244 |
| - | |
| 6246 | + | |
| 6247 | + | |
| 6248 | + | |
| 6249 | + | |
| 6250 | + | |
6245 | 6251 |
| |
6246 |
| - | |
| 6252 | + | |
| 6253 | + | |
6247 | 6254 |
| |
6248 | 6255 |
| |
6249 | 6256 |
| |
6250 | 6257 |
| |
6251 | 6258 |
| |
6252 | 6259 |
| |
6253 |
| - | |
| 6260 | + | |
6254 | 6261 |
| |
6255 | 6262 |
| |
| 6263 | + | |
| 6264 | + | |
| 6265 | + | |
| 6266 | + | |
| 6267 | + | |
| 6268 | + | |
| 6269 | + | |
| 6270 | + | |
| 6271 | + | |
| 6272 | + | |
| 6273 | + | |
| 6274 | + | |
| 6275 | + | |
6256 | 6276 |
| |
6257 | 6277 |
| |
6258 | 6278 |
| |
| |||
7942 | 7962 |
| |
7943 | 7963 |
| |
7944 | 7964 |
| |
7945 |
| - | |
7946 |
| - | |
7947 |
| - | |
7948 |
| - | |
7949 |
| - | |
7950 |
| - | |
| 7965 | + | |
| 7966 | + | |
| 7967 | + | |
| 7968 | + | |
| 7969 | + | |
| 7970 | + | |
| 7971 | + | |
7951 | 7972 |
| |
7952 |
| - | |
| 7973 | + | |
| 7974 | + | |
7953 | 7975 |
| |
7954 |
| - | |
7955 |
| - | |
7956 |
| - | |
7957 |
| - | |
7958 |
| - | |
7959 |
| - | |
7960 |
| - | |
| 7976 | + | |
| 7977 | + | |
| 7978 | + | |
| 7979 | + | |
| 7980 | + | |
| 7981 | + | |
| 7982 | + | |
| 7983 | + | |
| 7984 | + | |
| 7985 | + | |
| 7986 | + | |
| 7987 | + | |
| 7988 | + | |
| 7989 | + | |
| 7990 | + | |
| 7991 | + | |
7961 | 7992 |
| |
7962 | 7993 |
| |
7963 | 7994 |
| |
|
Lines changed: 12 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
960 | 960 |
| |
961 | 961 |
| |
962 | 962 |
| |
963 |
| - | |
964 |
| - | |
965 |
| - | |
966 |
| - | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
967 | 967 |
| |
968 | 968 |
| |
969 | 969 |
| |
| |||
978 | 978 |
| |
979 | 979 |
| |
980 | 980 |
| |
981 |
| - | |
982 |
| - | |
983 |
| - | |
984 |
| - | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
985 | 985 |
| |
986 | 986 |
| |
987 | 987 |
| |
| |||
1044 | 1044 |
| |
1045 | 1045 |
| |
1046 | 1046 |
| |
1047 |
| - | |
1048 |
| - | |
1049 |
| - | |
1050 |
| - | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
1051 | 1051 |
| |
1052 | 1052 |
| |
1053 | 1053 |
| |
|
0 commit comments
Comments
(0)