Re: Are we missing (void) when return value of fsm_set_and_search is ignored?

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Are we missing (void) when return value of fsm_set_and_search is ignored?
Дата
Msg-id 9fe0dd03-7cc9-9b48-12d4-a1810aab56c4@enterprisedb.com
обсуждение исходный текст
Ответ на Re: Are we missing (void) when return value of fsm_set_and_search is ignored?  (Julien Rouhaud <rjuju123@gmail.com>)
Ответы Re: Are we missing (void) when return value of fsm_set_and_search is ignored?  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Re: Are we missing (void) when return value of fsm_set_and_search is ignored?  (Julien Rouhaud <rjuju123@gmail.com>)
Список pgsql-hackers
On 04.06.21 06:28, Julien Rouhaud wrote:
> Yes, but we have a lot a examples of functions without pg_nodiscard and callers
> still explicitly ignoring the results, like fsm_vacuum_page() in the same file.
> It would be more consistent and make the code slightly more self explanatory.

I'm not clear how you'd make a guideline out of this, other than, "it's 
also done elsewhere".

In this case I'd actually split the function in two, one that returns 
void and one that always returns a value to be consumed.  This 
overloading is a bit confusing.



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: DELETE CASCADE
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: Support for CREATE MODULE?