At 10:45 AM 11/22/00 -0600, Jarkko Hietaniemi wrote:
> > 2) An attached table of attributes and ranges to which they apply?
> > Uses less memory for sparse attributes, but means that it's hard work
> > every time we have to interrogate or shuffle characters as we need to
> > check all the ranges each time to see if the characters we are
> > manipulating have metadata.
>
>I believe this alternative has been discussed once in a while. Which
>ranges an operation affects is a log(N) operation on the character
>position (binary search), and the ranges can also be kept sorted among
>themselves on (primary key start position, secondary key end
>position), so that finding out the victim ranges is also a log(N).
>Admittedly, log(N) tends to be larger than 1, and certainly larger
>than 0 :-) Also, using UTF-8 (or any variable length encoding) is
>a pain since you can't any more just happily offset to the data.
This strikes me as an excellent candidate for a custom scalar type. I like
the idea, and it could be really useful in some circumstances, but I'd not
want to burden the default scalar with the code for this.
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk