Re: plenty code is confused about function level static

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: plenty code is confused about function level static
Date: 2024-04-18 08:33:30
Message-ID: e494aa10-a6ce-4d0f-890d-86ae3e4f8530@eisentraut.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 17.04.24 23:39, Andres Freund wrote:
> Is there some reason we went for this pattern in a fair number of places? I
> assume it's mostly copy-pasta, but...

Right. I don't think it is commonly understood that adding const
qualifiers can help compiler optimization, and it's difficult to
systematically check for omissions or verify the optimization effects.
So I think we just have to keep trying to do our best manually for now.

> Attached are fixes for struct option and a few more occurrences I've found
> with a bit of grepping.

These look good to me.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrey M. Borodin 2024-04-18 08:43:50 Re: plenty code is confused about function level static
Previous Message Michael Paquier 2024-04-18 07:49:38 Re: fix tablespace handling in pg_combinebackup