https://github.com/postgres/postgres
Revision 5abdb33ad0533867dae08b61d922a5dfd499a290 authored by Tom Lane on 07 August 2018, 17:13:42 UTC, committed by Tom Lane on 07 August 2018, 17:13:42 UTC
The original coding here (which is, I believe, my fault) supposed that
it didn't need to concern itself with the possibility that one object
of a given type-priority has a namespace while another doesn't.  But
that's not reliably true anymore, if it ever was; and if it does happen
then it's possible that DOTypeNameCompare returns self-inconsistent
comparison 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 ordering
constraints that actually matter should be enforced by the later
dependency-based sort.  Still, it's a bug, so back-patch.

Report and fix by Jacob Champion, though I editorialized on his
patch to the extent of making NULL sort after non-NULL, for consistency
with our usual sorting definitions.

Discussion: https://postgr.es/m/CABAq_6Hw+V-Kj7PNfD5tgOaWT_-qaYkc+SRmJkPLeUjYXLdxwQ@mail.gmail.com
1 parent e0fb7a2
History
Tip revision: 5abdb33ad0533867dae08b61d922a5dfd499a290 authored by Tom Lane on 07 August 2018, 17:13:42 UTC
Ensure pg_dump_sort.c sorts null vs non-null namespace consistently.
Tip revision: 5abdb33
File Mode Size
config
contrib
doc
src
.gitignore -rw-r--r-- 392 bytes
COPYRIGHT -rw-r--r-- 1.2 KB
GNUmakefile.in -rw-r--r-- 3.5 KB
HISTORY -rw-r--r-- 284 bytes
Makefile -rw-r--r-- 1.6 KB
README -rw-r--r-- 1.2 KB
README.git -rw-r--r-- 728 bytes
aclocal.m4 -rw-r--r-- 385 bytes
configure -rwxr-xr-x 889.9 KB
configure.in -rw-r--r-- 66.8 KB

README

back to top