Re: Remove useless casting to the same type

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Remove useless casting to the same type
Date: 2025-11-24 18:43:28
Message-ID: aSSnULSBJJ3_6pPo@nathan
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Nov 24, 2025 at 10:26:32AM +0000, Bertrand Drouvot wrote:
> This is the same kind of idea as 7f798aca1d5 and ef8fe693606, as their presence
> could cause risks of hiding actual type mismatches in the future or silently
> discarding qualifiers. I think that it also improves readability.

Seems reasonable to me.

> Note that it generated more that what is in the attached. I chose not to remove
> some of them (mainly arithmetic ones) to keep the patch focused on what matters
> here.

Can you give an example of what you are talking about here?

--
nathan

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Geier 2025-11-24 18:46:27 Re: get rid of Pointer type, mostly
Previous Message Nathan Bossart 2025-11-24 18:36:25 Re: pgsql: Teach DSM registry to ERROR if attaching to an uninitialized ent