Re: [HACKERS] [COMMITTERS] pgsql: Implement table partitioning.

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: [HACKERS] [COMMITTERS] pgsql: Implement table partitioning.
Дата
Msg-id 20161208191122.GF23417@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: [COMMITTERS] pgsql: Implement table partitioning.  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert,

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

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: Time to drop old-style (V0) functions?
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Changed SRF in targetlist handling