Re: some dead code in functioncmds.c

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: some dead code in functioncmds.c
Дата
Msg-id 4AEB1B46.4020108@enterprisedb.com
обсуждение исходный текст
Ответ на Re: some dead code in functioncmds.c  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: some dead code in functioncmds.c  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
Pavel Stehule wrote:
> 2009/10/30 Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>:
>> Pavel Stehule wrote:
>>>       else
>>>       {
>>>               ereport(ERROR,
>>>                               (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION),
>>>                                errmsg("function result type must be specified")));
>>>               /* Alternative possibility: default to RETURNS VOID */
>>>
>>> /* WHY FOLOWING LINES? */
>>>               prorettype = VOIDOID;
>>>               returnsSet = false;
>>>       }
>> To keep the compiler quiet about using the variables uninitialized. The
>> compiler doesn't know that ereport(ERROR) never returns.
> 
> Should be similar code little bit commented?

*shrug*, maybe, often we do put a "/* keep compiler quiet */" comment on
such places.

On closer look, the "Alternative possibility: default to RETURNS VOID"
comment suggests that besides keeping the compiler quiet, those lines
demonstrate an alternative behavior that was considered.

--  Heikki Linnakangas EnterpriseDB   http://www.enterprisedb.com


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

Предыдущее
От: pg@thetdh.com
Дата:
Сообщение: Re: Syntax for partitioning
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Syntax for partitioning