Re: [COMMITTERS] pgsql: Identity columns

Поиск
Список
Период
Сортировка
Искать
От
Peter Eisentraut
Тема
Re: [COMMITTERS] pgsql: Identity columns
Дата
Msg-id
8ea7e815-956c-33fd-a2fa-f88861e32086@2ndquadrant.com
Ответ на
Список
Дерево обсуждения
[COMMITTERS] pgsql: Identity columns Peter Eisentraut <peter_e@gmx.net>
Re: [COMMITTERS] pgsql: Identity columns Tom Lane <tgl@sss.pgh.pa.us>
Re: [COMMITTERS] pgsql: Identity columns Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: [COMMITTERS] pgsql: Identity columns David Rowley <david.rowley@2ndquadrant.com>
Re: [COMMITTERS] pgsql: Identity columns Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
On 4/6/17 10:24, Tom Lane wrote:
> This commit is causing a compiler warning for me:
> 
> tablecmds.c: In function 'ATExecSetIdentity':
> tablecmds.c:5936: warning: 'address.objectSubId' may be used uninitialized in this function
> tablecmds.c:5936: warning: 'address.objectId' may be used uninitialized in this function
> 
> I'm not sure why it's not complaining about all three fields, because
> AFAICS, the function returns a totally undefined ObjectAddress when
> generatedEl is not set.

Yeah, that was an oversight.  It's depressing that not more compilers
warn about an obvious case like this.  I have pushed a fix.

> What is the intention there?  (If the function
> were adequately documented, maybe I could divine that for myself, but
> heaven help the reader who would like to know what this function is
> supposed to do.)

Added some comments, too.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

В списке pgsql-committers по дате отправления
От: Peter Eisentraut
Дата:
От: Alvaro Herrera
Дата:
FAQ