postgresql/src
Dean Rasheed f1dae097f2 Clarify the contract of partition_rbound_cmp().
partition_rbound_cmp() is intended to compare range partition bounds
in a way such that if all the bound values are equal but one is an
upper bound and one is a lower bound, the upper bound is treated as
smaller than the lower bound. This particular ordering is required by
RelationBuildPartitionDesc() when building the PartitionBoundInfoData,
so that it can consistently keep only the upper bounds when upper and
lower bounds coincide.

Update the function comment to make that clearer.

Also, fix a (currently unreachable) corner-case bug -- if the bound
values coincide and they contain unbounded values, fall through to the
lower-vs-upper comparison code, rather than immediately returning
0. Currently it is not possible to define coincident upper and lower
bounds containing unbounded columns, but that may change in the
future, so code defensively.

Discussion: https://postgr.es/m/CAAJ_b947mowpLdxL3jo3YLKngRjrq9+Ej4ymduQTfYR+8=YAYQ@mail.gmail.com
2017-07-06 12:46:08 +01:00
..
backend Clarify the contract of partition_rbound_cmp(). 2017-07-06 12:46:08 +01:00
bin Restore linking libpq into pg_ctl on Mingw builds. 2017-07-05 15:23:22 -04:00
common Change pg_ctl to detect server-ready by watching status in postmaster.pid. 2017-06-28 17:31:32 -04:00
fe_utils Phase 3 of pgindent updates. 2017-06-21 15:35:54 -04:00
include Fix locking in WAL receiver/sender shmem state structs 2017-06-30 18:06:33 -04:00
interfaces Second try at fixing tcp_keepalives_idle option on Solaris. 2017-06-28 12:30:16 -04:00
makefiles Always use -fPIC, not -fpic, when building shared libraries with gcc. 2017-06-01 13:32:55 -04:00
pl PL/Python: Fix hint about returning composite type from Python 2017-06-30 16:51:14 -04:00
port Phase 3 of pgindent updates. 2017-06-21 15:35:54 -04:00
template Remove "sco" and "unixware" ports. 2016-10-11 11:26:04 -04:00
test Simplify the logic checking new range partition bounds. 2017-07-06 09:58:06 +01:00
timezone Phase 3 of pgindent updates. 2017-06-21 15:35:54 -04:00
tools Ooops, WIN32 code in pg_ctl.c still needs PQExpBuffer. 2017-06-28 18:00:16 -04:00
tutorial Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
.gitignore
DEVELOPERS
Makefile Remove redundant coverage target 2017-02-17 08:56:57 -05:00
Makefile.global.in Add ICU_CFLAGS to global CPPFLAGS 2017-06-12 15:57:22 -04:00
Makefile.shlib Remove support for bcc and msvc standalone libpq builds 2017-04-11 15:22:21 +02:00
nls-global.mk nls-global.mk: search build dir for source files, too 2016-06-07 18:55:18 -04:00