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