Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XhOTF-00035z-RX for pgsql-bugs@arkaria.postgresql.org; Thu, 23 Oct 2014 19:54:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XhOTF-0005wf-BX for pgsql-bugs@arkaria.postgresql.org; Thu, 23 Oct 2014 19:54:53 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XhOTE-0005wW-Kc; Thu, 23 Oct 2014 19:54:52 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XhOTB-0001iA-SM; Thu, 23 Oct 2014 19:54:50 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id s9NJslVH013791; Thu, 23 Oct 2014 15:54:47 -0400 From: Tom Lane To: Joe Van Dyk cc: "pgsql-bugs@postgresql.org" , pgsql-hackers@postgresql.org Subject: Re: ltree::text not immutable? In-reply-to: <11863.1414092704@sss.pgh.pa.us> References: <11863.1414092704@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Thu, 23 Oct 2014 15:31:44 -0400" Date: Thu, 23 Oct 2014 15:54:47 -0400 Message-ID: <13790.1414094087@sss.pgh.pa.us> X-Pg-Spam-Score: -3.3 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org I wrote: > More generally, it seems like we ought to have a test in the type_sanity > regression script that checks that type I/O functions aren't volatile, > because there are various embedded assumptions that this is so, cf > commits aab353a60b95aadc00f81da0c6d99bde696c4b75 and > 3db6524fe63f0598dcb2b307bb422bc126f2b15d. > That wouldn't have directly caught this problem because we don't apply > type_sanity or opr_sanity to contrib modules, only to core functions. > I have done that manually in the past and think I'll go do it again > to see what else crawls out ... but I wonder if anyone can think of > a way to automate that? Actually, the right thing to do if we want to enforce this is for CREATE TYPE to check the marking. We'd still need a type_sanity test to check erroneous declarations of built-in types, but a complaint in CREATE TYPE would cover all the contrib modules as well as third-party code. I wouldn't propose back-patching such an error check, but it seems reasonable to add it for 9.5. Any objections? regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs