Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XkcKh-0001rh-D1 for pgsql-hackers@arkaria.postgresql.org; Sat, 01 Nov 2014 17:19:23 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XkcKg-0006bw-Sn for pgsql-hackers@arkaria.postgresql.org; Sat, 01 Nov 2014 17:19:22 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XkcKf-0006Ze-76; Sat, 01 Nov 2014 17:19:21 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XkcKb-0001WA-Vb; Sat, 01 Nov 2014 17:19:20 +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 sA1HJCNw006149; Sat, 1 Nov 2014 13:19:12 -0400 From: Tom Lane To: Alvaro Herrera cc: pgsql-hackers@postgresql.org, Joe Van Dyk , "pgsql-bugs@postgresql.org" Subject: Re: [BUGS] ltree::text not immutable? In-reply-to: <20141027153259.GV1791@alvin.alvh.no-ip.org> References: <11863.1414092704@sss.pgh.pa.us> <13790.1414094087@sss.pgh.pa.us> <11194.1414356373@sss.pgh.pa.us> <20141027153259.GV1791@alvin.alvh.no-ip.org> Comments: In-reply-to Alvaro Herrera message dated "Mon, 27 Oct 2014 12:32:59 -0300" Date: Sat, 01 Nov 2014 13:19:12 -0400 Message-ID: <6148.1414862352@sss.pgh.pa.us> X-Pg-Spam-Score: -2.5 (--) 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 Alvaro Herrera writes: > Tom Lane wrote: >> Not entirely sure what to do about this. It seems like for the purposes >> of contrib/chkpass, it's a good thing that chkpass_in() won't reuse the >> same salt. Weak as a 12-bit salt might be nowadays, it's still better >> than no salt. Nonetheless, this behavior is breaking assumptions made >> in places like array_in and record_in. >> >> For the moment I'm tempted to mark chkpass_in as stable (with a comment >> explaining that it isn't really) just so we can put in the error check >> in CREATE TYPE. But I wonder if anyone has a better idea. > Can we have a separate function that accepts unencrypted passwords, and > change chkpass_in to only accept encrypted ones? Similar to > to_tsquery() et al. Well, that would undoubtedly have been a better way to design the module to start with, but we're not working in a green field. I doubt we can get away with changing the type's behavior that much. That is, assuming there are any users of it at all, which there might not be ;-) An alternative that just occurred to me is to put the no-volatile- I/O-functions check into CREATE TYPE, but make it just WARNING not ERROR. That would be nearly as good as an ERROR in terms of nudging people who'd accidentally omitted a volatility marking from their custom types. But we could leave chkpass as-is and wait to see if anyone complains "hey, why am I getting this warning?". If we don't hear anyone complaining, maybe that means we can get away with changing the type's behavior in 9.6 or later. 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