Re: [HACKERS] gratuitous casting away const

2016-09-27 Thread Mark Dilger
Friends, here is another patch, this time fixing the casting away of const in the regex code. Mark Dilger regex.patch.1 Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] gratuitous casting away const

2016-09-22 Thread Mark Dilger
> On Sep 22, 2016, at 9:14 AM, Tom Lane wrote: > > I'd call this kind of a wash, I guess. I'd be more excited about it if > the change allowed removal of an actual cast-away-of-constness somewhere. > > I suppose it's a bit of a chicken and egg situation, in that the lack >

Re: [HACKERS] gratuitous casting away const

2016-09-22 Thread Tom Lane
Mark Dilger writes: >> On Sep 20, 2016, at 1:06 PM, Tom Lane wrote: >> ... that seems to be discarding type information in order to add >> "const"; does not seem like a net benefit from here. > The following seems somewhere in between, with

Re: [HACKERS] gratuitous casting away const

2016-09-20 Thread Mark Dilger
> On Sep 20, 2016, at 1:06 PM, Tom Lane wrote: > > Mark Dilger 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

Re: [HACKERS] gratuitous casting away const

2016-09-20 Thread Tom Lane
Mark Dilger 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

[HACKERS] gratuitous casting away const

2016-09-20 Thread Mark Dilger
Friends, There are places in the code that cast away const for no apparent reason, fixed like such: diff --git a/src/backend/executor/nodeIndexscan.c b/src/backend/executor/nodeIndexscan.c index 3143bd9..fe2cfc2 100644 --- a/src/backend/executor/nodeIndexscan.c +++