Re: Size vs size_t or, um, PgSize? - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: Size vs size_t or, um, PgSize?
Date
Msg-id 273B488E-71D6-4A99-A284-6FDE75B91775@yesql.se
Whole thread Raw
In response to Size vs size_t or, um, PgSize?  (Yurii Rashkovskii <yrashk@gmail.com>)
Responses Re: Size vs size_t or, um, PgSize?  (Thomas Munro <thomas.munro@gmail.com>)
Re: Size vs size_t or, um, PgSize?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> On 3 Jul 2023, at 20:32, Yurii Rashkovskii <yrashk@gmail.com> wrote:

> I couldn't find any rationale as to why we might want to have this alias and not use size_t. Any insight on this
wouldbe appreciated. 

This used to be a typedef for unsigned int a very long time ago.

> Would there be any sense in changing it all to size_t or renaming it to something else?
>
> I understand that they will break some extensions, so if we don't want them to have to go through with the renaming,
canwe enable backward compatibility with a macro? 
>
> If there's a willingness to try this out, I am happy to prepare a patch.

This has been discussed a number of times in the past, and the conclusion from
last time IIRC was to use size_t for new code and only change the existing
instances when touched for other reasons to avoid churn.

--
Daniel Gustafsson




pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: Cutting support for OpenSSL 1.0.1 and 1.0.2 in 17~?
Next
From: Daniel Gustafsson
Date:
Subject: Re: Cutting support for OpenSSL 1.0.1 and 1.0.2 in 17~?