Re: gratuitous casting away const - Mailing list pgsql-hackers

From Tom Lane
Subject Re: gratuitous casting away const
Date
Msg-id 20919.1474402019@sss.pgh.pa.us
Whole thread Raw
In response to gratuitous casting away const  (Mark Dilger <hornschnorter@gmail.com>)
Responses Re: gratuitous casting away const  (Mark Dilger <hornschnorter@gmail.com>)
List pgsql-hackers
Mark Dilger <hornschnorter@gmail.com> writes:
> Would patches to not cast away const be considered?

In general, yes, but I'm not especially in favor of something like this:

>  bool
>  PageIndexTupleOverwrite(Page page, OffsetNumber offnum,
> -                                               Item newtup, Size newsize)
> +                                               const char *newtup, Size newsize)
>  {

since that seems to be discarding type information in order to add
"const"; does not seem like a net benefit from here.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: increasing the default WAL segment size
Next
From: Robert Haas
Date:
Subject: Re: Rename max_parallel_degree?