Robert, * Robert Haas (robertmh...@gmail.com) wrote: > On Thu, Dec 8, 2016 at 1:49 PM, Stephen Frost <sfr...@snowman.net> wrote: > > * Robert Haas (rh...@postgresql.org) wrote: > >> Implement table partitioning. > > > > My compiler apparently doesn't care for this: > > > > .../src/backend/catalog/partition.c: In function ‘partition_rbound_cmp’: > > .../src/backend/catalog/partition.c:1787:13: warning: ‘cmpval’ may be used > > uninitialized in this function [-Wmaybe-uninitialized] > > if (cmpval == 0 && lower1 != lower2) > > So, apparently your compiler doesn't recognize that the loop always > has to execute at least once, because we don't support a table > partitioned on zero attributes. If you initialize cmpval to 0 at the > top of the function, does that fix it?
Yes, that makes the compiler warning go away. ... your compiler knows that key->partnatts will always be >= 1? Thanks! Stephen
signature.asc
Description: Digital signature