From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Joe Van Dyk <joe(at)tanga(dot)com> |
Cc: | "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: ltree::text not immutable? |
Date: | 2014-10-23 19:31:44 |
Message-ID: | 11863.1414092704@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
Joe Van Dyk <joe(at)tanga(dot)com> writes:
> Seems like casting ltree to text and the subtree function should be
> immutable?
Hm, yeah, I can see no reason why ltree_in and ltree_out shouldn't be
immutable. They surely ought not be volatile, which is the way they
are marked (by default) right now. The other types in the ltree
module have the same disease.
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?
Meanwhile, as far as fixing the immediate issue goes, I propose just
fixing the misdeclarations in ltree--1.0.sql without going through all
the pushups of making an ltree--1.1.sql. In the past we've fixed
similar errors without a catversion bump on the grounds that the
implications weren't large enough to justify a catversion bump.
I think the equivalent conclusion here is we don't need an extension
version bump.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2014-10-23 19:54:47 | Re: ltree::text not immutable? |
Previous Message | Tom Lane | 2014-10-23 19:05:41 | Re: BUG #11771: wrong behaviour of planner when pushing conditions |
From | Date | Subject | |
---|---|---|---|
Next Message | Brightwell, Adam | 2014-10-23 19:52:18 | Re: superuser() shortcuts |
Previous Message | Robert Haas | 2014-10-23 19:21:56 | Re: [Windows,PATCH] Use faster, higher precision timer API |