Re: tablecmds.c/MergeAttributes() cleanup

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: tablecmds.c/MergeAttributes() cleanup
Дата
Msg-id 20230829184402.b4ekvxqtd7rc5is4@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: tablecmds.c/MergeAttributes() cleanup  (Nathan Bossart <nathandbossart@gmail.com>)
Ответы Re: tablecmds.c/MergeAttributes() cleanup  (Nathan Bossart <nathandbossart@gmail.com>)
Список pgsql-hackers
On 2023-Aug-29, Nathan Bossart wrote:

> On Tue, Aug 29, 2023 at 10:43:39AM +0200, Peter Eisentraut wrote:
> > I have committed a few more patches from this series that were already
> > agreed upon.  The remaining ones are rebased and reordered a bit, attached.
> 
> My compiler is complaining about 1fa9241b:
> 
> ../postgresql/src/backend/commands/sequence.c: In function ‘DefineSequence’:
> ../postgresql/src/backend/commands/sequence.c:196:21: error: ‘coldef’ may be used uninitialized in this function
[-Werror=maybe-uninitialized]
>   196 |   stmt->tableElts = lappend(stmt->tableElts, coldef);
>       |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> This went away when I added a default case that ERROR'd or initialized
> coldef to NULL.

Makes sense.  However, maybe we should replace those ugly defines and
their hardcoded values in DefineSequence with a proper array with their
names and datatypes.

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/
"Los trabajadores menos efectivos son sistematicamente llevados al lugar
donde pueden hacer el menor daño posible: gerencia."  (El principio Dilbert)



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

Предыдущее
От: Nathan Bossart
Дата:
Сообщение: Re: tablecmds.c/MergeAttributes() cleanup
Следующее
От: Nathan Bossart
Дата:
Сообщение: Re: tablecmds.c/MergeAttributes() cleanup