Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bmRLE-0004ZA-8J for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Sep 2016 20:08:32 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bmRLD-00028u-Rj for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Sep 2016 20:08:31 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bmRJp-0007sm-TF for pgsql-hackers@postgresql.org; Tue, 20 Sep 2016 20:07:05 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bmRJn-0007BY-CI for pgsql-hackers@postgresql.org; Tue, 20 Sep 2016 20:07:05 +0000 Received: from pro.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u8KK70CM019499; Tue, 20 Sep 2016 16:07:00 -0400 From: Tom Lane To: Mark Dilger cc: PostgreSQL-development Subject: Re: gratuitous casting away const In-reply-to: References: Comments: In-reply-to Mark Dilger message dated "Tue, 20 Sep 2016 12:57:52 -0700" Date: Tue, 20 Sep 2016 16:06:59 -0400 Message-ID: <20919.1474402019@sss.pgh.pa.us> X-Pg-Spam-Score: -5.0 (-----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org 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 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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers