forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit6b6327d
committed
Ensure pg_dump_sort.c sorts null vs non-null namespace consistently.
The original coding here (which is, I believe, my fault) supposed thatit didn't need to concern itself with the possibility that one objectof a given type-priority has a namespace while another doesn't. Butthat's not reliably true anymore, if it ever was; and if it does happenthen it's possible that DOTypeNameCompare returns self-inconsistentcomparison results. That leads to unspecified behavior in qsort()and a resultant weird output order from pg_dump.This should end up being only a cosmetic problem, because any orderingconstraints that actually matter should be enforced by the laterdependency-based sort. Still, it's a bug, so back-patch.Report and fix by Jacob Champion, though I editorialized on hispatch to the extent of making NULL sort after non-NULL, for consistencywith our usual sorting definitions.Discussion:https://postgr.es/m/CABAq_6Hw+V-Kj7PNfD5tgOaWT_-qaYkc+SRmJkPLeUjYXLdxwQ@mail.gmail.com1 parentca3489e commit6b6327d
1 file changed
+16
-9
lines changedLines changed: 16 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
265 | 265 |
| |
266 | 266 |
| |
267 | 267 |
| |
268 |
| - | |
| 268 | + | |
269 | 269 |
| |
270 | 270 |
| |
271 | 271 |
| |
272 | 272 |
| |
273 | 273 |
| |
274 | 274 |
| |
275 | 275 |
| |
276 |
| - | |
277 |
| - | |
278 |
| - | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
279 | 279 |
| |
280 |
| - | |
| 280 | + | |
281 | 281 |
| |
282 |
| - | |
283 |
| - | |
284 |
| - | |
285 |
| - | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
286 | 291 |
| |
| 292 | + | |
| 293 | + | |
287 | 294 |
| |
288 | 295 |
| |
289 | 296 |
| |
|
0 commit comments
Comments
(0)