pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: pgsql-hackers@postgresql.org
Cc: Joe Van Dyk <joe@tanga.com>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: [BUGS] ltree::text not immutable?
Date: Sat, 01 Nov 2014 13:19:12 -0400
Message-ID: <6148.1414862352@sss.pgh.pa.us> (raw)
In-Reply-To: <20141027153259.GV1791@alvin.alvh.no-ip.org>
References: <CACfv+pL2oX08SSZSoaHpyC=UbfTFmPt4UmVEKJTH7y=2QMRCBw@mail.gmail.com>
	<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>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Alvaro Herrera <alvherre@2ndquadrant.com> 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



view thread (16+ messages)  latest in thread

Message-ID: <6148.1414862352@sss.pgh.pa.us>
Permalink:  ../6148.1414862352@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/6148.1414862352@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, alvherre@2ndquadrant.com, pgsql-hackers@postgresql.org, joe@tanga.com
  Subject: Re: [BUGS] ltree::text not immutable?
  In-Reply-To: <6148.1414862352@sss.pgh.pa.us>
  References: <CACfv+pL2oX08SSZSoaHpyC=UbfTFmPt4UmVEKJTH7y=2QMRCBw@mail.gmail.com> <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> <6148.1414862352@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox