Re: [COMMITTERS] pgsql: Implement table partitioning.

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: Implement table partitioning.
Date: 2016-12-08 19:11:22
Message-ID: 20161208191122.GF23417@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Robert,

* Robert Haas (robertmhaas(at)gmail(dot)com) wrote:
> On Thu, Dec 8, 2016 at 1:49 PM, Stephen Frost <sfrost(at)snowman(dot)net> wrote:
> > * Robert Haas (rhaas(at)postgresql(dot)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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2016-12-08 19:35:33 pgsql: Log the creation of an init fork unconditionally.
Previous Message Robert Haas 2016-12-08 19:06:58 Re: [COMMITTERS] pgsql: Implement table partitioning.

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2016-12-08 19:16:38 Re: Logical Replication WIP
Previous Message Robert Haas 2016-12-08 19:06:58 Re: [COMMITTERS] pgsql: Implement table partitioning.