- Notifications
You must be signed in to change notification settings - Fork28
Commitf1dae09
committed
Clarify the contract of partition_rbound_cmp().
partition_rbound_cmp() is intended to compare range partition boundsin a way such that if all the bound values are equal but one is anupper bound and one is a lower bound, the upper bound is treated assmaller than the lower bound. This particular ordering is required byRelationBuildPartitionDesc() when building the PartitionBoundInfoData,so that it can consistently keep only the upper bounds when upper andlower bounds coincide.Update the function comment to make that clearer.Also, fix a (currently unreachable) corner-case bug -- if the boundvalues coincide and they contain unbounded values, fall through to thelower-vs-upper comparison code, rather than immediately returning0. Currently it is not possible to define coincident upper and lowerbounds containing unbounded columns, but that may change in thefuture, so code defensively.Discussion:https://postgr.es/m/CAAJ_b947mowpLdxL3jo3YLKngRjrq9+Ej4ymduQTfYR+8=YAYQ@mail.gmail.com1 parentc03911d commitf1dae09
1 file changed
+30
-14
lines changedLines changed: 30 additions & 14 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
57 | 57 |
| |
58 | 58 |
| |
59 | 59 |
| |
60 |
| - | |
| 60 | + | |
| 61 | + | |
61 | 62 |
| |
62 | 63 |
| |
63 | 64 |
| |
| |||
2136 | 2137 |
| |
2137 | 2138 |
| |
2138 | 2139 |
| |
2139 |
| - | |
| 2140 | + | |
| 2141 | + | |
| 2142 | + | |
| 2143 | + | |
| 2144 | + | |
| 2145 | + | |
| 2146 | + | |
| 2147 | + | |
2140 | 2148 |
| |
2141 | 2149 |
| |
2142 | 2150 |
| |
| |||
2152 | 2160 |
| |
2153 | 2161 |
| |
2154 | 2162 |
| |
2155 |
| - | |
2156 |
| - | |
| 2163 | + | |
| 2164 | + | |
| 2165 | + | |
2157 | 2166 |
| |
2158 |
| - | |
| 2167 | + | |
2159 | 2168 |
| |
2160 |
| - | |
| 2169 | + | |
2161 | 2170 |
| |
2162 |
| - | |
2163 |
| - | |
| 2171 | + | |
| 2172 | + | |
2164 | 2173 |
| |
2165 |
| - | |
2166 |
| - | |
2167 |
| - | |
2168 |
| - | |
2169 |
| - | |
2170 |
| - | |
| 2174 | + | |
| 2175 | + | |
| 2176 | + | |
| 2177 | + | |
| 2178 | + | |
| 2179 | + | |
| 2180 | + | |
| 2181 | + | |
| 2182 | + | |
| 2183 | + | |
| 2184 | + | |
| 2185 | + | |
| 2186 | + | |
2171 | 2187 |
| |
2172 | 2188 |
| |
2173 | 2189 |
| |
|
0 commit comments
Comments
(0)