forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitedef20f
committed
Fix pg_dump's handling of DROP DATABASE commands in --clean mode.
In commit4317e02, I accidentally brokethis behavior while rearranging code to ensure that --create wouldn'taffect whether a DATABASE entry gets put into archive-format output.Thus, 9.2 would issue a DROP DATABASE command in --clean mode, which iseither useless or dangerous depending on the usage scenario.It should not do that, and no longer does.A bright spot is that this refactoring makes it easy to allow thecombination of --clean and --create to work sensibly, ie, emit DROPDATABASE then CREATE DATABASE before reconnecting. Ordinarily we'dconsider that a feature addition and not back-patch it, but it seemssilly to not include the extra couple of lines required in the 9.2version of the code.Per report from Guillaume Lelarge, though this is slightly more extensivethan his proposed patch.1 parentca0b960 commitedef20f
File tree
3 files changed
+37
-21
lines changed- doc/src/sgml/ref
- src/bin/pg_dump
3 files changed
+37
-21
lines changedLines changed: 6 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
143 | 143 |
| |
144 | 144 |
| |
145 | 145 |
| |
146 |
| - | |
| 146 | + | |
| 147 | + | |
147 | 148 |
| |
148 | 149 |
| |
149 | 150 |
| |
| |||
161 | 162 |
| |
162 | 163 |
| |
163 | 164 |
| |
164 |
| - | |
165 |
| - | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
166 | 169 |
| |
167 | 170 |
| |
168 | 171 |
| |
|
Lines changed: 12 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
109 | 109 |
| |
110 | 110 |
| |
111 | 111 |
| |
| 112 | + | |
| 113 | + | |
112 | 114 |
| |
113 | 115 |
| |
114 | 116 |
| |
| |||
118 | 120 |
| |
119 | 121 |
| |
120 | 122 |
| |
121 |
| - | |
122 |
| - | |
123 |
| - | |
124 |
| - | |
125 |
| - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
126 | 133 |
| |
127 | 134 |
| |
128 | 135 |
| |
|
Lines changed: 19 additions & 13 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
303 | 303 |
| |
304 | 304 |
| |
305 | 305 |
| |
306 |
| - | |
307 |
| - | |
308 |
| - | |
309 |
| - | |
310 |
| - | |
311 |
| - | |
312 |
| - | |
313 |
| - | |
314 |
| - | |
315 | 306 |
| |
316 | 307 |
| |
317 | 308 |
| |
| |||
456 | 447 |
| |
457 | 448 |
| |
458 | 449 |
| |
459 |
| - | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
460 | 469 |
| |
461 | 470 |
| |
462 | 471 |
| |
| |||
938 | 947 |
| |
939 | 948 |
| |
940 | 949 |
| |
941 |
| - | |
942 |
| - | |
943 |
| - | |
944 | 950 |
| |
945 | 951 |
| |
946 | 952 |
| |
|
0 commit comments
Comments
(0)