forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit5b5ed47
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 parente0ee930 commit5b5ed47
1 file changed
+16
-9
lines changedLines changed: 16 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
223 | 223 |
| |
224 | 224 |
| |
225 | 225 |
| |
226 |
| - | |
| 226 | + | |
227 | 227 |
| |
228 | 228 |
| |
229 | 229 |
| |
230 | 230 |
| |
231 | 231 |
| |
232 | 232 |
| |
233 | 233 |
| |
234 |
| - | |
235 |
| - | |
236 |
| - | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
237 | 237 |
| |
238 |
| - | |
| 238 | + | |
239 | 239 |
| |
240 |
| - | |
241 |
| - | |
242 |
| - | |
243 |
| - | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
244 | 249 |
| |
| 250 | + | |
| 251 | + | |
245 | 252 |
| |
246 | 253 |
| |
247 | 254 |
| |
|
0 commit comments
Comments
(0)