From: | Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com> |
---|---|
To: | Julien Rouhaud <rjuju123(at)gmail(dot)com> |
Cc: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Are we missing (void) when return value of fsm_set_and_search is ignored? |
Date: | 2021-06-04 20:08:04 |
Message-ID: | 9fe0dd03-7cc9-9b48-12d4-a1810aab56c4@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2021-06-04 20:09:26 | Re: Support for CREATE MODULE? |
Previous Message | Peter Eisentraut | 2021-06-04 19:53:05 | Re: DELETE CASCADE |