>Is that the one off gborg? It's broken because the equality function is
>marked volatile, and so the planner is afraid to try to use it for
>merging or hashing. (It's also not marked strict, which means you can
>trivially crash the backend by passing it a null ...)
It is the one from gborg. That's good to know.
So to fix, I should alter the supporting functions and set the ones that should not be VOLATILE to IMMUTABLE (newid()
shouldbe VOLATILE and that's about it) and set them to STRICT as well. I haven't had a problem with it crashing my
backendin the three years we've been using it, but I'd rather not take any chances.
I know the hacker list has been batting back and forth the idea of a built-in UUID type. I'll be interested to see if
youend up with a standard UUID type, a fixed field type with multiple generators for differing levels of paranoia, or
thestatus quo.
CG